From patchwork Thu Oct 13 09:56: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: 13005832 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 4A61BC433FE for ; Thu, 13 Oct 2022 09:57:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 593B510E7AC; Thu, 13 Oct 2022 09:57:22 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by gabe.freedesktop.org (Postfix) with ESMTPS id 580EC10E71F for ; Thu, 13 Oct 2022 09:57:12 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B4F525C00A6; Thu, 13 Oct 2022 05:57:11 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 13 Oct 2022 05:57:11 -0400 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=fm3; t=1665655031; x= 1665741431; bh=u1MKeK43KUVSNr+zlGBU1hNNtkwDdXrF2GqPW2EMI4Y=; b=D +zZ1Fc4ZBFSXef7tM+bIuF1Seiv0mr6zF4Vqwd243kEn5i/QHGrMLmko0N/1O81a qKpyywvkMls4P2sbY3XEIss+fpgk7mFrpR4lQ+aiwjQA5nzcHODog5S9HXQvTzdb WYFQjxeNT0/YKGYz2rqr8ap5zhDVHdW85IQHYzDt69ZBjbDDHRNI3jSIPTS+VkQq GuhQyd0Ux0pqUFUqHZ6e2+OJZdZ/XefBKs14IJ58l/UpsSnZKueftjyV02r/Qha1 WtR3dz/EJCqFFDQVf5QFYJPchxG8fGsg85r2Xf5jGEq4hMGy8KT5lVls9LU96pph 90titF7qZeGD+4Ki1SFtg== 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=fm3; t=1665655031; x= 1665741431; bh=u1MKeK43KUVSNr+zlGBU1hNNtkwDdXrF2GqPW2EMI4Y=; b=E MKMv+y19UkgmjQjJnz0/C0PQbdYCK3C+HlPyaVhiDPs08xmsw5waorM1KwnWd/LR e9jYpEyWlv/bPFixoX1woa/C4kTr0b4ju8HnqvFY50sNCdHodmquph8rS5afI1Tv 9o6QpFY+05eoGJLzG5C7y+zJXIN4ZvdEmaOB1bkC1TV1PbI8dF5WIR/5U7nCBK3i rh53bQmXgw87eWFGPoOqgTKVXMSmLcyzAQ70HZt+Hcof45JBv+nVD9Pe3KIrZh0s mlLJuPGFERFpe8w4d5JRDoyEyTxnKCO/yePo1A6HOalLJw+vGe6S56vMk6StwdlF 681aMbZ5r2C3h4hbQA7gw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeektddgvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephfffufggtgfgkfhfjgfvvefosehtkeertdertdejnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepudduudfhveejteefgedvffdvvedvjedugedukeejhedtlefhffevtefh jeeltdevnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomh epmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Oct 2022 05:57:11 -0400 (EDT) From: Maxime Ripard Date: Thu, 13 Oct 2022 11:56:48 +0200 Subject: [PATCH 4/7] drm/vc4: dpi: Support RGB565 format MIME-Version: 1.0 Message-Id: <20221013-rpi-dpi-improvements-v1-4-8a7a96949cb0@cerno.tech> References: <20221013-rpi-dpi-improvements-v1-0-8a7a96949cb0@cerno.tech> In-Reply-To: <20221013-rpi-dpi-improvements-v1-0-8a7a96949cb0@cerno.tech> To: Maxime Ripard , Eric Anholt , Daniel Vetter , David Airlie , Rob Herring , Emma Anholt X-Mailer: b4 0.11.0-dev-7da52 X-Developer-Signature: v=1; a=openpgp-sha256; l=1126; i=maxime@cerno.tech; h=from:subject:message-id; bh=ZQPHjwQYtyeJjJI91c4T4N+E7FyRjwcxYJLQyKTsOPQ=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMnuD976HfHdkCzeup1vaZ7V8SR1Sy/mDWblL7pW/ftcJBnx 09+0o5SFQYyLQVZMkSVG2HxJ3KlZrzvZ+ObBzGFlAhnCwMUpABMJTmH4H1lpb6z/XEcsaYrTxLrqPT t2bv3ys2/HlK5JBTJBqmz51gz/g/YYvBDJ2W93qfqS8dKFkyI7Z9eFGQc/qmJ3CuS78YORFQA= 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: Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Joerg Quinten , Maxime Ripard , Chris Morgan , Laurent Pinchart 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 as "mode 3". 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 Signed-off-by: Maxime Ripard Reviewed-by: Laurent Pinchart --- 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);