Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1576390lqo; Sun, 12 May 2024 08:26:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0laN5N3ZIpynttJIRkokVVvedtFHPanbNtxMugsB26pAfxLEr3qqMgP4SgcTY4ps80TuJSnjNqSA1xii5WcbrDgAmkWKNgw8dV0oPeg== X-Google-Smtp-Source: AGHT+IGAQOnqfOg+AS6OkUHnoovyz+DU3geE08ZY+gpwPl8NQ+zxATOkEilhNV5SgDBxpZJZ6Zqz X-Received: by 2002:ac8:580c:0:b0:43a:e995:f1a4 with SMTP id d75a77b69052e-43dfdac5347mr104282661cf.30.1715527572350; Sun, 12 May 2024 08:26:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715527572; cv=pass; d=google.com; s=arc-20160816; b=TtPRYu0D6qnp7gA1tl10x80pwO0fH2zthtiyt99qHqorKxxKIgVa0VoKj/F1DGv+LZ 2bbUgmbQ8dqRPEtJZiaJtaVR/Ujw+Z5ndasl0Idh8GFw3bhK7blvFW/SWxP+EUWnZer9 YWif1NU/KSXvvnRbPZS0GFROykLpebgGFcsx/R8bNzY78J0MIAp/k3fcG4C2HEkrcGbd JIBUmsBLwXi7krob7MLyhRCqxj18hD3qi0gAF/hFTkdwummQe+6zSbIqu3O7BBcisfZr vaWaF1hxqCmPS+YgAjoL1GbfQBhMAQkKq3JngKjnpZMgawfh42vLsmWJtWNcUPivEzds EnWA== 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=VvhBfMBSt3uByfVHYQaDjXZbdA9qanf2600ABO2wyHc=; fh=csJvTvirFA4Yxnuv/QwMDA7kEl0DEbvIwTx+VYJVsSc=; b=oT2tJD/fmo0whIWIfcPu3x1wqvrukAYcKygDoN0H8CCodYYoSJl2uuIIrXY9TegnBb r3KVeEIDHuTiyURzHtKO7FjhmCFrulvAD3JWHtR4unOWkOf9siOJ2ezuNZpcYfUD/hz/ aoagu9p1fbkdgrDytdV3vlt3Wknk6kO7QFrDaLC1Z//DGPs0pwT7duZcqcKKSbaE0uuv u2sKe4+VP2wHSvxlomaXy0Ek0y4V7VodkVjq6VwOFXCvefZKi39JURxwSK8nJhwZqIee gohhyHayxnfVx2UOwnUevp9RUgdR2XJZoiOzk+BIqsE0cUdDJp6TnPOQ5r6ZrtaRDi2V Bhew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dFGSdjJq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176920-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 d75a77b69052e-43df5670c77si79388661cf.287.2024.05.12.08.26.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 08:26:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176920-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=dFGSdjJq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176920-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 0A7C31C20AEF for ; Sun, 12 May 2024 15:26:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84D4647F5D; Sun, 12 May 2024 15:25:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dFGSdjJq" 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 8AAC83FB8B; Sun, 12 May 2024 15:25:47 +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=1715527547; cv=none; b=EYp1wo6icF7tdNVZcmV1pAgUVivzlHUMKdvIAs+VN/CpfImq8Xdk2ahp9XPjyQRb0uuy4EYECbjZ4iWhwDhwT5nTOgqSi2bBOof5zCaUANaNDoZQZ+B1lK7+HkHSXxTK9rvmWBoVhMA9VFrKPSIJIQA5TbwYPhz6UAQB5ZpYQO4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715527547; c=relaxed/simple; bh=VxXd1pVTHgFPYpuyHPxoomX3P5xw2HYOOi9eD32Pv50=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=T0A3a9AxKmEwlhrTUVNtqwGddNRvHV4kq3+Y8uORpfYsW4c3j8ebX3acTy/BizteEk4NmBWKXRgF63tMDn3jMthhFizDp8EAa8tqdcYocl7EMj4Bhl9185VE6edt9OdLG1I+v8kRW2ddveEIih0nmkz8UAe/DE77Qe5s9NvuPNc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dFGSdjJq; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 4641EC4AF11; Sun, 12 May 2024 15:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715527547; bh=VxXd1pVTHgFPYpuyHPxoomX3P5xw2HYOOi9eD32Pv50=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=dFGSdjJq05nFpLJHZFgRinsGoYsV2u3q13UBxbSAsOiq2/ZgzBP8K2sWH+0vZF4Xl am9Knl/KwBIXy+9nd/G2246osRwrqqglllTWXMKxE6o+f1pQIseHMB8TefxIwaCsuX Vtgctp1nSmeQNaShThpVsLJnxZ1p0T77g+tWDLa8wNmnjSEepkZcp2nAq1MOmc94fK x+0AVRU5BmSE+TnQ5bONeqV49VnJFZjxmtxvU5gtvU94E5QueVdTUrJblBBySlcaWQ TnXVMZuiNBZ3Xqt9RWGKIuXvj1tCxTL35MhHnNSHyuNI0aGQBhl1Qi6YMcH+qrsMDL JxA+yrMeIWZzw== 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 3ED1CC25B77; Sun, 12 May 2024 15:25:47 +0000 (UTC) From: =?utf-8?q?Noralf_Tr=C3=B8nnes_via_B4_Relay?= Date: Sun, 12 May 2024 17:25:42 +0200 Subject: [PATCH v2 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: <20240512-panel-mipi-dbi-rgb666-v2-5-49dd266328a0@tronnes.org> References: <20240512-panel-mipi-dbi-rgb666-v2-0-49dd266328a0@tronnes.org> In-Reply-To: <20240512-panel-mipi-dbi-rgb666-v2-0-49dd266328a0@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 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=1715527545; l=2926; i=noralf@tronnes.org; s=20221122; h=from:subject:message-id; bh=VkhLn8bg4+tzwHP3nVSjku8IqF1KyX0WKDV/6VouitQ=; b=mRfFsOMoujbyBk79qJfPAYkXoDM5n4PyHaR8rUjCDEPPG5JsOo7woURRkpWcj+AhydkSnYnPg Q3tSS1zKHKJBCrPfqE63WCQjLOTR5Zc+zsvRWMkX1iIbnJhM7xkURAo 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. 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