From: Daniel Vetter Date: Fri, 11 Dec 2020 16:11:13 +0000 (+0100) Subject: drm/fb-helper: Add a FIXME that generic_setup is very confusing X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=14c1e12ba605d8770cae3e8078e520365daca921;p=linux.git drm/fb-helper: Add a FIXME that generic_setup is very confusing I tried to fix this for real, but it's very sprawling and lots of drivers get this mildly wrong one way or the other. Signed-off-by: Daniel Vetter Acked-by: Simon Ser Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20201211161113.3350061-2-daniel.vetter@ffwll.ch --- diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 5ad19785daee2..a44c3a4380592 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -2496,6 +2496,11 @@ void drm_fbdev_generic_setup(struct drm_device *dev, return; } + /* + * FIXME: This mixes up depth with bpp, which results in a glorious + * mess, resulting in some drivers picking wrong fbdev defaults and + * others wrong preferred_depth defaults. + */ if (!preferred_bpp) preferred_bpp = dev->mode_config.preferred_depth; if (!preferred_bpp)