Commit d09eb27
drm/fb-helper: move zeroing code to drm_fb_helper_fill_var
__fill_var is used by both drm_fb_helper_check_var and
drm_fb_helper_fill_var. In drm_fb_helper_check_var, it is possible that
some of the variables in fb_info-> var which are currently being zero'ed
have pre-existing values. Zeroing these causes some fb tests to fail
with (from the Xorg.log):
[ 9.897] (II) Module fbdevhw: vendor="X.Org Foundation"
[ 9.897] compiled for 1.21.1.8, module version = 0.0.2
[ 9.897] ABI class: X.Org Video Driver, version 25.2
[ 9.898] (II) FBDEV(0): using default device
[ 9.901] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32
[ 9.902] (==) FBDEV(0): RGB weight 888
[ 9.902] (==) FBDEV(0): Default visual is TrueColor
[ 9.902] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[ 9.902] (II) FBDEV(0): hardware: virtio_gpudrmfb (video memory:
4000kB)
[ 9.902] (DB) xf86MergeOutputClassOptions unsupported bus type 0
[ 9.903] (II) FBDEV(0): checking modes against framebuffer device...
[ 9.904] (II) FBDEV(0): mode "640x480" test failed
[ 9.904] (II) FBDEV(0): mode "640x480" test failed
[ 9.904] (II) FBDEV(0): mode "640x480" test failed
[ 9.904] (II) FBDEV(0): mode "640x480" test failed
[ 9.904] (II) FBDEV(0): mode "640x480" not found
[ 9.904] (II) FBDEV(0): checking modes against monitor...
[ 9.905] (II) FBDEV(0): Virtual size is 1280x800 (pitch 1280)
[ 9.905] (**) FBDEV(0): Built-in mode "current"
[ 9.905] (==) FBDEV(0): DPI set to (96, 96)
Previously, these values were not modified. Moving the zero'ing of the
variables to drm_fb_helper_fill_var resolves the issue.
Fixes: ee4cce0 ("drm/fb-helper: fix input validation gaps in check_var")
Signed-off-by: Jon Mason <[email protected]>
Signed-off-by: Bruce Ashfield <[email protected]>1 parent 158025e commit d09eb27
1 file changed
+9
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1190 | 1190 | | |
1191 | 1191 | | |
1192 | 1192 | | |
1193 | | - | |
1194 | | - | |
1195 | 1193 | | |
1196 | 1194 | | |
1197 | 1195 | | |
1198 | 1196 | | |
1199 | 1197 | | |
1200 | 1198 | | |
1201 | 1199 | | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | 1200 | | |
1212 | 1201 | | |
1213 | 1202 | | |
| |||
1701 | 1690 | | |
1702 | 1691 | | |
1703 | 1692 | | |
| 1693 | + | |
1704 | 1694 | | |
1705 | 1695 | | |
1706 | 1696 | | |
| |||
1718 | 1708 | | |
1719 | 1709 | | |
1720 | 1710 | | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
1721 | 1719 | | |
1722 | 1720 | | |
1723 | 1721 | | |
| |||
0 commit comments