mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Vishal Sagar <vishal.sagar@amd.com>,
	Anatoliy Klymenko <anatoliy.klymenko@amd.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Michal Simek <michal.simek@amd.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 04/10] drm/fourcc: Add DRM_FORMAT_Y10_LE32
Date: Wed, 18 Dec 2024 14:03:30 +0200	[thread overview]
Message-ID: <a4949e09-b4f3-4224-80fc-913ab5dace64@ideasonboard.com> (raw)
In-Reply-To: <20241204-xilinx-formats-v1-4-0bf2c5147db1@ideasonboard.com>

Hi,

On 04/12/2024 11:31, Tomi Valkeinen wrote:
> Add Y10_LE32, a 10 bit greyscale format, with 3 pixels packed into
> 32-bit container.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> ---
>   drivers/gpu/drm/drm_fourcc.c  | 4 ++++
>   include/uapi/drm/drm_fourcc.h | 1 +
>   2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
> index d721d9fdbe98..6048e0a191dc 100644
> --- a/drivers/gpu/drm/drm_fourcc.c
> +++ b/drivers/gpu/drm/drm_fourcc.c
> @@ -327,6 +327,10 @@ const struct drm_format_info *__drm_format_info(u32 format)
>   		  .num_planes = 2, .char_per_block = { 4, 8, 0 },
>   		  .block_w = { 3, 3, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2,
>   		  .vsub = 1, .is_yuv = true },
> +		{ .format = DRM_FORMAT_Y10_LE32,        .depth = 0,
> +		  .num_planes = 1, .char_per_block =  { 4, 0, 0 },
> +		  .block_w = { 3, 0, 0 }, .block_h = { 1, 0, 0 }, .hsub = 1,
> +		  .vsub = 1, .is_yuv = true },
>   	};
>   
>   	unsigned int i;
> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
> index f79ee3b93f09..82f255eb3d1b 100644
> --- a/include/uapi/drm/drm_fourcc.h
> +++ b/include/uapi/drm/drm_fourcc.h
> @@ -408,6 +408,7 @@ extern "C" {
>   /* Greyscale formats */
>   
>   #define DRM_FORMAT_Y8		fourcc_code('G', 'R', 'E', 'Y')  /* 8-bit Y-only */
> +#define DRM_FORMAT_Y10_LE32	fourcc_code('Y', '1', '0', 'P')  /* [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian */

I realized that V4L2 already has "Y10P" fourcc: V4L2_PIX_FMT_Y10P, which 
is MIPI CSI style packed 10-bit format.

While it's not strictly speaking a problem, maybe it's best to try to 
avoid overlapping fourccs. So... "Y04P"? I'm being a bit inventive here 
=). 0 would be for "10". 4 as in 4 bytes. P for packed.

  Tomi


  reply	other threads:[~2024-12-18 12:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-04  9:31 [PATCH 00/10] drm: Add new pixel formats for Xilinx Zynqmp Tomi Valkeinen
2024-12-04  9:31 ` [PATCH 01/10] drm/fourcc: Add warning for bad bpp Tomi Valkeinen
2024-12-04 16:26   ` Sagar, Vishal
2024-12-18 11:49     ` Tomi Valkeinen
2024-12-18 14:35       ` Sagar, Vishal
2024-12-04  9:31 ` [PATCH 02/10] drm/fourcc: Add DRM_FORMAT_XV15/XV20 Tomi Valkeinen
2024-12-04  9:31 ` [PATCH 03/10] drm/fourcc: Add DRM_FORMAT_Y8 Tomi Valkeinen
2024-12-04  9:31 ` [PATCH 04/10] drm/fourcc: Add DRM_FORMAT_Y10_LE32 Tomi Valkeinen
2024-12-18 12:03   ` Tomi Valkeinen [this message]
2024-12-04  9:31 ` [PATCH 05/10] drm/fourcc: Add DRM_FORMAT_X403 Tomi Valkeinen
2024-12-04  9:31 ` [PATCH 06/10] drm: xlnx: zynqmp: Use drm helpers when calculating buffer sizes Tomi Valkeinen
2024-12-04  9:31 ` [PATCH 07/10] drm: xlnx: zynqmp: Add support for XV15 & XV20 Tomi Valkeinen
2024-12-04  9:31 ` [PATCH 08/10] drm: xlnx: zynqmp: Add support for Y8 and Y10_LE32 Tomi Valkeinen
2024-12-04  9:31 ` [PATCH 09/10] drm: xlnx: zynqmp: Add support for X403 Tomi Valkeinen
2024-12-04  9:31 ` [PATCH 10/10] drm: xlnx: zynqmp: Fix max dma segment size Tomi Valkeinen
2025-01-10 18:10   ` Sean Anderson

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=a4949e09-b4f3-4224-80fc-913ab5dace64@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=anatoliy.klymenko@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=michal.simek@amd.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=vishal.sagar@amd.com \
    /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®