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);