From patchwork Thu Dec 1 08:42:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13061062 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BE563C43217 for ; Thu, 1 Dec 2022 08:44:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0816910E569; Thu, 1 Dec 2022 08:44:12 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4DC3810E564 for ; Thu, 1 Dec 2022 08:44:06 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 2EC985C019B; Thu, 1 Dec 2022 03:44:05 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 01 Dec 2022 03:44:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1669884245; x= 1669970645; bh=TX/MScXZxpNxZTAh0bNCmzZ4iPPWT3jFBiNkEbs/bfg=; b=C twsgzy/h00ZTJAp7wNWiJ//zQRPuf6rULPU6szi3E6cqQqRU4TjiMFmN7McrWFVD 1vPMv7qf+2z19X8Ij0sI1Ndyk1h6Q2VFTjzKY+ulmNvXjBxpMfWaJZLV+8uUKm9N pnIbfFh70MxNRydMF3TE153AN2UqwQId1NsouUIhXnEsz+4J1x1Fw33eL1mDvOCq XNz58hMAOLQFUn+kVW1dwS02v5cnpSpTMsMEDTLiXpj0PTYl3ukPkbh/ttgOKlmf V4uoWP4uL420Ku22ZNpyvdxp6wXcs/iamCATp8nrsWxE2WyVWvCzuagGcBhU/Se8 LVmgdkjooz0dGrhm2dxNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669884245; x= 1669970645; bh=TX/MScXZxpNxZTAh0bNCmzZ4iPPWT3jFBiNkEbs/bfg=; b=Y g4a6U+5PbGwODcNctTU3WFl09JcoukdYPamwFqrbN/paEgGNIOxi93wmj7ax0Uls kEsmTJ42M4VpZfMMPHIdgnhQ9xT39epwLprHGSssRGeCyTw+5hg30j/ozJTrtqZc QzS5Zk/HjRvtGKsDubP09wlShT1G9ZIPHQii1WmT6MYfpvFS70WRWeQ0epj7AAXY 20LS/Ls6khelK0559MYqw0he2Bzm4sqqOBRIt8vU7vqgMXHZ/ewAssLsnzj4lluO b8oQK12qKVdlt/OnO4Aee1+bo0D9Xlr//5fdBQUi8FCTQy3eY78ZATskit5C0sJ/ UX0ZM4H5K9lhF6bWjWZxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdeggdduvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepudduudfhveejteefgedvffdvvedvjedugedukeejhedtlefhffevtefh jeeltdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Dec 2022 03:44:04 -0500 (EST) From: Maxime Ripard Date: Thu, 01 Dec 2022 09:42:46 +0100 Subject: [PATCH v3 1/7] media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI MIME-Version: 1.0 Message-Id: <20221013-rpi-dpi-improvements-v3-1-eb76e26a772d@cerno.tech> References: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> In-Reply-To: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> To: Maxime Ripard , Daniel Vetter , Rob Herring , David Airlie , Emma Anholt , Eric Anholt X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2502; i=maxime@cerno.tech; h=from:subject:message-id; bh=YXd9LPnxRpkmzoRCAwiTId6gqHz9INfpDDgXEGCA3q0=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMkdmWz+n1qzJmZYH73wtCWPb7MJF9d62XsquRotb1ReHZRd pVvZUcrCIMbFICumyBIjbL4k7tSs151sfPNg5rAygQxh4OIUgIm8jmVk2HdT0PRkXtMT76VC79wXuD o94J978fJ+fnOpN3aOsW86/RgZ1s14ath32/2tqL3p65bV8p3751y+1cboe2Wz6fQPD/7UMgAA X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Pinchart , Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Joerg Quinten , Laurent Pinchart , Chris Morgan , Maxime Ripard Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Chris Morgan Add the MEDIA_BUS_FMT_RGB565_1X24_CPADHI format used by the Geekworm MZP280 panel for the Raspberry Pi. Signed-off-by: Chris Morgan Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard --- .../userspace-api/media/v4l/subdev-formats.rst | 37 ++++++++++++++++++++++ include/uapi/linux/media-bus-format.h | 3 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst index d21d532eee15..aa549c42e798 100644 --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst @@ -1023,6 +1023,43 @@ The following tables list existing packed RGB formats. - b\ :sub:`2` - b\ :sub:`1` - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB565-1X24_CPADHI: + + - MEDIA_BUS_FMT_RGB565_1X24_CPADHI + - 0x1022 + - + - + - + - + - + - + - + - + - + - 0 + - 0 + - 0 + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - 0 + - 0 + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - 0 + - 0 + - 0 + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` * .. _MEDIA-BUS-FMT-BGR888-1X24: - MEDIA_BUS_FMT_BGR888_1X24 diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h index ec3323dbb927..8e159e6b4d21 100644 --- a/include/uapi/linux/media-bus-format.h +++ b/include/uapi/linux/media-bus-format.h @@ -34,7 +34,7 @@ #define MEDIA_BUS_FMT_FIXED 0x0001 -/* RGB - next is 0x1022 */ +/* RGB - next is 0x1023 */ #define MEDIA_BUS_FMT_RGB444_1X12 0x1016 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002 @@ -48,6 +48,7 @@ #define MEDIA_BUS_FMT_RGB666_1X18 0x1009 #define MEDIA_BUS_FMT_RBG888_1X24 0x100e #define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015 +#define MEDIA_BUS_FMT_RGB565_1X24_CPADHI 0x1022 #define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010 #define MEDIA_BUS_FMT_BGR888_1X24 0x1013 #define MEDIA_BUS_FMT_BGR888_3X8 0x101b From patchwork Thu Dec 1 08:42:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13061061 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E10D0C47088 for ; Thu, 1 Dec 2022 08:44:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7518210E567; Thu, 1 Dec 2022 08:44:11 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id D35E510E564 for ; Thu, 1 Dec 2022 08:44:07 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3A4195C0196; Thu, 1 Dec 2022 03:44:07 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 01 Dec 2022 03:44:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1669884247; x= 1669970647; bh=hUh+dINDYfVicqmxW17xJxoMlwEEp1x/t2PLssyMhf4=; b=I xkqofr+mmdZwzgCkaYwXuK6Isijm5s2CnzIIIEUDvORgl6RLU9W26SzJF4ZvC/Kw LGxZACBbXzoQe4MBWkhUVeT7/EYhmymNFIZJbLhWjdkXTUeRVXhHSQmIopGDpFXD C/5BpGJFG6Wv+80pgofTboKZZZNDQ4jX5RFYATIqfJu8YPfTaCEYxAUSWhMvgaYn 3lxP/USCzNM0IjAIYShJvxuCKsYIFVtO/8O8a+Pcy60cE2I419kDlZ26kzi/1fkl ZiZ3CngyTKijNZj10WFd07pRTBSkSwxORJnOEnQjgm2rEkffa9ipSI8xVI4bzcGA pPphbOIG4JvKdT+TWlzjw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669884247; x= 1669970647; bh=hUh+dINDYfVicqmxW17xJxoMlwEEp1x/t2PLssyMhf4=; b=l P2EJKtPaQG65xgYboOMWp5KwJFwYi3PhOpuirUVLlGIx+sqnggyaQr3Rt/0KBZms 8MF4adEg3i1OIRsUecJD3zJpuynMLPJk+OrpDeDZDaTSD5FYL76AOC2lJTjHUvAA +3OLrK+3+OFhjR6JJSF2zm9ATgI7d+CEkBqQS4fX6c2SW2rAPnd3KX8+QkKksWly MuPX8wZAJIYbtp14XWp1Mr44w7dSWmGEgrOIA86aF4X5bqi/XD5+zCJHeq7EHNBZ XR/whIlEVzmm3D8C17lE834bZDdKyuIsruR10Dvhebm7VM8gWwGLjybscYs6j8tX JkhnBvnk5XGquWzM2Niog== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdeggdduvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepudduudfhveejteefgedvffdvvedvjedugedukeejhedtlefhffevtefh jeeltdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Dec 2022 03:44:06 -0500 (EST) From: Maxime Ripard Date: Thu, 01 Dec 2022 09:42:47 +0100 Subject: [PATCH v3 2/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X18 MIME-Version: 1.0 Message-Id: <20221013-rpi-dpi-improvements-v3-2-eb76e26a772d@cerno.tech> References: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> In-Reply-To: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> To: Maxime Ripard , Daniel Vetter , Rob Herring , David Airlie , Emma Anholt , Eric Anholt X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2482; i=maxime@cerno.tech; h=from:subject:message-id; bh=KvJtTTgxfbh2fypsRdg9v7CTxVjvVevaQRZzT6XDsXU=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMkdmWxTvCase+v0WWCl8NXCRz5Pdu7QahMpOldyftv0CqkZ u17HdpSyMIhxMciKKbLECJsviTs163UnG988mDmsTCBDGLg4BWAiV+IZGY4fT7U5ucqGw93pwOXb1i 7vfVY9Dsqd6+NcPSFqascbixRGhhOqK/K2tXR8eG5b3dL6aY7Mh+z04CubA23Yy28VynjE8AMA X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Pinchart , Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Joerg Quinten , Laurent Pinchart , Chris Morgan , Maxime Ripard Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Joerg Quinten Add the BGR666 format MEDIA_BUS_FMT_BGR666_1X18 supported by the RaspberryPi. Signed-off-by: Joerg Quinten Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard --- .../userspace-api/media/v4l/subdev-formats.rst | 37 ++++++++++++++++++++++ include/uapi/linux/media-bus-format.h | 3 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst index aa549c42e798..6605c056cc7c 100644 --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst @@ -949,6 +949,43 @@ The following tables list existing packed RGB formats. - b\ :sub:`2` - b\ :sub:`1` - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-BGR666-1X18: + + - MEDIA_BUS_FMT_BGR666_1X18 + - 0x1023 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` * .. _MEDIA-BUS-FMT-RBG888-1X24: - MEDIA_BUS_FMT_RBG888_1X24 diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h index 8e159e6b4d21..6ce56a984112 100644 --- a/include/uapi/linux/media-bus-format.h +++ b/include/uapi/linux/media-bus-format.h @@ -34,7 +34,7 @@ #define MEDIA_BUS_FMT_FIXED 0x0001 -/* RGB - next is 0x1023 */ +/* RGB - next is 0x1024 */ #define MEDIA_BUS_FMT_RGB444_1X12 0x1016 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002 @@ -46,6 +46,7 @@ #define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007 #define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008 #define MEDIA_BUS_FMT_RGB666_1X18 0x1009 +#define MEDIA_BUS_FMT_BGR666_1X18 0x1023 #define MEDIA_BUS_FMT_RBG888_1X24 0x100e #define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015 #define MEDIA_BUS_FMT_RGB565_1X24_CPADHI 0x1022 From patchwork Thu Dec 1 08:42:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13061063 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 18AA9C4321E for ; Thu, 1 Dec 2022 08:44:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1570610E568; Thu, 1 Dec 2022 08:44:15 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id C716210E567 for ; Thu, 1 Dec 2022 08:44:09 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2A6F55C0158; Thu, 1 Dec 2022 03:44:09 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 01 Dec 2022 03:44:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1669884249; x= 1669970649; bh=hEJTnUIgC8V/nzUkl5GS6H0wYtPTgVt/TYQLx4JaJs4=; b=Y pdC5wqp/eaxh0jW+7qY108uvwtD/l7CGeuRlHq/9M26xP8HRc8j+H6CtfMSuMX5X g6Jm3QHPjKq0jWZKV0IKw03nYZZAFIBpsHABJn6YBmScTvj8bB4KxMHRwCJvX6zW a6JjzkiPSLvafPBXzrOLw4a5iVZRfiiU8AFb8/KpLBrBtDbuZHTX/174kEpM8hr9 5MSmn5+tKnuQVbH+T5tkPOTZlr2c9gRzzNqtWblx2HB87kMWtnQAO7BsnCLf5+Se XCY2JFbKx88fNqVbsdwzz0hQEze3h0qDX9geAJvLoBIsUV95OhEN+lFsY+vzrbIz 7O9dL6IB6RUDRVbm4ZvnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669884249; x= 1669970649; bh=hEJTnUIgC8V/nzUkl5GS6H0wYtPTgVt/TYQLx4JaJs4=; b=c CWygMXXraUKDAI9scUD1Web/CG6pxChDXITr8sXVBl1mirthkS8ODZM2KdUyYTf/ QBEuvhcIqH1j6GTRTF0ERvdcD7I1svtnSIhzXQaijqqGPpSmBBHwmBQtFChlPrSA CtSt98ZG1Qk/xf1j1VJ7EXihKNOeVTYhk44Xc/XSxjeiwd2wWebuDg3eJyJqodBc Dz2IsBgpe4wD+91MeRdzosUvzyRE+rQsVgrm02vPSYECk4Y/O52mbYo9mF76OCLP 7+xU/qhEBn1r6ywF+Dwx3RZ/VBfbu2mGgvgmjQGMP+DJWgOHZ1hwOdre0q08hnis vJq+Tahdm9cOa8NBiIlPg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdeggdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepudduudfhveejteefgedvffdvvedvjedugedukeejhedtlefhffevtefh jeeltdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Dec 2022 03:44:08 -0500 (EST) From: Maxime Ripard Date: Thu, 01 Dec 2022 09:42:48 +0100 Subject: [PATCH v3 3/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X24_CPADHI MIME-Version: 1.0 Message-Id: <20221013-rpi-dpi-improvements-v3-3-eb76e26a772d@cerno.tech> References: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> In-Reply-To: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> To: Maxime Ripard , Daniel Vetter , Rob Herring , David Airlie , Emma Anholt , Eric Anholt X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2464; i=maxime@cerno.tech; h=from:subject:message-id; bh=tfGtUA9ELtPM7jNo60pRSLXpqH0FBCcDLX027C7E7WQ=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMkdmexi6/lPHrp3vyXSL+K3aEBxkYvg+b4lyqysP9N2W8id Xvmuo5SFQYyLQVZMkSVG2HxJ3KlZrzvZ+ObBzGFlAhnCwMUpABNJ62JkmHxPcqdNJMe9r+KG/5VmCQ tGJU57/PlN6v21xzf/PXShVIiR4fdMVwPrMMO4JxeSOZufz59p6PArWFFrqpimtsO6b/UNPAA= X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Pinchart , Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Joerg Quinten , Laurent Pinchart , Chris Morgan , Maxime Ripard Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Joerg Quinten Add the BGR666 format MEDIA_BUS_FMT_BGR666_1X24_CPADHI supported by the RaspberryPi. Signed-off-by: Joerg Quinten Signed-off-by: Maxime Ripard Reviewed-by: Laurent Pinchart --- .../userspace-api/media/v4l/subdev-formats.rst | 37 ++++++++++++++++++++++ include/uapi/linux/media-bus-format.h | 3 +- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst index 6605c056cc7c..5f2ce6eada71 100644 --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst @@ -1060,6 +1060,43 @@ The following tables list existing packed RGB formats. - b\ :sub:`2` - b\ :sub:`1` - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-BGR666-1X24_CPADHI: + + - MEDIA_BUS_FMT_BGR666_1X24_CPADHI + - 0x1024 + - + - + - + - + - + - + - + - + - + - 0 + - 0 + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - 0 + - 0 + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - 0 + - 0 + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` * .. _MEDIA-BUS-FMT-RGB565-1X24_CPADHI: - MEDIA_BUS_FMT_RGB565_1X24_CPADHI diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h index 6ce56a984112..f3b0b8091a2c 100644 --- a/include/uapi/linux/media-bus-format.h +++ b/include/uapi/linux/media-bus-format.h @@ -34,7 +34,7 @@ #define MEDIA_BUS_FMT_FIXED 0x0001 -/* RGB - next is 0x1024 */ +/* RGB - next is 0x1025 */ #define MEDIA_BUS_FMT_RGB444_1X12 0x1016 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001 #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002 @@ -49,6 +49,7 @@ #define MEDIA_BUS_FMT_BGR666_1X18 0x1023 #define MEDIA_BUS_FMT_RBG888_1X24 0x100e #define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015 +#define MEDIA_BUS_FMT_BGR666_1X24_CPADHI 0x1024 #define MEDIA_BUS_FMT_RGB565_1X24_CPADHI 0x1022 #define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010 #define MEDIA_BUS_FMT_BGR888_1X24 0x1013 From patchwork Thu Dec 1 08:42:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13061064 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 41BCEC43217 for ; Thu, 1 Dec 2022 08:44:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 62C1B10E570; Thu, 1 Dec 2022 08:44:18 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id C165210E568 for ; Thu, 1 Dec 2022 08:44:11 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 250A25C01A6; Thu, 1 Dec 2022 03:44:11 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 01 Dec 2022 03:44:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1669884251; x= 1669970651; bh=Wp89GBtaW7MK+d6la9pPlll3p7zimHiYkS2UgGO+ZZU=; b=I t/Ddxl/vLtCzgybAsREva1LlWJApQsJKliE29BLqdBVe61HJYI7OoqakerWwRo4u V9QVc+YxiVwLQ/3j7w7Tuk0ErI2zm7+0LmD87C9/FD2IN1MFkU8OTH6r+yVprHeW pzakRrfVWVGU/CZdzSZoRrtyQovfjVCwST3FW8YDNYMU4lV7lRsdfRBpjtK5CWzT waCSZLyMUlEKfczyLPoA5+z+EbbLKROh3zQ/1YtZ6pY4RV1nt6oXZKqF4vaBq+20 JwnzdvbwWpJQ5OT16wqWFEgy/lJkozQ6CzijBizQJTOW5Ub5TZstRebqkYqrNQJo zt5KTV4I6oFvnEavxGyXQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669884251; x= 1669970651; bh=Wp89GBtaW7MK+d6la9pPlll3p7zimHiYkS2UgGO+ZZU=; b=v XlGbnGod+KDIVVIUCc5vAMDAZRcfqFI6ZdnkdExsSh6FkVzL84uNaZBf7k1sQbb4 iRhacGQZl2m6Ru3Wk+qJuqsvYhmdAejWJR1J4Li6OgwFUZlniHs22nBiVqnLOaRV 6mca32JuqwPeYh+NPKgDGbsoRiXweovcSV+ij70C0nmi3MQI7czP6V+sXECiaQ37 evxNCKIEZw6VNO88qB8dVzFvg2aunYO4DxPSTOhYnWmmYdlgx5BtoKsHr4lMSnVc 2MbasUXkh4IqNXtQrWYJLGJKFL+rf7nRNDaiM1Q/uiNQrwAW8sBmYbK14uS6gfr5 RIjMtNT4eYSgkK7Nh26rg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdeggdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepudduudfhveejteefgedvffdvvedvjedugedukeejhedtlefhffevtefh jeeltdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Dec 2022 03:44:10 -0500 (EST) From: Maxime Ripard Date: Thu, 01 Dec 2022 09:42:49 +0100 Subject: [PATCH v3 4/7] drm/vc4: dpi: Support RGB565 format MIME-Version: 1.0 Message-Id: <20221013-rpi-dpi-improvements-v3-4-eb76e26a772d@cerno.tech> References: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> In-Reply-To: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> To: Maxime Ripard , Daniel Vetter , Rob Herring , David Airlie , Emma Anholt , Eric Anholt X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1170; i=maxime@cerno.tech; h=from:subject:message-id; bh=frMUS74NDFOUKqROpfuyhXgF/ifuNk0VZpwfF7mFoNs=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMkdmewylwqF7hzuDwpfyMWy+8K8G6fPz9ogP6vi9JFVKr7s GgtkOkpZGMS4GGTFFFlihM2XxJ2a9bqTjW8ezBxWJpAhDFycAjARVSNGhrV3O9NYNu4OClvStai57i rXpcf+qc8Ypph556W251ya/orhn86yJv3vltKH+NjPpjc2WZsePesesDgq7VxbrLf+8crVbAA= X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Pinchart , Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Joerg Quinten , Laurent Pinchart , Chris Morgan , Maxime Ripard Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Chris Morgan The RGB565 format with padding over 24 bits (MEDIA_BUS_FMT_RGB565_1X24_CPADHI) is supported by the vc4 DPI controller. This is what the Geekworm MZP280 DPI display uses, so let's add support for it in the DPI controller driver. Reviewed-by: Dave Stevenson Signed-off-by: Chris Morgan Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_dpi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c index 1f8f44b7b5a5..7da3dd1db50e 100644 --- a/drivers/gpu/drm/vc4/vc4_dpi.c +++ b/drivers/gpu/drm/vc4/vc4_dpi.c @@ -182,6 +182,10 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder) dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3, DPI_FORMAT); break; + case MEDIA_BUS_FMT_RGB565_1X24_CPADHI: + dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_2, + DPI_FORMAT); + break; default: DRM_ERROR("Unknown media bus format %d\n", bus_format); From patchwork Thu Dec 1 08:42:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13061065 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7590C47088 for ; Thu, 1 Dec 2022 08:44:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A16510E571; Thu, 1 Dec 2022 08:44:22 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id C272710E56B for ; Thu, 1 Dec 2022 08:44:13 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 1E6845C01A9; Thu, 1 Dec 2022 03:44:13 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 01 Dec 2022 03:44:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1669884253; x= 1669970653; bh=yGORwJBsPkh/b0PObL5kDZslL3mkGzpnk9pANWLtbFs=; b=H NHJAo8ZRRAMl/h55bdIkyWSHbo8nzWSfnWX8lv0XA0qYK4msLbcoDUIlmy3LdLcc 7saFz50qkP7V9nQOZmMGWof33GlRwJ4wQKmV9SVHhwITLarUFYEC3s7BhD5fz5b3 Qwm4+Ud1w+b1Q3VApTK2IfmvEvZFDaPEc8EFgCDmpDRDjdxiyx1nwyGT9q1o8I5U UGPZo+w8hM7+u/twQ2XEXD8wuEzc6bW8haoE6aV12sxB2U9B4j4qYbTSgxwZIyqA dy3TA0e3yLZeyNfGwLSGAxef8fln83vQ3nFyU+HhTPjmOitM5i7dtThImnj4Zooo 9E4zfBABUL7fGhVFIqtmw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669884253; x= 1669970653; bh=yGORwJBsPkh/b0PObL5kDZslL3mkGzpnk9pANWLtbFs=; b=b 5wcgZZa17fb7DzCrPh+Y7kCHjyLsb7wXAxYNeAoNfNZgfpC4AgviGD7Ollo2MW+4 mpcsKLEk8X8lVILLtG7tZ7/CYyGOKUWfApSX5LGyfGlvemXCUpUijNzVkNwrjw3c GAIfTHMYbmZu3SGxltT1Xe49F0d/qOZdCiWGHfcd4cjgPCe3gqugP6+JgGzbK+FV Yz4MC95obHatEMM83I+OVOIR0n9xIxcgYnZC6PdaSTmDDEg6P5uefoKnV3yWNnWG YfWm66vb15K9gio5GOArzxjHUIEIOptvz5N/EipKfMBBrcV45AlPQwcYUUJRRO0r ePDKgLev3AqgqMMpn913Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdeggdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepudduudfhveejteefgedvffdvvedvjedugedukeejhedtlefhffevtefh jeeltdevnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Dec 2022 03:44:12 -0500 (EST) From: Maxime Ripard Date: Thu, 01 Dec 2022 09:42:50 +0100 Subject: [PATCH v3 5/7] drm/vc4: dpi: Support BGR666 formats MIME-Version: 1.0 Message-Id: <20221013-rpi-dpi-improvements-v3-5-eb76e26a772d@cerno.tech> References: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> In-Reply-To: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> To: Maxime Ripard , Daniel Vetter , Rob Herring , David Airlie , Emma Anholt , Eric Anholt X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1285; i=maxime@cerno.tech; h=from:subject:message-id; bh=C2A769Ttl36FCHI2s5BdHwC3a6/7DNTBsfWdG3Cv96g=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMkdmexqvho3Ky3/6niwrL+w8ui5o1a3XlY77J+39tMyeZan piFGHaUsDGJcDLJiiiwxwuZL4k7Net3JxjcPZg4rE8gQBi5OAZhIlCTDP9151ZMrfp5rZaxqWM+TVf Ly11S1lZ0h7utL3GZeXZkQP5Xhf7GWs/rzu3s5xIUWa5n3uzdlTf46521jf+tCl7+6dzUZOAA= X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Pinchart , Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Joerg Quinten , Laurent Pinchart , Chris Morgan , Maxime Ripard Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Joerg Quinten The VC4 DPI output can support multiple BGR666 variants, but they were never added to the driver. Let's add the the support for those formats. Signed-off-by: Joerg Quinten Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_dpi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c index 7da3dd1db50e..ecbe4cd87036 100644 --- a/drivers/gpu/drm/vc4/vc4_dpi.c +++ b/drivers/gpu/drm/vc4/vc4_dpi.c @@ -170,10 +170,16 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder) dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR, DPI_ORDER); break; + case MEDIA_BUS_FMT_BGR666_1X24_CPADHI: + dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR, DPI_ORDER); + fallthrough; case MEDIA_BUS_FMT_RGB666_1X24_CPADHI: dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_2, DPI_FORMAT); break; + case MEDIA_BUS_FMT_BGR666_1X18: + dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR, DPI_ORDER); + fallthrough; case MEDIA_BUS_FMT_RGB666_1X18: dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1, DPI_FORMAT); From patchwork Thu Dec 1 08:42:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13061066 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 223D1C47088 for ; Thu, 1 Dec 2022 08:44:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34A7E10E56E; Thu, 1 Dec 2022 08:44:24 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id EF55410E570 for ; Thu, 1 Dec 2022 08:44:15 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 4C1645C01AE; Thu, 1 Dec 2022 03:44:15 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 01 Dec 2022 03:44:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1669884255; x= 1669970655; bh=1vlWw3HWcseVhvxGIduvYvORASnSFa/0anA5xMkzYTs=; b=A IMDJY/TOTF3FYZzKSFfSABapNtMgtstVZZwPeU5tKwfQ/u+pFUVhSViIyij4b0wO zbi7B659HN/qnkihiSgKXKhtZ69me94ozqbcO2OiB7a3i9yA60qkLT4TKW1eEVW1 fqwKC34AGKgw7uiTCkwIuUkCRDD27e0W49U0OJ2poV45otO2cZTdutwKYYKgxz6O xprIf2xbVxeuLCqjjh5uEXBCnn51PY12qzbs4GM/1jSkZamnTjBBCLAPLCXVv1xY DJGtTbvq1clXMBYNtYOeYDq64LjMez+oS6L3X4QNWzuR00no+Dpbq06xhZBfouJJ eT+VM+DEY4a4TtrjnmI0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669884255; x= 1669970655; bh=1vlWw3HWcseVhvxGIduvYvORASnSFa/0anA5xMkzYTs=; b=n ttMxKjSzh6M1U2J8XdbUvNH5nZj+9szvM34E4c08/kAKIZBCDAId0EDZ3C9YEK+J TzrafALHEbox1ajJW0Q/1Er88htT2sfmcE1Tl59bs6XdTMwsSb0xLQKTdfYjV/L6 DYCqw8rEM6aE7z/SQmxXURuWwiX2m0vyXcI7HpKg2sMeWSdeoZhJFae4L8xGwwfP Xh6EV25U4a7xvFExDK1w1SAzSHp7Rp51EbEZc5J1wjXnjNLeW211AAqDhzCu7ZVp GzQsVozVLrT+NT5vciZTyquUNC3FOt37D+hHuJa7vcZLz533nHSxGK1guqTS5vKh V11TURURvDZXPcYlFGCsA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdeggdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepudduudfhveejteefgedvffdvvedvjedugedukeejhedtlefhffevtefh jeeltdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Dec 2022 03:44:14 -0500 (EST) From: Maxime Ripard Date: Thu, 01 Dec 2022 09:42:51 +0100 Subject: [PATCH v3 6/7] drm/vc4: dpi: Change the default DPI format to being 18bpp, not 24. MIME-Version: 1.0 Message-Id: <20221013-rpi-dpi-improvements-v3-6-eb76e26a772d@cerno.tech> References: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> In-Reply-To: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> To: Maxime Ripard , Daniel Vetter , Rob Herring , David Airlie , Emma Anholt , Eric Anholt X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1321; i=maxime@cerno.tech; h=from:subject:message-id; bh=Cj2SqCiv0e+hjTKV6Xz2WDeMWOb4ZCwlvcwXbXBSakE=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMkdmeziL3SX7zTrdP5+OHjOkrnCmxbrdmXuj3bKLXVqEgs8 c6ejo5SFQYyLQVZMkSVG2HxJ3KlZrzvZ+ObBzGFlAhnCwMUpABOJm8DIcGpr/V/O79tuXdWqbfmh6n W57GFLhYNumMCrp72Xi9e/j2ZkmJZQ/Ovcls2bZx8IEhXgTPszQeDy78sbk56V/r5y2eyvPysA X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Pinchart , Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Joerg Quinten , Laurent Pinchart , Chris Morgan , Maxime Ripard Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Dave Stevenson DPI hasn't really been used up until now, so the default has been meaningless. In theory we should be able to pass the desired format for the adjacent bridge chip through, but framework seems to be missing for that. As the main device to use DPI is the VGA666 or Adafruit Kippah, both of which use RGB666, change the default to being RGB666 instead of RGB888. Signed-off-by: Dave Stevenson Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_dpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c index ecbe4cd87036..fdae02760b6d 100644 --- a/drivers/gpu/drm/vc4/vc4_dpi.c +++ b/drivers/gpu/drm/vc4/vc4_dpi.c @@ -150,8 +150,8 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder) } drm_connector_list_iter_end(&conn_iter); - /* Default to 24bit if no connector or format found. */ - dpi_c |= VC4_SET_FIELD(DPI_FORMAT_24BIT_888_RGB, DPI_FORMAT); + /* Default to 18bit if no connector or format found. */ + dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1, DPI_FORMAT); if (connector) { if (connector->display_info.num_bus_formats) { From patchwork Thu Dec 1 08:42:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13061067 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4F07AC43217 for ; Thu, 1 Dec 2022 08:44:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 238E210E572; Thu, 1 Dec 2022 08:44:26 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3D05510E56E for ; Thu, 1 Dec 2022 08:44:18 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 97CC15C01BB; Thu, 1 Dec 2022 03:44:17 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 01 Dec 2022 03:44:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1669884257; x= 1669970657; bh=xhtPz8Dqfioscgg3yoemS47J761NmMtmupbcefOZt74=; b=L EPujtsgIwX9f0NvrpTUvntk97RsOQ+/vo7iQc8rjmEyChhHV3VEga350Tvp8cO0y N9MKH5vP5y4vF+EB1U5bc93YwDhDEW6zAgF+ViC8O2FfASifS6aIvBU2BLC0AQQ2 lp/o3AdYfCuJCaOwmZdtfBpuLEJCCsZAEbxHqdHBpL8FXed6VaXrBRC4ht6ATaN1 hRMXdZDhql0KdRVxMdUiLfk9PpJdU/wwRbSgGvnd0fh3AlY6rM4TCspa2CJ+qM33 AASkTBOg63ubv48QWqP4RMG9ky5YgkMyfQQxCKRVYLnoOxE58b2qRKyatXZPjoO4 RAxPQ0q6og2WrDpjITlqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669884257; x= 1669970657; bh=xhtPz8Dqfioscgg3yoemS47J761NmMtmupbcefOZt74=; b=Y uxkCK706usNCWT/0noaHtovqnraHJGKlOkm+znWiY3dqjjmINVbDI6UNlTG09u1m 3W08iWKxkRSKQ7/pl62UYTZd0G3+YrJ5yltG9CrjjrSGH4epIZwkA+AxieZ4AbIf FVD/1d1yj0r6ubChen63Za4XmSJKdB+UYdEG7edGf2aUgCmsWKpk/6c86QBVQ3Fz yszH0URpNUT7LTJSe1v1oCa4x493WHNvPdpCQU0BykFQeSGxTKPAAbI9hBUaVD1Z 5fZVQWPTG5rrzZ84bGZ4kJux30sQH/xJeJBgRKvJ3X4rmSxWZQ7+OzhOggv/kJ+d RxK+um0h0cNDfH4ms3Hcg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtdeggdduvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepudduudfhveejteefgedvffdvvedvjedugedukeejhedtlefhffevtefh jeeltdevnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 1 Dec 2022 03:44:16 -0500 (EST) From: Maxime Ripard Date: Thu, 01 Dec 2022 09:42:52 +0100 Subject: [PATCH v3 7/7] drm/vc4: dpi: Fix format mapping for RGB565 MIME-Version: 1.0 Message-Id: <20221013-rpi-dpi-improvements-v3-7-eb76e26a772d@cerno.tech> References: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> In-Reply-To: <20221013-rpi-dpi-improvements-v3-0-eb76e26a772d@cerno.tech> To: Maxime Ripard , Daniel Vetter , Rob Herring , David Airlie , Emma Anholt , Eric Anholt X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=1022; i=maxime@cerno.tech; h=from:subject:message-id; bh=43Ff0zFIOvU8ONzBI2sMboXcyvjpYfdtbjUUqEZ+IMo=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMkdmeyBO2J0pyzr3P+f64RJ9zzB10/KgzcvuVzG6r3T/gL/ zwkMHaUsDGJcDLJiiiwxwuZL4k7Net3JxjcPZg4rE8gQBi5OAZjInluMDHfyr4ryz/qj8kzhQ0AvK9 8UFu+G2MN8ET+NuM8yrJO+6cjIMHfT0mm+4eyCeqr/e1Q6wlpapRinGJ+cME19xmmDXVZCjAA= X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Pinchart , Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Joerg Quinten , Laurent Pinchart , Chris Morgan , Maxime Ripard Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Dave Stevenson The mapping is incorrect for RGB565_1X16 as it should be DPI_FORMAT_18BIT_666_RGB_1 instead of DPI_FORMAT_18BIT_666_RGB_3. Fixes: 08302c35b59d ("drm/vc4: Add DPI driver") Signed-off-by: Dave Stevenson Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_dpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c index fdae02760b6d..a7bebfa5d5b0 100644 --- a/drivers/gpu/drm/vc4/vc4_dpi.c +++ b/drivers/gpu/drm/vc4/vc4_dpi.c @@ -185,7 +185,7 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder) DPI_FORMAT); break; case MEDIA_BUS_FMT_RGB565_1X16: - dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3, + dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_1, DPI_FORMAT); break; case MEDIA_BUS_FMT_RGB565_1X24_CPADHI: