From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB41D2D7DF8 for ; Wed, 28 Jan 2026 12:21:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769602909; cv=none; b=CT7Jx/e0q43Vk9Juq9g+NkxD3UI877i0NFIlCEfmLtqQo3XYpfU3Ro+RI2HufqMWXIs5xUeD9oa387hj2/TmtB9eGtlTODrIBjmHGiBb5fKajuQLeKKXyu0NKVdQwgiN4HUeAHZXqhDL9cWHVHebIXKHK3nuxX0U6nQ1/9x5WaI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769602909; c=relaxed/simple; bh=2axliNpoULUQoNZ2ZhdfpnOgCYY4/D4ykB/mSQ+pVLM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ETBse4GP9pO4qE1HJKXhpHEeiCeOoOUhnDQl3d/eehbz2dZSKY3J/ZaV6v+LyMVfXWv0pLYuhePPa/qUA12YCE+qbPlBhiQ+n9jigE5bKFJdJdwhWuo0A326Do1NsJZyjFQlI+9anB4IreChZoebq+7clp1yIeRgTeKRxC9tB2Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=gcqvJK7j; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="gcqvJK7j" Received: from pendragon.ideasonboard.com (2001-14ba-703d-e500--2a1.rev.dnainternet.fi [IPv6:2001:14ba:703d:e500::2a1]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id C9662581; Wed, 28 Jan 2026 13:21:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1769602869; bh=2axliNpoULUQoNZ2ZhdfpnOgCYY4/D4ykB/mSQ+pVLM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gcqvJK7jB3w8awg8In8+nCPY+C1RSZy7fkEfAfbbvc/oGOEeBZ+hAEe0XgsuIUfbq GoY2ApTTE8q66nKkQMCLX/q9DKkQty3d9PrMmPLHvBZbVA8/0hePJCEzoIZdOVXbiY n3Zpkr2tLUqzkamuHdFOZePsdtMDrlJfdp7ORWgc= Date: Wed, 28 Jan 2026 14:21:44 +0200 From: Laurent Pinchart To: Tomi Valkeinen Cc: Vishal Sagar , Anatoliy Klymenko , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Michal Simek , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven , Dmitry Baryshkov , Pekka Paalanen , Dmitry Baryshkov Subject: Re: [PATCH v7 02/11] drm/fourcc: Add DRM_FORMAT_XV15/XV20 Message-ID: <20260128122144.GJ2558360@killaraus> References: <20251201-xilinx-formats-v7-0-1e1558adfefc@ideasonboard.com> <20251201-xilinx-formats-v7-2-1e1558adfefc@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20251201-xilinx-formats-v7-2-1e1558adfefc@ideasonboard.com> Hi Tomi, On Mon, Dec 01, 2025 at 02:18:44PM +0200, Tomi Valkeinen wrote: > Add two new pixel formats: > > DRM_FORMAT_XV15 ("XV15") > DRM_FORMAT_XV20 ("XV20") > > The formats are 2 plane 10 bit per component YCbCr, with the XV15 2x2 > subsampled whereas XV20 is 2x1 subsampled. > > Reviewed-by: Dmitry Baryshkov > Reviewed-by: Vishal Sagar > Signed-off-by: Tomi Valkeinen > --- > drivers/gpu/drm/drm_fourcc.c | 6 ++++++ > include/uapi/drm/drm_fourcc.h | 8 ++++++++ > 2 files changed, 14 insertions(+) > > diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c > index e662aea9d105..b22ef86428a1 100644 > --- a/drivers/gpu/drm/drm_fourcc.c > +++ b/drivers/gpu/drm/drm_fourcc.c > @@ -381,6 +381,12 @@ const struct drm_format_info *__drm_format_info(u32 format) > { .format = DRM_FORMAT_S416, .depth = 0, .num_planes = 3, > .char_per_block = { 2, 2, 2 }, .block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, > .hsub = 1, .vsub = 1, .is_yuv = true}, > + { .format = DRM_FORMAT_XV15, .depth = 0, .num_planes = 2, > + .char_per_block = { 4, 8, 0 }, .block_w = { 3, 3, 0 }, .block_h = { 1, 1, 0 }, > + .hsub = 2, .vsub = 2, .is_yuv = true }, Given the horizontal subsampling, don't we have 6 pixels in 8 bytes ? > + { .format = DRM_FORMAT_XV20, .depth = 0, .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 }, > }; > > unsigned int i; > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > index e527b24bd824..6c786701238e 100644 > --- a/include/uapi/drm/drm_fourcc.h > +++ b/include/uapi/drm/drm_fourcc.h > @@ -322,6 +322,14 @@ extern "C" { > #define DRM_FORMAT_RGB565_A8 fourcc_code('R', '5', 'A', '8') > #define DRM_FORMAT_BGR565_A8 fourcc_code('B', '5', 'A', '8') > > +/* > + * 2 plane 10 bit per component YCrCb > + * index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian > + * index 1 = Cb:Cr plane, [63:0] x:Cr2:Cb2:Cr1:x:Cb1:Cr0:Cb0 2:10:10:10:2:10:10:10 little endian > + */ > +#define DRM_FORMAT_XV15 fourcc_code('X', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane 2:10:10:10 */ > +#define DRM_FORMAT_XV20 fourcc_code('X', 'V', '2', '0') /* 2x1 subsampled Cr:Cb plane 2:10:10:10 */ > + > /* > * 2 plane YCbCr > * index 0 = Y plane, [7:0] Y -- Regards, Laurent Pinchart