[PATCH 2/2] drm/fb-helper: Add a FIXME that generic_setup is very confusing
Daniel Vetter
daniel at ffwll.ch
Tue Dec 22 11:18:11 UTC 2020
On Tue, Dec 22, 2020 at 09:00:43AM +0000, Simon Ser wrote:
> On Tuesday, December 22nd, 2020 at 9:55 AM, Daniel Vetter <daniel at ffwll.ch> wrote:
>
> > On Fri, Dec 11, 2020 at 05:11:13PM +0100, Daniel Vetter wrote:
> > > 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 <daniel.vetter at intel.com>
> > > Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> > > Cc: Maxime Ripard <mripard at kernel.org>
> > > Cc: Thomas Zimmermann <tzimmermann at suse.de>
> > > Cc: David Airlie <airlied at linux.ie>
> > > Cc: Daniel Vetter <daniel at ffwll.ch>
> >
> > Anyone feeling like an ack on this one?
>
> From my limited understanding of fbdev, this FIXME sounds correct to me.
>
> Acked-by: Simon Ser <contact at emersion.fr>
Thanks for taking a look, patch pushed to drm-misc-next.
-Daniel
>
> > > ---
> > > drivers/gpu/drm/drm_fb_helper.c | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> > > index 596255edf023..27deed4af015 100644
> > > --- a/drivers/gpu/drm/drm_fb_helper.c
> > > +++ b/drivers/gpu/drm/drm_fb_helper.c
> > > @@ -2494,6 +2494,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)
> > > --
> > > 2.29.2
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list