Re: [PATCH v2 5/6] drm: add drm_fb_xrgb8888_to_rgb888() function to drm_fb_helper.c

From: Sam Ravnborg
Date: Thu Apr 04 2019 - 13:16:15 EST


Hi Gerd.

On Thu, Apr 04, 2019 at 05:24:29PM +0200, Gerd Hoffmann wrote:
> Like drm_fb_xrgb8888_to_rgb565() but converts to 24bpp (DRM_FORMAT_RGB888).
>
> Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
> ---
> include/drm/drm_fb_helper.h | 4 +++
> drivers/gpu/drm/drm_fb_helper.c | 49 +++++++++++++++++++++++++++++++++
> 2 files changed, 53 insertions(+)
>
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index 1406057e1a93..a6e56fcd948e 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -648,5 +648,9 @@ void drm_fb_xrgb8888_to_rgb565(u16 *dst, void *vaddr,
> struct drm_framebuffer *fb,
> struct drm_rect *clip,
> bool swap, bool dstclip);
> +void drm_fb_xrgb8888_to_rgb888(u8 *dst, void *vaddr,
> + struct drm_framebuffer *fb,
> + struct drm_rect *clip,
> + bool dstclip);
We have here three functions that take a *dst parameter:

void *dst
u8 *dst
u16 *dst

My OCD triggers when things like this is not consistent.
But that said I see why the three implementations takes three different types.

Something I noticed, so passed in onwards to you.
Feel free to ignore.

Sam