From nobody Tue Feb 10 04:03:09 2026 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 40BBD331A4D for ; Wed, 28 Jan 2026 17:26:07 +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=1769621170; cv=none; b=MXB4DbgcMr+WcV9JEN5y28dWBUneLkF9i/jPrxuRiQBwAfOFTFB9U+QxrcIePTwjx9Xoot+4NHj4HWhJZE3YEErhdYmjgDS0KLBYoNq1W1/5eiYOMNCEX7uyiasqKhz9STpnxhzdcY9f6B8L/k9UIcte/dUhnlZ3YfdRYjpQLxE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769621170; c=relaxed/simple; bh=zo3E+kZdWqIorpMyEBd9Er+LXVGU2QxSaPw3bUA8z9g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=T7/uKK/TKgnijcpRGEUpsYimj8tyXwyIhyj5keavY4+8x75smtRqTONj9ALISJvq6KzI6B/paAvbcfBc9zYmZ7FT9tRulG2p8OtuV3Rzf6k1UZyFoabqQ8sSvyfFiXqLpOLcaQWl+1v/rJivv3Wncah02c91aOI2RspTgG4fMMo= 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=BbozAYva; 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="BbozAYva" 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 5D9AB1F37; Wed, 28 Jan 2026 18:25:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1769621125; bh=zo3E+kZdWqIorpMyEBd9Er+LXVGU2QxSaPw3bUA8z9g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=BbozAYvaDCYltBtMTqJkOQ5d88nFHAuDH0wbASfPtawlQjjk4AWBc5xMzl215pk41 C/Ww6oNju4kE1u3VxoMLa1/lCCs9umAvCjiPPA7LbqsKw/TPLBCVA4cMeUDdrt7UCu C3Xteq+61djcLTGR+dqxNA9XVIgUfxj/PkIb8kJg= From: Tomi Valkeinen Date: Wed, 28 Jan 2026 19:25:27 +0200 Subject: [PATCH v8 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: <20260128-xilinx-formats-v8-2-9ea8adb70269@ideasonboard.com> References: <20260128-xilinx-formats-v8-0-9ea8adb70269@ideasonboard.com> In-Reply-To: <20260128-xilinx-formats-v8-0-9ea8adb70269@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=2318; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=zo3E+kZdWqIorpMyEBd9Er+LXVGU2QxSaPw3bUA8z9g=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBpekajx8Vv7DIfy5TM8alkWA1fG2Rtp5f13EG0w 63Cp72K3ROJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCaXpGowAKCRD6PaqMvJYe 9ZzWD/9/cmtvts0zs40zA8R1KXnDT9IU61ZO+T2iZn9fDjKPRjGlBsmUZndVgK3FyzeYePPcorH Q8NzUohiS4LiddqRTNTZD8Jf04T4WRSB6xZ5S4SMWt88Y19BNJ7dhwfFGaB4vXeQqgGe0d93XtX 5sUM9LXBp8wvWewzxIluyKgHIKLAM0rDp5srO7zjnRPOzZk5PDbh+S7bt+JJObjsADf7hxeMeDl 6DDvjiFnhbnsMyLpPefM8eTZVbdq9FcqsDhJrGpv172o1UUGD8iDYRhf7ldWcTUiZdjmNMmikwn L2ncVG36MfJGzf3y2UA5UljT9RQA9aYaTmwZudWxqPMRs/F6Lq8wPIA3zFbRDhBlyyc5+FP9Ge8 V2GHYSplVB6WwK/OJqHmKVpm4fVaDDEYBgLqdtfEaDsHnLfDXwQ2Ts++lhyh+KFNoIVwnihncNS 45ZaD9BFK1lPRQMnmOkxcgRHFc/Fa1HqTxzTNsl4e1RIgqX2wQKROP29p+zEU5o1lZw0CFQg4bq Q0uu8YSGRV6gwNiyM+v20yEAGQPVMLJVA2I3yGt6brhrwqI9VqdPJA+Hf7ezk9wbq41z/0Zv1uM uQ9Eavja1ByVKhh9fBjZ3SYX/LbIT5Xhx75Z3UpuizOjIXnTNxFy0T8TuoFcGlF3CHrwb80rtTj xlSf/zNMNxrRm1A== 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 Reviewed-by: Laurent Pinchart 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