mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Louis Chauvet <louis.chauvet@bootlin.com>
To: Renjun Wang <renjunw0@foxmail.com>,
	hamohammed.sa@gmail.com, simona@ffwll.ch, melissa.srw@gmail.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, airlied@gmail.com,
	dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drm/vkms: Add YUV410, YUV411, YVU410, and YVU411 support
Date: Fri, 6 Feb 2026 14:53:34 +0100	[thread overview]
Message-ID: <4e8f0724-d747-4712-854c-c231a31e9e2c@bootlin.com> (raw)
In-Reply-To: <tencent_6033C535EB4984626B679256F0A439587007@qq.com>



On 2/2/26 16:11, Renjun Wang wrote:
> Add support for the following planar YUV formats:
> - DRM_FORMAT_YUV410
> - DRM_FORMAT_YUV411
> - DRM_FORMAT_YVU410
> - DRM_FORMAT_YVU411
> 
> These formats are handled by the existing planar_yuv_read_line()
> function, which correctly handles the subsampling defined in each
> format's drm_format_info.
> 
> The YVU variants (YVU410, YVU411) are also added to
> get_conversion_matrix_to_argb_u16() to ensure the U and V columns
> are swapped correctly in the conversion matrix.

Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>

> v2:
>   - update vkms_formats[] to add new formats.
> 
> Signed-off-by: Renjun Wang <renjunw0@foxmail.com>
> ---
>   drivers/gpu/drm/vkms/vkms_formats.c | 6 ++++++
>   drivers/gpu/drm/vkms/vkms_plane.c   | 4 ++++
>   2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c
> index dfb8e13cba87..5ef5d49a44ef 100644
> --- a/drivers/gpu/drm/vkms/vkms_formats.c
> +++ b/drivers/gpu/drm/vkms/vkms_formats.c
> @@ -730,9 +730,13 @@ pixel_read_line_t get_pixel_read_line_function(u32 format)
>   	case DRM_FORMAT_P012:
>   	case DRM_FORMAT_P016:
>   		return &YUV161616_semiplanar_read_line;
> +	case DRM_FORMAT_YUV410:
> +	case DRM_FORMAT_YUV411:
>   	case DRM_FORMAT_YUV420:
>   	case DRM_FORMAT_YUV422:
>   	case DRM_FORMAT_YUV444:
> +	case DRM_FORMAT_YVU410:
> +	case DRM_FORMAT_YVU411:
>   	case DRM_FORMAT_YVU420:
>   	case DRM_FORMAT_YVU422:
>   	case DRM_FORMAT_YVU444:
> @@ -921,6 +925,8 @@ void get_conversion_matrix_to_argb_u16(u32 format,
>   	memcpy(matrix, matrix_to_copy, sizeof(*matrix_to_copy));
>   
>   	switch (format) {
> +	case DRM_FORMAT_YVU410:
> +	case DRM_FORMAT_YVU411:
>   	case DRM_FORMAT_YVU420:
>   	case DRM_FORMAT_YVU422:
>   	case DRM_FORMAT_YVU444:
> diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
> index 19fe6acad306..44773a82fbfd 100644
> --- a/drivers/gpu/drm/vkms/vkms_plane.c
> +++ b/drivers/gpu/drm/vkms/vkms_plane.c
> @@ -35,9 +35,13 @@ static const u32 vkms_formats[] = {
>   	DRM_FORMAT_NV21,
>   	DRM_FORMAT_NV61,
>   	DRM_FORMAT_NV42,
> +	DRM_FORMAT_YUV410,
> +	DRM_FORMAT_YUV411,
>   	DRM_FORMAT_YUV420,
>   	DRM_FORMAT_YUV422,
>   	DRM_FORMAT_YUV444,
> +	DRM_FORMAT_YVU410,
> +	DRM_FORMAT_YVU411,
>   	DRM_FORMAT_YVU420,
>   	DRM_FORMAT_YVU422,
>   	DRM_FORMAT_YVU444,


      reply	other threads:[~2026-02-06 13:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 15:11 Renjun Wang
2026-02-06 13:53 ` Louis Chauvet [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e8f0724-d747-4712-854c-c231a31e9e2c@bootlin.com \
    --to=louis.chauvet@bootlin.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=melissa.srw@gmail.com \
    --cc=mripard@kernel.org \
    --cc=renjunw0@foxmail.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®