Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp99901lqb; Tue, 4 Jun 2024 06:21:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPikGflPAT5GiGVpyRWZZtXaRKxMg/ZpiTdGb+yJXSNqLklVLxJXWO8UoUZaDBZHCgGG1TLB8R+ndcq2B2GmBijBnO49m0N0T0DgT2Qw== X-Google-Smtp-Source: AGHT+IHsEZzHuk7s48T2FYwkliQcXKPbPGvtjAf6AOf53Uh05YTS/RcID08s/xTW0pk3i9kKkRlL X-Received: by 2002:a05:6214:240f:b0:6ae:cdff:7a87 with SMTP id 6a1803df08f44-6aecdff7b2fmr154144586d6.17.1717507308527; Tue, 04 Jun 2024 06:21:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717507308; cv=pass; d=google.com; s=arc-20160816; b=awbS3BGrn6NfLWSdYZZXhQP2wf8pR3C+cOloOL6DgriDq7Bx3nuf3+lHGy4OU1T0k/ vdxvXDKW7fA9PJ0JLpklw3iuDYGFJxUZBmobFI21OGokk+0Vj9GxJ5FuEyg6ry1F2TBa KHuSRsETJMVon9bscp1Tf3zp/Jk0dfwwsOQ3vjEIv4/+spSwP3f/6Vm8sqDPJGH815Ek k5UhBn6es8jNax1DCEvXl1ynL32mB7rsTsIiJfjJrnb89gq780LfCOcBsdWVx0FxR6Wr eTGaSnGTmvrzvKG62j50V2pp3SiNbN2R0qMDbC739XhmPodnIs+zwVXCTNtz7VTqb6q7 XrlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=XYoKlyyDyB3OL/DUrHNwe8UTTfWwiYH5tt5/xi291cY=; fh=Vzv2EQ9Z2ycTKL/GG6Mih6zgP+3AOzH0ZOFvC4K+Ggs=; b=EFOuLRS8xQgtgQljxFgc7qvMmc/7BM/OJnkZ7/OF38Yv7gB0f2KbAFKa294ETU0jdf X8WUBLYY/nzCWj3qagGxTOoLrd4RY4h9aNyGL7IV1Xx3cNzaxXNDhf27Y9CfAoJwhNaP 7pFL2dmVKNkGR6OoCHg4JQFRN8wsxemceTm4nvwEn2+RLGVwlPSz4ByvP5CHZ7QlLcVs TOnNdasg8c4kWocThHJVA58nDXiDkR49bhDM7esjnugaUNbDx5qF3CtaAQc8wrCytveZ yT98NA1aNkSwYigobXnYGr97P+bi8f2p3fGYuOnvlhyZnDf6SWTs3UUZ2lknjTPRAlIL PHkA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="b3/2MSNl"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4a742099si3536836d6.157.2024.06.04.06.21.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 06:21:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="b3/2MSNl"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-200696-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 39D451C21437 for ; Tue, 4 Jun 2024 13:21:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E351D1487D8; Tue, 4 Jun 2024 13:20:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b3/2MSNl" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 129DA146A74; Tue, 4 Jun 2024 13:20:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717507240; cv=none; b=Nnr7WOKR4MXuUSfeTwqrQEQFmKv+VeylW4487hP5DSB6gbWCbgckuf+PHadDj2O1oBgWG25ZcDJp651fgq6tGrfmcgfaEd8wZA52D4KGROrkJ+SbM3WznyjT+S6oCrie/nUuvoGuVjp2I+HEsAqqHecGQpKML42T9QXpQ7Pt1NU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717507240; c=relaxed/simple; bh=DC5EZsEx+rBT/MPOOSxJY0nl4J0fot6cQcgzpc29Qek=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s90VdS5U3XPP4Mx2UIaazgcjlzrTkgfctKeSxD1GNZekaN8+KOA2ZfeZZBgvX+z2wlKqL+DgKOVQh8NUky+x6vLDQNYpl88TRn+/+dd1djwTxwnIAK7kJGeMwE7oD1i8EHL/MRWVtnwJNxcW6nqxt6CniUX+SV9Pxmct/+LYXQM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b3/2MSNl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 94F3EC4AF14; Tue, 4 Jun 2024 13:20:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717507239; bh=DC5EZsEx+rBT/MPOOSxJY0nl4J0fot6cQcgzpc29Qek=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=b3/2MSNllqyZt/ndR9uLIfWcxQ8T0TOWCiiRcdfxwn5B8TRzecc3bGGUcrOHw1Q1P gQg9WfEQqHxJ5leWGZ52rFz3OVyOwe3095J7ohU0QqJZs6Ec08wiHctp1KnAH/3OCa EA0Z9Nhy5DaeDq5cMV3qNTNDa/nHs177Augg+MMbvpM/tac/rY54O2S1qePc+tPx7V UE7zdbelk1KpcFgVbQiRzVIdVlqXAFJiozPP72eHbn/wxjoWENwPmcBFc4C7MVJBWa OmVUv2JsodaRlVg0lCus039+SCBYmWV95TVSiCDm1JyuY7kXZo2RMa3S0DJHMqNNUn cRNTezlxMchcg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C89EC25B78; Tue, 4 Jun 2024 13:20:39 +0000 (UTC) From: =?utf-8?q?Noralf_Tr=C3=B8nnes_via_B4_Relay?= Date: Tue, 04 Jun 2024 15:20:32 +0200 Subject: [PATCH v4 5/5] drm/tiny: panel-mipi-dbi: Support the pixel format property 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: 8bit Message-Id: <20240604-panel-mipi-dbi-rgb666-v4-5-d7c2bcb9b78d@tronnes.org> References: <20240604-panel-mipi-dbi-rgb666-v4-0-d7c2bcb9b78d@tronnes.org> In-Reply-To: <20240604-panel-mipi-dbi-rgb666-v4-0-d7c2bcb9b78d@tronnes.org> To: Neil Armstrong , Jessica Zhang , Sam Ravnborg , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , David Lechner , Dmitry Baryshkov Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Kamlesh Gurudasani , Tommaso Merciai , =?utf-8?q?Noralf_Tr=C3=B8nnes?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1717507238; l=2983; i=noralf@tronnes.org; s=20221122; h=from:subject:message-id; bh=NSd8WCcz3mEyAmd3gnS4mEuzeD9kKvKEnfrPdQSMiME=; b=QvW48LB0GjDH9HPC/0Wul41Y4uUWFArhOzcr2VcGbC9AKxHRLwJohaihMp/Uj0HpB3kw71GIh b+h1Tzn7380CdwyT3RcIDhiVoGjvR+At1vUxRDodcKEtokdw7R/1GiT X-Developer-Key: i=noralf@tronnes.org; a=ed25519; pk=0o9is4iddvvlrY3yON5SVtAbgPnVs0LfQsjfqR2Hvz8= X-Endpoint-Received: by B4 Relay for noralf@tronnes.org/20221122 with auth_id=8 X-Original-From: =?utf-8?q?Noralf_Tr=C3=B8nnes?= Reply-To: noralf@tronnes.org From: Noralf Trønnes Add support for these pixel format property values: - r5g6b5, RGB565 - b6x2g6x2r6x2, BGR666 BGR666 is presented to userspace as RGB888. The 2 LSB in each color are discarded by the controller. The pixel is sent on the wire using 8 bits per word (little endian) so the controller sees it as BGR. RGB565 is the default if the property is not present. Reviewed-by: Neil Armstrong Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/tiny/panel-mipi-dbi.c | 55 ++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tiny/panel-mipi-dbi.c b/drivers/gpu/drm/tiny/panel-mipi-dbi.c index f80a141fcf36..f3aa2abce314 100644 --- a/drivers/gpu/drm/tiny/panel-mipi-dbi.c +++ b/drivers/gpu/drm/tiny/panel-mipi-dbi.c @@ -26,6 +26,49 @@ #include