From nobody Mon Dec 1 22:05:13 2025 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 4A1DC30BBA6 for ; Mon, 1 Dec 2025 12:19:28 +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=1764591569; cv=none; b=JznnGVp2gFMIzM25edw4UHt5uj+8tznTLdKACW/54iEgJCdcgvwiIp3lpVvEFPh0KWoCdA9yRHvRhnOjAs1m1F4undH6jsVWiUihwqH7FpRhWzliwcpiHv1tXEzuCjAu5Ztteti0Uq6urGY45/sxldZvE5B1ODPOIjXeHnuiomw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764591569; c=relaxed/simple; bh=ByjBVUei+ODI9OwRRSMJhh8nY+tr2DfcyXbhauCknhU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gT9uOI1YquvYgRlv8vI/XSyhqZfQ2QQxGfdawzUKsol2xSDUMhy+9xiKw/rmcVCekYdeFkcdaS7J3huALGctH5wBod8Bd5Xa+4HICq/lSOAswzPxrkuauYyLN9kA8ywjTGe440fClcihRE6y6Hl9arfR7cZbVtMc0TM8iuBWi8E= 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=I27oFRn4; 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="I27oFRn4" Received: from [127.0.1.1] (91-158-153-178.elisa-laajakaista.fi [91.158.153.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AE53F1857; Mon, 1 Dec 2025 13:17:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1764591428; bh=ByjBVUei+ODI9OwRRSMJhh8nY+tr2DfcyXbhauCknhU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=I27oFRn44TnEFbYgDXPEJcV0rvPvks6KvMMsDk5sa0cwbn8LYbL5nN8Gd1t+0GgC8 THaA+UQWR6KJqBL9vZ+pDkW6GWhI53AeK2TINd5NXJsQ3vMVrZHPaNRdx2C9cgBQ12 0errFXmV6DXEHQR2rt1X6beb0JB/J978KM/Idbzc= From: Tomi Valkeinen Date: Mon, 01 Dec 2025 14:18:44 +0200 Subject: [PATCH v7 02/11] drm/fourcc: Add DRM_FORMAT_XV15/XV20 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-Transfer-Encoding: quoted-printable Message-Id: <20251201-xilinx-formats-v7-2-1e1558adfefc@ideasonboard.com> References: <20251201-xilinx-formats-v7-0-1e1558adfefc@ideasonboard.com> In-Reply-To: <20251201-xilinx-formats-v7-0-1e1558adfefc@ideasonboard.com> To: Vishal Sagar , Anatoliy Klymenko , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Laurent Pinchart , Michal Simek Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven , Dmitry Baryshkov , Pekka Paalanen , Tomi Valkeinen , Dmitry Baryshkov X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2251; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=ByjBVUei+ODI9OwRRSMJhh8nY+tr2DfcyXbhauCknhU=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBpLYfCKMP7YbbSN1PJCnhkAr7BsGY6TGUJqNhPe x2UvyE1c4GJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCaS2HwgAKCRD6PaqMvJYe 9QsgD/9PlUHZV4eNlUJEU4INjX/3QZq+p3FzEj9nnX5emxr0Z4U8erT3/9ZIwALzl/92Kn/K7QO x7QTNdDUteu1MoW6JKuQ3TBYvwzMO9vfHgKPwQi5Zq8QM/0sSUR/7f7RqnSwyGXLmS415aGa0gX sgKL/qiotPq4nKiedHk0wQL8kdqMX62hTzeveS+VZ/dcIEtDBrLAEgbKuArR93uygJ3Gp2k6MIN bp+g3AvBMXJ1fytHSWlDaXdBxIkSHwRmCkfkyA94QCXcyb6uDIEWAsu9HhDlB1dqmg7sYxVqrRR DqxSvEPSqbqiPVu7eqaQ74PnzR/rFPrSRU73R0Gz6sbjmsYQUQydqwhENvmcbWM0VLt6PfEZxtE TPBEMFMd9mRcnVKZu2BCq8WfRcXsJrdyVesVn40e9sAeadkFi3IughO17f0K7K/ww+8KIhaPX+Q CLrsSwproLz41rfXGLPrwavdchqWRs6gC3kiHuFYGRjpsM3U0yoQTuVPfN5WweSDUbaZKygoGnq 4owx+0l0ivVU8/rBkEf/OnvEY5Qn3O21lJuDKQp5Z9DxFmEaShGfK4DSJFtikbTSWsrYhOsCvbU FnGUpIg0yJLszWs+68tUBF05AQhYTYhpC2xNneSPMQzOUA37HsISg18jtrhhpr9Uja8oL0KVoMi Tzq4hzhP7Ls+0dw== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 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 fo= rmat) { .format =3D DRM_FORMAT_S416, .depth =3D 0, .num_planes =3D= 3, .char_per_block =3D { 2, 2, 2 }, .block_w =3D { 1, 1, 1 }, .block_h = =3D { 1, 1, 1 }, .hsub =3D 1, .vsub =3D 1, .is_yuv =3D true}, + { .format =3D DRM_FORMAT_XV15, .depth =3D 0, .num_planes =3D 2, + .char_per_block =3D { 4, 8, 0 }, .block_w =3D { 3, 3, 0 }, .block_h = =3D { 1, 1, 0 }, + .hsub =3D 2, .vsub =3D 2, .is_yuv =3D true }, + { .format =3D DRM_FORMAT_XV20, .depth =3D 0, .num_planes =3D 2, + .char_per_block =3D { 4, 8, 0 }, .block_w =3D { 3, 3, 0 }, .block_h = =3D { 1, 1, 0 }, + .hsub =3D 2, .vsub =3D 1, .is_yuv =3D true }, }; =20 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') =20 +/* + * 2 plane 10 bit per component YCrCb + * index 0 =3D Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian + * index 1 =3D 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 =3D Y plane, [7:0] Y --=20 2.43.0