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 8C1A130C359 for ; Mon, 1 Dec 2025 12:19:29 +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=1764591571; cv=none; b=VhwJN53COvLWoNo2+peTsd9n3YkG+lcEo+VvXmC3M9WPj2Wez7JouvOgC9MexQXWIyKBTl6LQTOY0/v9OVbXGkRumhHjo2vTltIUIO6KwNAJu6F862lDu8NaoDSCgT3X8bnFQFnaXGSiDKp3S1kExdI0XSSOONA4+lBfDtyAzlU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764591571; c=relaxed/simple; bh=2J3UNCS2/jDSpZlnMD/4+dbyyEtbbjNOHSmRZ5pdy68=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=H7UqmZ4SyIMXwzo3pIC7ZHPKmcUbUSGmhWxQ4VJoWTapuYKwN0fu2JBE5qF6xUzLHep0GNWkLL3koYWoNJPhOXnJr0uXt7y4yhdPzSnEtYwWoMk8PF+U759wp9kITECOTeg7dyaW/VG6mVEHrw2JF9NwBr3+6TXY/NKFLUJN6fo= 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=keQbG9AK; 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="keQbG9AK" 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 B091E18B1; Mon, 1 Dec 2025 13:17:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1764591429; bh=2J3UNCS2/jDSpZlnMD/4+dbyyEtbbjNOHSmRZ5pdy68=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=keQbG9AK0UHuUoZFm+gQpGRjeudLTp2HCq/rrBuyT+4ELBpIbR+dTWTscdDZ7SDky 8g1QTy1arQDBY9CWgKmvnoIPcLoiUnvBjZfIimJOg1nNrlWH4putSo048pD3Tpccnp aGT8raZvvK1aW/s+BWBjFTCnsZL5YIvSEB0kpKfU= From: Tomi Valkeinen Date: Mon, 01 Dec 2025 14:18:45 +0200 Subject: [PATCH v7 03/11] drm/fourcc: Add DRM_FORMAT_Y8 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-3-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 , Pekka Paalanen , Dmitry Baryshkov X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2389; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=2J3UNCS2/jDSpZlnMD/4+dbyyEtbbjNOHSmRZ5pdy68=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBpLYfDOYy/pm5VblG+On3RIiXQzGnX8zp4MhsQY yO67eBKoU6JAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCaS2HwwAKCRD6PaqMvJYe 9WsaEACfeQgvfQlKgOyDXZyokV8wxUHkLOAXZgrDLj3vVdlvjdVas4WLjh50qufgTnOxq7UORiR +mgDYLiL36ydpg0cJ6mZtdo8AwDDALcTCBCxRsuIFrIfxYZ/QvNb1I0tW7XnhbtJ/Sg9mACICfv z7nlog/LI810wjEYeevdJbvWFHjiMW7rx6VJEh4VQVOhPKxKSIYUZ0yl0EviOeheN4NVT10I2qx oe4d/xL7aZ3Fgo+Gkzuv42H/y/RHgBWLPHKDkHebQ0oOexqZyM4qI9yDXLOFIhUrH7jSSB0frMF BaRlq1YIoQ6kIg81yuc+r9k79vL5xFBg8aYhlwGTdKE/BvevfmjWQFqlAxzKRgWHKPixX8NWbPh qDdqVKcPwtBx+6AdGmjB5A2f0gKJRvAs8ecaW/5CuyBw3HCYYZ0UFXsev8wOTl67jBuulXx2jRV 3qp762Nw+j7EnyGftPlAA3AaJ6TSZUwxmBDH9kECBnybwng+vk1P69Jc6Opzer4loujpYHxgfPo ahWb15Y8PnXm712aq3UacaHfjXkxH5WsKGFMUE94WMM0f3qaXPQKwe//HYoadkryAt/7OPmU3mg Bvj2UQ5mq3TsjuLSo1guGw3dVD6SWDHC4fMjSmDDq37v7JUZecik/IawvV1Mqt6XEWdZGDQD+8G Kzv0vbDjgQA4ElA== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 Add greyscale Y8 format. Acked-by: Dmitry Baryshkov Reviewed-by: Pekka Paalanen Reviewed-by: Vishal Sagar Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_fourcc.c | 1 + include/uapi/drm/drm_fourcc.h | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index b22ef86428a1..a39b9d7a5b62 100644 --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c @@ -275,6 +275,7 @@ const struct drm_format_info *__drm_format_info(u32 for= mat) { .format =3D DRM_FORMAT_YVU422, .depth =3D 0, .num_planes =3D 3, .cpp= =3D { 1, 1, 1 }, .hsub =3D 2, .vsub =3D 1, .is_yuv =3D true }, { .format =3D DRM_FORMAT_YUV444, .depth =3D 0, .num_planes =3D 3, .cpp= =3D { 1, 1, 1 }, .hsub =3D 1, .vsub =3D 1, .is_yuv =3D true }, { .format =3D DRM_FORMAT_YVU444, .depth =3D 0, .num_planes =3D 3, .cpp= =3D { 1, 1, 1 }, .hsub =3D 1, .vsub =3D 1, .is_yuv =3D true }, + { .format =3D DRM_FORMAT_Y8, .depth =3D 8, .num_planes =3D 1, .cpp =3D= { 1, 0, 0 }, .hsub =3D 1, .vsub =3D 1, .is_yuv =3D true }, { .format =3D DRM_FORMAT_NV12, .depth =3D 0, .num_planes =3D 2, .cpp = =3D { 1, 2, 0 }, .hsub =3D 2, .vsub =3D 2, .is_yuv =3D true }, { .format =3D DRM_FORMAT_NV21, .depth =3D 0, .num_planes =3D 2, .cpp = =3D { 1, 2, 0 }, .hsub =3D 2, .vsub =3D 2, .is_yuv =3D true }, { .format =3D DRM_FORMAT_NV16, .depth =3D 0, .num_planes =3D 2, .cpp = =3D { 1, 2, 0 }, .hsub =3D 2, .vsub =3D 1, .is_yuv =3D true }, diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index 6c786701238e..5cfc188c4e72 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -459,6 +459,16 @@ extern "C" { #define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsample= d Cb (1) and Cr (2) planes */ #define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsample= d Cr (1) and Cb (2) planes */ =20 +/* + * Y-only (greyscale) formats + * + * The Y-only formats are handled similarly to the YCbCr formats in the di= splay + * pipeline, with the Cb and Cr implicitly neutral (0.0 in nominal values)= . This + * also means that COLOR_RANGE property applies to the Y-only formats. + * + */ + +#define DRM_FORMAT_Y8 fourcc_code('G', 'R', 'E', 'Y') /* 8-bit Y-only */ =20 /* * Format Modifiers: --=20 2.43.0