Hi
Am 24.02.26 um 17:18 schrieb Chen-Yu Tsai:
Hi,
On Tue, Feb 24, 2026 at 11:37 PM Thomas Zimmermann <[email protected]> wrote:
We keep getting new drivers based on the obsolete simple-display pipeline,
such as the recent driver for st7789v panels. [1] But submitters cannot
know, as the simple-display helpers are fully documented and still used
in several places.
Could you include a reference to the discussion to obsolete the
simple-display pipeline? That would be helpful. All I can find are some
patch series that convert individual drivers, and many of them just say
that it is obsolete, without pointing to actual discussion or documentation.
I don't think there is a discussion on the ML, but it got discussed to
some extent on IRC at least years ago. Hence there's no official log.
But generally, you can read Sima's blog entry about mid layers [1] and
the Lwn article on the mid-layer topic. [2] Citing the latter: "The core
thesis of the "midlayer mistake" is that midlayers are bad and should
not exist. That common functionality which it is so tempting to put in a
midlayer should instead be provided as library routines which can used,
augmented, or ignored by each bottom level driver independently."
That is also the problem of the simple-display pipeline. The code [3]
doesn't even do anything. It mostly maps the regular atomic calls to its
own interfaces. Having those own interfaces breaks composability of the
driver's components. Specifically, we have to re-implement interfaces
for shadow buffers to make them work with the simple-display interfaces.
[4] The best way forward is to inline the simple-display code into the
few drivers that use it. Luckily this is merely a refactoring job.
I'll include this argument in the commit description of the final patch.
Best regards
Thomas
[1] https://blog.ffwll.ch/2016/12/midlayers-once-more-with-feeling.html
[2] https://lwn.net/Articles/336262/
[3]
https://elixir.bootlin.com/linux/v6.19/source/drivers/gpu/drm/drm_simple_kms_helper.c
[4]
https://elixir.bootlin.com/linux/v6.19/source/drivers/gpu/drm/drm_gem_atomic_helper.c#L407
Thanks
ChenYu
Hence, convert all the mipi-dbi drivers over to regular atomic helpers
and remove simple-display support from mipi-dbi in this series. Then
undocument the helpers and add TODO items for final their removal.
Patch 1 changes the mode-setting logic get CRTC and panel updates into
the correct order. This patch is probably the most fragile change in the
series.
Patches 2 and 3 prepare mipi-dbi to allow for atomic helpers to be used.
Patches 5 to 14 update mipi-dbi drivers one by one. The st7735r driver
requires some additional minor preparation. Overall, the refactoring is
always the same.
Patches 15 abd 16 clean up mipi-dbi and the simple-display helpers.
These patches need some testing, as I can only compile them. At least
one of the drivers should be tried on hardware. Regressions should be
easy to fix, as these changes are mostly refactoring jobs.
[1]
https://lore.kernel.org/dri-devel/[email protected]/
Thomas Zimmermann (16):
drm/mipi-dbi: Only modify planes on enabled CRTCs
drm/mipi-dbi: Support custom pipelines with drm_mipi_dbi_dev_init()
drm/mipi-dbi: Provide callbacks for atomic interfaces
drm/hx8357d: Use regular atomic helpers; drop simple-display helpers
drm/ili9163: Use regular atomic helpers; drop simple-display helpers
drm/ili9225: Use regular atomic helpers; drop simple-display helpers
drm/ili9341: Use regular atomic helpers; drop simple-display helpers
drm/ili9486: Use regular atomic helpers; drop simple-display helpers
drm/mi0283qt: Use regular atomic helpers; drop simple-display helpers
drm/panel-mipi-dbi: Use regular atomic helpers; drop simple-display
helpers
drm/st7586: Use regular atomic helpers; drop simple-display helpers
drm/st7735r: Rename struct st7735r_priv to struct st7735r_device
drm/st7735r: Rename priv variable to st7735r
drm/st7735r: Use regular atomic helpers; drop simple-display helpers
drm/mipi-dbi: Remove simple-display helpers from mipi-dbi
drm/simple-kms: Deprecate simple-kms helpers
Documentation/gpu/drm-kms-helpers.rst | 12 -
Documentation/gpu/introduction.rst | 5 -
Documentation/gpu/todo.rst | 32 +++
drivers/gpu/drm/drm_crtc.c | 6 +-
drivers/gpu/drm/drm_gem_atomic_helper.c | 22 --
drivers/gpu/drm/drm_mipi_dbi.c | 352 ++++++------------------
drivers/gpu/drm/drm_modeset_helper.c | 3 -
drivers/gpu/drm/drm_simple_kms_helper.c | 83 ------
drivers/gpu/drm/sitronix/st7586.c | 194 +++++++++----
drivers/gpu/drm/sitronix/st7735r.c | 142 ++++++++--
drivers/gpu/drm/tiny/hx8357d.c | 138 +++++++++-
drivers/gpu/drm/tiny/ili9163.c | 139 +++++++++-
drivers/gpu/drm/tiny/ili9225.c | 193 +++++++++----
drivers/gpu/drm/tiny/ili9341.c | 139 +++++++++-
drivers/gpu/drm/tiny/ili9486.c | 130 ++++++++-
drivers/gpu/drm/tiny/mi0283qt.c | 139 +++++++++-
drivers/gpu/drm/tiny/panel-mipi-dbi.c | 142 ++++++++--
include/drm/drm_mipi_dbi.h | 140 ++++++----
include/drm/drm_simple_kms_helper.h | 216 +--------------
19 files changed, 1366 insertions(+), 861 deletions(-)
base-commit: 1c44015babd759b8e5234084dffcc08a0b784333
--
2.52.0
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)