Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp408698lqh; Tue, 7 May 2024 02:58:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJaHsecTS7kzhiNgBHV2ri90gH1MG22ZExLYDFkmB9O4HX6h5cXAuib/bHlGfiKfsgReB9gLxhE8QXk2BLpIYj2zbvjF/9qlHeH0Ip9A== X-Google-Smtp-Source: AGHT+IEGvk5j6MTZo12VlxWmLy2SW34j2f00wan2dtzUVLYgS4gztmNfu+SYwEMnQUIfIGAlkf5I X-Received: by 2002:a05:6870:84c5:b0:221:8b50:f1a0 with SMTP id l5-20020a05687084c500b002218b50f1a0mr17140538oak.19.1715075906343; Tue, 07 May 2024 02:58:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715075906; cv=pass; d=google.com; s=arc-20160816; b=cGDHh1QXLOOI8dWRb+dpJeV2k3guMQrl5qbJS7H+ww2XQ+dHIEvYEHSPK4hpyjPFYw HwAbaRuQqeTfA2kwMgolji2i/Je1WGGs3JbKYLkKIRaIggt6R5MjuqIHlwkePOq9yipC qxzz9nF0J851paGKxEsW5CDGB2jeS/gjtyI5RHM0+TZleYSQpI8tjpWvnmjSWwhBLeja EYMNNijU9M3hKswJ+iDvDPJ3R5il3RDKuYAQg/3sB0WOpFoLC4Xtvn6U+4B/By3JxDwU hdUS7biYZnX/JpzAMPAks0GplpSuZJo9/QBlC7ZL5/6xo/aV641c+mw0UQ5EmK13EpOS FIrg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:from:dkim-signature; bh=nUE65AOGLsJn7hlcm3e8UYA6QKJbLWlqPk+cGhagf1s=; fh=csJvTvirFA4Yxnuv/QwMDA7kEl0DEbvIwTx+VYJVsSc=; b=mbSaDMraYbhzLqQpYU8Oifmx2+ia2f0MX+F2p5APSkzy3s3L5KYHsiadfJbE/3Xvll kEwVjOjoT0Jdam+Rz6S6/JVIPHrAja3lV6rU8ksTbva2bh9QSrbhjNFUbi/c0SA95Oo8 H+x+JQDNtrriG+BQQ3bQ72Va0NMfcl8qOcbVBXRzCTlxmHIEBIjRmOUb3pNfhV2Lob74 QJQ3dziBRU7ir/qmbqKUpQ3L9yR+BMb2vVHNd/7dfNHCX+vcq3+WNgaGphYNmRsnV8sQ lgxM6K6IJAFUPisC9OskaBC9KnMin43HUnWTZpVsX09sgWnrhV3Lr5A5RX8jnWCbE9IC zfmA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hk1sMRk7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171046-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171046-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j9-20020a056a00234900b006f45e1236b4si6149256pfj.354.2024.05.07.02.58.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 02:58:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171046-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hk1sMRk7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171046-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171046-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 352A9283DE0 for ; Tue, 7 May 2024 09:58:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38D9C14F11B; Tue, 7 May 2024 09:57:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hk1sMRk7" 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 3457D14E2DA; Tue, 7 May 2024 09:57: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=1715075868; cv=none; b=iZFj8DYAOcboTjb9yR/5EgzuR4KMHIJw/GgZzwDo6hbdDYrSpu5rnf523Erb8gHsLz4iS8hrXgfzW4900m3792sIuQj+efcqb0AzWyJmZ0tDPs/asXFA4e82yyH83gHaERhqb1W6JrBxxcb/WzgWhLbq9Ghg7QspW4s7Wzqsyck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715075868; c=relaxed/simple; bh=cOslNnFXMgXOobE/xiF5+42V/TZM+XXhX8L45V5ggnc=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=Mm2waSi+wxIcqy3H8gfCpwfSFvhIz7rPvEHJgaNWZC/KBZYvmSS4p00CDV30GtpAP3TZJKUS6QGLuWLVJiT6PiyvDpE6c7M4GL5LE8gi8UhGISzYVrmoJ6CyxRJJrkj2duEZt8Y2Xwt/gOZnMyWM+TUSvRGKo+DxUL1FZXv4nh0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hk1sMRk7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id B5D91C2BBFC; Tue, 7 May 2024 09:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715075867; bh=cOslNnFXMgXOobE/xiF5+42V/TZM+XXhX8L45V5ggnc=; h=From:Subject:Date:To:Cc:Reply-To:From; b=hk1sMRk7Y1YNUlCqbAckbD6+X7qSO5Pwbilp0Yszo/3BhDFSVfXmy7EledvHTb0BP 3g1OLSDokasibZhG/iEEoNiNDv8UyDj5hV652ojB9pniJgV/dGZnu+K8VdfieIxxvY PihywliFmrC3n2S4oQ8ZzK5UkKrEX7tuEJO/a8zc0a3ehG3bzu0Eb52O7GOpBG/J5T GDBaNCtJaxJZrXMd7T0Xbs/LFchsrlsLASnYqbijuchSCFn5KysVTBs4h8mhsR7n7b rREc4YQChp+Ay4lR8yxqtU9xTtW28Fxr4rXhRx1iM5g83OMYcabssKHY9QU+H7QUO8 fEG/5nBxYQXWw== 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 A31B2C10F1A; Tue, 7 May 2024 09:57:47 +0000 (UTC) From: =?utf-8?q?Noralf_Tr=C3=B8nnes_via_B4_Relay?= Subject: [PATCH 0/5] drm/tiny: panel-mipi-dbi: Support 18 bits per color RGB666 Date: Tue, 07 May 2024 11:57:25 +0200 Message-Id: <20240507-panel-mipi-dbi-rgb666-v1-0-6799234afa3e@tronnes.org> 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 X-B4-Tracking: v=1; b=H4sIAAX7OWYC/x3MTQqAIBBA4avErBuwNPu5SrQonWqgTBQikO6et PwW7yWIFJgiDEWCQDdHvlxGVRZg9tlthGyzoRa1Eko06GdHB57sGe3CGLZFa42KhJRt11ptesi tD7Ty83/H6X0/IxsMwmcAAAA= 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=1715075866; l=3259; i=noralf@tronnes.org; s=20221122; h=from:subject:message-id; bh=cOslNnFXMgXOobE/xiF5+42V/TZM+XXhX8L45V5ggnc=; b=41Zf668TAp8cqriNW2DsPKYmEM4c0aWJfyLBTOF67tWFBNUJC+z5QyZpMG+t0ClldrRxfxLhC dIZZ21CwkQbC+e8kcN2QKeslmVL7sLNYD83//eoBfwdWqMRYmasnMFp 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 Hi, To my suprise I have discovered that the MIPI DBI specification does only list RGB111 as a pixel format for the Serial Interface (Type C). For the parallel interface type (Type A and B) it lists: RGB332, RGB444, RGB565, RGB666 and RGB888. I have never read the specification closely enough to discover this always assuming that the datasheets for the various MIPI DBI compatible controllers I've looked at over the years did follow the specification when they supported RGB565 and RGB666 on the serial interface. So it is quite clear that the industry has chosen to extend the standard and provide support for more pixel formats over the serial interface. drm_mipi_dbi and its predecessor fbtft support only RGB565 over SPI since RGB666 uses 3 bytes per pixel instead of 2 bytes, severly impacting the framerate. The reason I started to look at this is that there seem to be an increase in cheap SPI displays that is based on the ILI9488 controller. The datasheet for this controller states that it supports RGB565, but experience[1] shows that this is not true and that the controller only supports RGB666 over SPI. I have known for some time that the ILI9486 controller does not support RGB565 over SPI, it only supports RGB111 and RGB666. Some display breakoutboard manufacturers have solved this by putting a shift register in front of the parallel bus on this controller in order to support RGB565. This requires some custom code when writing to the SPI bus as shown in the tiny/ili9486.c driver. The downside is that these displays are really slow due to the slow shift registers used. This patchset documents the defacto industry standard wrt pixel formats over SPI and adds support for RGB666 in the panel-mipi-dbi driver. There have been two previous attempts to add a DRM driver for ili9488[2][3]. The panel-mipi-dbi driver is a generic MIPI DBI driver supporting controller initialization via a firmware file and with the help of this patchset it will support ILI9488 based SPI displays. [1] https://github.com/notro/panel-mipi-dbi/issues/2#issuecomment-2016857690 [2] https://lore.kernel.org/dri-devel/cover.1592055494.git.kamlesh.gurudasani@gmail.com/ [3] https://lore.kernel.org/dri-devel/20221018164532.1705215-1-tommaso.merciai@amarulasolutions.com/ Signed-off-by: Noralf Trønnes --- Noralf Trønnes (5): dt-bindings: display: panel: mipi-dbi-spi: Add a pixel format property drm/mipi-dbi: Remove mipi_dbi_machine_little_endian() drm/mipi-dbi: Make bits per word configurable for pixel transfers drm/mipi-dbi: Add support for DRM_FORMAT_RGB888 drm/tiny: panel-mipi-dbi: Support the pixel format property .../bindings/display/panel/panel-mipi-dbi-spi.yaml | 31 +++++++++ drivers/gpu/drm/drm_mipi_dbi.c | 76 +++++++++++++++------- drivers/gpu/drm/tiny/panel-mipi-dbi.c | 55 +++++++++++++++- include/drm/drm_mipi_dbi.h | 10 +++ 4 files changed, 148 insertions(+), 24 deletions(-) --- base-commit: 0209df3b4731516fe77638bfc52ba2e9629c67cd change-id: 20240405-panel-mipi-dbi-rgb666-4e033787d6c9 Best regards, -- Noralf Trønnes