[PATCH v2] drm/fb-helper: Scale back depth to supported maximum

Linus Walleij linus.walleij at linaro.org
Thu Jan 10 09:19:19 UTC 2019


On Fri, Dec 28, 2018 at 5:05 PM Daniel Vetter <daniel at ffwll.ch> wrote:
> On Fri, Dec 28, 2018 at 4:40 PM Linus Walleij <linus.walleij at linaro.org> wrote:

> > - Skip over YUV formats. The framebuffer emulation cannot
> >   handle these formats.
(...)
> > +                       /* Do not consider YUV formats for framebuffers */
> > +                       if (fmt->is_yuv)
>
> I think better to skip all funny formats with fmt->depth == 0. With that:
>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

I can easily make that change but this comment in the drm_fourcc.h
header makes me insecure:

/**
 * @depth:
 *
 * Color depth (number of bits per pixel excluding padding bits),
 * valid for a subset of RGB formats only. This is a legacy field, do
 * not use in new code and set to 0 for new formats.
 */
u8 depth;

This would mean that we make the framebuffer only support
"legacy formats". It might be that "legacy formats" include
all reasonable ones such as any RGB/BGA variants.

I will make the change and put in some comments about this
so it's clear.

Yours,
Linus Walleij


More information about the dri-devel mailing list