Skip to content

Commit 1935f0d

Browse files
committed
drm/fb-helper: set x/yres_virtual in drm_fb_helper_check_var
Drivers are supposed to fix this up if needed if they don't outright reject it. Uncovered by 6c11df5 ("fbmem: Check virtual screen sizes in fb_set_var()"). Reported-by: [email protected] Link: https://syzkaller.appspot.com/bug?id=c5faf983bfa4a607de530cd3bb008888bf06cefc Cc: [email protected] # v5.4+ Cc: Daniel Vetter <[email protected]> Cc: Javier Martinez Canillas <[email protected]> Cc: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 77d08a2 commit 1935f0d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/drm_fb_helper.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,9 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
15891589
return -EINVAL;
15901590
}
15911591

1592+
var->xres_virtual = fb->width;
1593+
var->yres_virtual = fb->height;
1594+
15921595
/*
15931596
* Workaround for SDL 1.2, which is known to be setting all pixel format
15941597
* fields values to zero in some cases. We treat this situation as a

0 commit comments

Comments
 (0)