From: Paul Cercueil <paul@crapouillou.net>
To: Thierry Reding <thierry.reding@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Noralf Tronnes <noralf@tronnes.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: od@zcrc.me, dri-devel@lists.freedesktop.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Paul Cercueil <paul@crapouillou.net>
Subject: [PATCH v2 0/6] DSI/DBI, panel drivers, & tinyDRM v2
Date: Sat, 22 Aug 2020 18:32:44 +0200 [thread overview]
Message-ID: <20200822163250.63664-1-paul@crapouillou.net> (raw)
Hi,
Here's a V2 of my patchset that attempts to clean up the current
situation with DSI/DBI panels drivers, and tinyDRM.
For the record, here is a small sum-up of the current situation:
- the current MIPI DBI code (drivers/gpu/drm/drm_mipi_dbi.c) is lagging
way behind the MIPI DSI code (drivers/gpu/drm/drm_mipi_dsi.c). While
the DSI code adds a proper bus support, with support for host drivers
and client devices, there is no such thing with the DBI code. As such,
it is currently impossible to write a standard DRM panel driver for a
DBI panel.
- Even if the MIPI DBI code was updated with a proper bus, many panels
and MIPI controllers support both DSI and DBI, so it would be a pain
to support them without resolving to duplicating each driver.
- The panel drivers written against the DBI code are all "tinyDRM"
drivers, which means that they will register a full yet simple DRM
driver, and cannot be used as regular DRM panels for a different DRM
driver.
- These "tinyDRM" drivers all use SPI directly, even though the panels
they're driving can work on other interfaces (e.g. i8080 bus). Which
means that one driver written for e.g. a ILI9341 would not work if
the control interface is not SPI.
- The "tinyDRM" common code is entangled with DBI and there is no clear
separation between the two. It could very well be moved to a single
"tinyDRM" driver that works with a DRM panel obtained from devicetree,
because the only requirement is that the panel supports a few given
DCS commands.
Noteworthy changes since V1:
* The DT binding document for the NV3052C panel has been updated with
the feedback I got from V1. It now supports multiple power supplies.
* Instead of using macros to define bus types, we now have an enum
mipi_dcs_bus_type.
* The WARN_ONE_ONCE() that were in place to check that the host and
client drivers provided the DCS bus bitmask is gone, we just default
to DSI instead.
* DBI/SPI driver code was moved out of drivers/gpu/drm/bridge/.
* The DBI/SPI driver is registered as a driver by each client if needed,
they just call module_mpi_dbi_spi_driver(). This addresses the issue
in V1 that compatible strings had to be added to two different places.
* NV3052C and ILI9341 panel drivers were updated to remove custom
backlight handling, call drm_panel_{disable,unprepare} on module exit,
and various small fixes.
For a more detailed changelog, see the header of each individual patch.
Paul Cercueil (6):
dt-bindings: display: Document NewVision NV3052C DT node
drm: dsi: Let host and device specify supported bus
drm: Add SPI DBI host driver
drm/tiny: Add TinyDRM for DSI/DBI panels
drm/panel: Add panel driver for NewVision NV3052C based LCDs
drm/panel: Add Ilitek ILI9341 DBI panel driver
.../display/panel/newvision,nv3052c.yaml | 100 ++++
drivers/gpu/drm/Kconfig | 8 +
drivers/gpu/drm/Makefile | 1 +
drivers/gpu/drm/drm_mipi_dbi_spi.c | 247 +++++++++
drivers/gpu/drm/drm_mipi_dsi.c | 9 +
drivers/gpu/drm/panel/Kconfig | 18 +
drivers/gpu/drm/panel/Makefile | 2 +
drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 318 +++++++++++
.../gpu/drm/panel/panel-newvision-nv3052c.c | 510 ++++++++++++++++++
drivers/gpu/drm/tiny/Kconfig | 8 +
drivers/gpu/drm/tiny/Makefile | 1 +
drivers/gpu/drm/tiny/tiny-dsi.c | 266 +++++++++
include/drm/drm_mipi_dbi_spi.h | 42 ++
include/drm/drm_mipi_dsi.h | 44 ++
14 files changed, 1574 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/panel/newvision,nv3052c.yaml
create mode 100644 drivers/gpu/drm/drm_mipi_dbi_spi.c
create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c
create mode 100644 drivers/gpu/drm/panel/panel-newvision-nv3052c.c
create mode 100644 drivers/gpu/drm/tiny/tiny-dsi.c
create mode 100644 include/drm/drm_mipi_dbi_spi.h
--
2.28.0
next reply other threads:[~2020-08-22 16:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-22 16:32 Paul Cercueil [this message]
2020-08-22 16:32 ` [PATCH v2 1/6] dt-bindings: display: Document NewVision NV3052C DT node Paul Cercueil
2020-09-08 21:50 ` Rob Herring
2020-09-09 11:41 ` Linus Walleij
2020-08-22 16:32 ` [PATCH v2 2/6] drm: dsi: Let host and device specify supported bus Paul Cercueil
2020-08-22 16:32 ` [PATCH v2 3/6] drm: Add SPI DBI host driver Paul Cercueil
2020-09-09 11:57 ` Linus Walleij
2020-08-22 16:32 ` [PATCH v2 4/6] drm/tiny: Add TinyDRM for DSI/DBI panels Paul Cercueil
2020-08-22 16:32 ` [PATCH v2 5/6] drm/panel: Add panel driver for NewVision NV3052C based LCDs Paul Cercueil
2020-08-24 20:55 ` Linus Walleij
2020-08-22 16:32 ` [PATCH v2 6/6] drm/panel: Add Ilitek ILI9341 DBI panel driver Paul Cercueil
2020-08-30 16:36 ` 答复: " 何小龙 (Leon He)
2020-08-30 16:48 ` Paul Cercueil
2020-08-30 19:11 ` Laurent Pinchart
2020-08-30 20:28 ` Sam Ravnborg
2020-09-07 12:57 ` Paul Cercueil
2020-09-08 7:18 ` Neil Armstrong
2020-09-09 11:38 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200822163250.63664-1-paul@crapouillou.net \
--to=paul@crapouillou.net \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=noralf@tronnes.org \
--cc=od@zcrc.me \
--cc=robh+dt@kernel.org \
--cc=sam@ravnborg.org \
--cc=thierry.reding@gmail.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).