Re: [PATCH 2/3] drm/format-helper: Add RGB888-to-XRGB8888 conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/21/22 20:17, Thomas Zimmermann wrote:
> Add a format helper that converts RGB888 to XRGB8888. Use this
> function in drm_fb_blit_toio(). Fixes simpledrm output for this
> combination of formats.
>

I think the examples you have in the cover letter are quite illustrative,
maybe I would mention an example in the commit description as well.

> Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
> ---

[snip]

> +
> +static void drm_fb_rgb888_to_xrgb8888_toio(void __iomem *dst, unsigned int dst_pitch,
> +					   const void *vaddr, const struct drm_framebuffer *fb,
> +					   const struct drm_rect *clip)
> +{
> +	size_t linepixels = clip->x2 - clip->x1;

drm_rect_width(clip) instead ?

> +	size_t dst_len = linepixels * 4;
> +	unsigned int y, lines = clip->y2 - clip->y1;
and drm_rect_height(clip) ?

> +	void *dbuf;
> +
Reviewed-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>

-- 
Best regards,

Javier Martinez Canillas
Linux Engineering
Red Hat




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux