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 63B09332EA0 for ; Thu, 23 Apr 2026 14:21:55 +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=1776954116; cv=none; b=FJrlEzn4Zjekk6SyzkrHpqcS6R8BEzqTw8MrlZ2/Je+r/pyoPjo5WofANAKrtBhXxTeUEMv/bm5GOV05mnlUPWhGtULjQ45NrehxSFc/ov4T238uEAvt8WfhMKpdlzqv2ToxzJb0woa1dz96xiQhohEbhQB8zeQv2dP6Kw23WbA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776954116; c=relaxed/simple; bh=eg74wjOEypEbnxxiyEFdSKXRuGixs62xUArGpDpOiJA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hWzqC/VLMeVY6/PJlvpWuWTz/FiZ5hnDOZhreYLCSutExtF0smELSf5KxquaaZ1Wenlsq9PGhDsHPheAiAd9OO6ruin5fBUoZvEd23fytklsnMdGd0YQ8F1LPplMTZ+Dn5kOKUebYgz4TynIdcyNMSvbwLojhdDwFKUEHWLH10s= 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=G/sJjcn0; 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="G/sJjcn0" 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 DCBE112D6; Thu, 23 Apr 2026 16:20:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1776954010; bh=eg74wjOEypEbnxxiyEFdSKXRuGixs62xUArGpDpOiJA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=G/sJjcn0733qO5ZQAFkByLrlgZ9t3mnEqWSZlem2sMMOyPGDy4YrlNH7CviQD17mw KhcMnTk/VHpqpB8EfkBtPmp2qVOoOCREa/+5qkiyXG35rqzB+97wDOQCVe9dU3oQUo VOqC+yEBYjqEMc+ieLVVRsX/vNzWKeY/IX04PodE= From: Tomi Valkeinen Date: Thu, 23 Apr 2026 17:21:15 +0300 Subject: [PATCH v10 04/11] drm/fourcc: Add DRM_FORMAT_XYYY2101010 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: 7bit Message-Id: <20260423-xilinx-formats-v10-4-c690c2b8ea89@ideasonboard.com> References: <20260423-xilinx-formats-v10-0-c690c2b8ea89@ideasonboard.com> In-Reply-To: <20260423-xilinx-formats-v10-0-c690c2b8ea89@ideasonboard.com> To: Vishal Sagar , Anatoliy Klymenko , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Laurent Pinchart , Michal Simek , Simon Ser 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 X-Mailer: b4 0.15-dev-c25d1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1822; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=eg74wjOEypEbnxxiyEFdSKXRuGixs62xUArGpDpOiJA=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBp6ir1IPaI87+IOPSJMOTPxR4XsrexwwPRrpwaV +6/myhPGAOJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCaeoq9QAKCRD6PaqMvJYe 9doHEACe3U2/6h5BGr3J5TPHqgM1+xXVDm5PgoSI+5ONH4ux3GSREFSA6F1LCxQh4z0IfEcFJHV gVAYs5QhkJzKuqvzdr4F/9bWY4tqdpj4LhWU34A0d8szATiV98ie8Thjuka7RLDAn5p9v1WDQV0 4XYJoDeLxMz9a03031IFOJqqmMJXBMGodBBUklEuB8Vv2eXGf81Vw+FD9fIbh+YtH2zvL+hKN3x H3JOah44U2QajBDO25BF4OBa00v+rLCazGZe4ibzzpiLVuW1yvqJacnBvZTWLJFsSMQIreWZySp 2N/vUBi5L/ef8e3rDW6VaIkR8fQCfbMExjToaDon9p2WunRxx4CVCgt0TpomV5kY8y/Ij7uO+0X hlHhk2mgQaKHAIPjl5W0/eL5oiwris6nFaRc9QdbNywGWNHW7pAfUyMaXuWndfHjGULYF4oXsrN IxvB7vyUFRrqjPd/EElvlvyilaHWj6OtWe3hFOh3ZjBjCyH0x60wazpKadYSQjjXRVBDGF+Ukvq IcSUWwmfYN+4Uxc7M8hmiickX6Gs0Xw+0ATH0B1e88ftsiPlpqabBQ38EjaF4W5TJh199R3lLm5 VeaHu/Nj93PK64qYxY04cXbUxIvff4kA0pOTQzIpFHtVunozbTnqTpuSBSp5NhT+pWTEcABpfPj 0rlM3Pczx5gMQjg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 Add XYYY2101010 ("YPA4"), a 10 bit greyscale format, with 3 pixels packed into 32-bit container, and two bits of padding. The fourcc for the format is 'YPA4', which comes from Y - Y only, P - packed, A - 10 (as in 0xA), 4 - 4 bytes. Reviewed-by: Vishal Sagar Reviewed-by: Pekka Paalanen Reviewed-by: Laurent Pinchart Reviewed-by: Simon Ser Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/drm_fourcc.c | 3 +++ include/uapi/drm/drm_fourcc.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index c30266b8d051..01761c553e7e 100644 --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c @@ -385,6 +385,9 @@ 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_XYYY2101010, .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 c5b64ed3b00a..472f95632640 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -468,6 +468,7 @@ extern "C" { */ #define DRM_FORMAT_Y8 fourcc_code('G', 'R', 'E', 'Y') /* 8-bit Y-only */ +#define DRM_FORMAT_XYYY2101010 fourcc_code('Y', 'P', 'A', '4') /* [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian */ /* * Format Modifiers: -- 2.43.0