Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp893594lqj; Mon, 3 Jun 2024 04:23:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVsehH12rnxFXEmwZ46VN3R8OKHqRvDc5sIEYGQdC9Jd7HAY6C8p3EFc4PrKnNRgRpR9yARScLtpc36fH2pqS+qRe6A09ZVaBOwoqcroQ== X-Google-Smtp-Source: AGHT+IGAYBcKS6YYyI3rd/tlC2wyP5/uciXR7i6DUGay+fQ+R+1Y3Mrytp79QnEhcZpybppFBp9N X-Received: by 2002:a17:906:c94d:b0:a67:aa2b:1028 with SMTP id a640c23a62f3a-a681fc5cbccmr679477566b.8.1717413799599; Mon, 03 Jun 2024 04:23:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717413799; cv=pass; d=google.com; s=arc-20160816; b=hVJb/kjyHrKIvHX7Mv1OfE+1IuhudR1BAyeeEoQKlvCl+NbwHhTE/M3lrqBBIcdr/q yU+UfsDroWe6dmaEnB/jqMUi+I0z6cbLvh3lKjOhsG+wtMVDEM3O9GHZDN5dW7yUH6eH 1IEMUBLikrQYVz7p4eZJzuUw/O+ddtrXd60KUK38UZr/cssQFu+RBemzG9rIyAul/4TY 3X0CZ4sG6LegfFy4QoMvCFvPTwyiQXHzgTyiRCyVXbp1VwdLKOvftOZg/bGk6E56t//z vyxt1gGpsonubB+ct/LO4oC0kaG8s9AjOQK6EBB43UfgJEC1L872P+DbfquasX9s1uVj m/tg== 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=Qca4uQclYGuGPeDwTz2ScN6SL0ZrdS/m01vAP+BwSac=; b=sLMx+ZBGxSvvnMJpbkpO2/ptSWsGaDoF6q7t+ZcdjOosyi/h40w5Sr6XPSeCILI6dU 99lg5wvTvjg8HZigJD9xxOa7ta00dOguPSBQWFZAO17ACMWsd7UyXqf+ThhEI8Q5HTu7 3Wi+i0rNhR4V5BI4WPOUzRiqnKsUGNsdZ99+LzZxpcgK+yVJkFFhzUiINH8/WnbAaGMb JnEnxILo3/eqxKxhSiwxR71k1gVACzFYOVgqUwPeEgcmu8BVfeeJ5xBa0qtIsWSEz641 P4qC0y9rXBU8e7Ynj6foyZV8HcHgkbYj4yw1oFohMM4E7wVIU9/gmAvxZ2JNyXyGZNwE 1CAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HTRa/+2A"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199041-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199041-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a67eaf651b5si397626866b.869.2024.06.03.04.23.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 04:23:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199041-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="HTRa/+2A"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199041-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199041-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 29F6A1F246C8 for ; Mon, 3 Jun 2024 11:23:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C95685929; Mon, 3 Jun 2024 11:22:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HTRa/+2A" 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 74A0384D0D; Mon, 3 Jun 2024 11:21:56 +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=1717413716; cv=none; b=TfcQkQdoToG3Y3GOMFFe/n2Y+ppcDvobv2jGNAGdrMfS7eN4XLz8WAoPElds6sWQlmYSYJVUWKS3fLgvfi5vyhh/lM1qkhK5Hcz0rm/SqPDyOi15enQx9ecu7DCv6dSJVuveYuktxIeWlFPN0dVsSdgXPHbdawwg17F9O1NjUa0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717413716; c=relaxed/simple; bh=DC5EZsEx+rBT/MPOOSxJY0nl4J0fot6cQcgzpc29Qek=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=elecBpPTLE4Dz36LABHu4v6XhegvgNfvLHNCO9i21i6/BOIys3SBPmSPK+b9E/fsAxc14D+KKb6VJ6oP2VhqIMJ/Sbi348Shcp1ehqvMvW9crICcH6TzagXjrGVZDfhM6tow/u5PEFQf4mAaiLwSnPWhp0rkfRPOnTdkVadXvnA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HTRa/+2A; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id C5FCDC4AF14; Mon, 3 Jun 2024 11:21:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717413715; bh=DC5EZsEx+rBT/MPOOSxJY0nl4J0fot6cQcgzpc29Qek=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=HTRa/+2AltYIVEzG7hOdg1BCMLF4CtnI4Qe6u924MWDUEVtcAUAFzlUf59mIA+MKj Mcpvj9JZM7GC0pZRLbp6mwnDIcfV2cQWz0pLTx1DRcqdzN9wqenPUXM5kX5uzgQuRY oFvT2SveFs4kGzVOpiu0bzF0idgFDXl0/ZgLs/V8tLj5f40htvorSyJ+F+XZSvjTg1 rzNfyBVbfCRA+Cpsaf2FbM2twtPNr0xy3jfBX0VbS0nI/Vy3Kc6Te3QZJkdB7fFVEs zuw0QDeAgrTrLjiUkfFePyKi9JSQxn+odFPACoIRUjBXv5Jl6IWyFk5KHaBfVJD/xr F+S4eld0gL2lg== 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 BE22FC27C52; Mon, 3 Jun 2024 11:21:55 +0000 (UTC) From: =?utf-8?q?Noralf_Tr=C3=B8nnes_via_B4_Relay?= Date: Mon, 03 Jun 2024 13:21:36 +0200 Subject: [PATCH v3 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: <20240603-panel-mipi-dbi-rgb666-v3-5-59ed53ca73da@tronnes.org> References: <20240603-panel-mipi-dbi-rgb666-v3-0-59ed53ca73da@tronnes.org> In-Reply-To: <20240603-panel-mipi-dbi-rgb666-v3-0-59ed53ca73da@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 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=1717413714; l=2983; i=noralf@tronnes.org; s=20221122; h=from:subject:message-id; bh=NSd8WCcz3mEyAmd3gnS4mEuzeD9kKvKEnfrPdQSMiME=; b=rk0s0cf6Z4JK2YWt1WV6F4iBsGXgYmUNe3I+/zuyMQRncbIMF048+BhY4RB3VVtvWGpa02jCb deRkn0xd3SVCUcdQPO6WsYavAgKix3ZiHgELhc0Xj56fE8BoEKQ1Jhz 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