Skip to content

Commit 12ffed9

Browse files
Michel Dänzerdanvet
authored andcommitted
drm/fb-helper: Allow var->x/yres(_virtual) < fb->width/height again
Otherwise this can also prevent modesets e.g. for switching VTs, when multiple monitors with different native resolutions are connected. The depths must match though, so keep the != test for that. Also update the DRM_DEBUG output to be slightly more accurate, this doesn't only affect requests from userspace. Bugzilla: https://bugs.freedesktop.org/99841 Fixes: 865afb1 ("drm/fb-helper: reject any changes to the fbdev") Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 97da385 commit 12ffed9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/drm_fb_helper.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,9 +1260,9 @@ int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
12601260
* to KMS, hence fail if different settings are requested.
12611261
*/
12621262
if (var->bits_per_pixel != fb->format->cpp[0] * 8 ||
1263-
var->xres != fb->width || var->yres != fb->height ||
1264-
var->xres_virtual != fb->width || var->yres_virtual != fb->height) {
1265-
DRM_DEBUG("fb userspace requested width/height/bpp different than current fb "
1263+
var->xres > fb->width || var->yres > fb->height ||
1264+
var->xres_virtual > fb->width || var->yres_virtual > fb->height) {
1265+
DRM_DEBUG("fb requested width/height/bpp can't fit in current fb "
12661266
"request %dx%d-%d (virtual %dx%d) > %dx%d-%d\n",
12671267
var->xres, var->yres, var->bits_per_pixel,
12681268
var->xres_virtual, var->yres_virtual,

0 commit comments

Comments
 (0)