lkml.org 
[lkml]   [2022]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 06/10] drm/fb-helper: Add support for DRM_FORMAT_C[124]
Hi Javier,

On Wed, Mar 9, 2022 at 2:10 PM Javier Martinez Canillas
<javierm@redhat.com> wrote:
> On 3/7/22 21:52, Geert Uytterhoeven wrote:
> > Add support for color-indexed frame buffer formats with two, four, and
> > sixteen colors to the DRM framebuffer helper functions:
> > 1. Add support for 1, 2, and 4 bits per pixel to the damage helper,
> > 2. For color-indexed modes, the length of the color bitfields must be
> > set to the color depth, else the logo code may pick a logo with too
> > many colors. Drop the incorrect DAC width comment, which
> > originates from the i915 driver.
> > 3. Accept C[124] modes when validating or filling in struct
> > fb_var_screeninfo, and use the correct number of bits per pixel.
> > 4. Set the visual to FB_VISUAL_PSEUDOCOLOR for all color-indexed
> > modes.
> >
> > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
>
> [snip]
>
> > static void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
> > - uint32_t depth)
> > + bool is_color_indexed)
> > {
> > info->fix.type = FB_TYPE_PACKED_PIXELS;
> > - info->fix.visual = depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
> > - FB_VISUAL_TRUECOLOR;
> > + info->fix.visual = is_color_indexed ? FB_VISUAL_PSEUDOCOLOR
> > + : info->fix.visual;
>
> Shouldn't this be the following instead ?
>
> + info->fix.visual = is_color_indexed ? FB_VISUAL_PSEUDOCOLOR
> + : FB_VISUAL_TRUECOLOR;

Indeed. Will fix in v3.
Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

\
 
 \ /
  Last update: 2022-03-09 14:15    [W:23.541 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site