Skip to contentSkip to conversation

drm/sitronix: move tiny Sitronix drivers to their own subdir

PATCH Superseded Marcus Folkesson 3 participants 5 messages May 3, 2025 – May 5, 2025

Subsystems (5)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Marcus Folkesson

author maintainer
#0 lore raw

PATCH v2 1/1 drm/sitronix: move tiny Sitronix drivers to their own subdir

We start to have support many Sitronix displays in the tiny directory, and we expect more to come.

Move them to their own subdirectory.

---
Changes in v2:
- Rebase on drm-misc-next
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 MAINTAINERS                                     |  6 ++--
 drivers/gpu/drm/Kconfig                         |  2 ++
 drivers/gpu/drm/Makefile                        |  1 +
 drivers/gpu/drm/sitronix/Kconfig                | 41 +++++++++++++++++++++++++
 drivers/gpu/drm/sitronix/Makefile               |  3 ++
 drivers/gpu/drm/{tiny => sitronix}/st7571-i2c.c |  0
 drivers/gpu/drm/{tiny => sitronix}/st7586.c     |  0
 drivers/gpu/drm/{tiny => sitronix}/st7735r.c    |  0
 drivers/gpu/drm/tiny/Kconfig                    | 41 -------------------------
 drivers/gpu/drm/tiny/Makefile                   |  3 --
 10 files changed, 50 insertions(+), 47 deletions(-)
MAINTAINERS +3 -3
index 81b81cc68ca2482f2965b801693ff8a43bbf2053..6b2d3d4c467b8b360317437027e20c4014c97a21 100644
@@ -7680,13 +7680,13 @@ M:	David Lechner <[email protected]>
 S:	Maintained
 T:	git https://gitlab.freedesktop.org/drm/misc/kernel.git
 F:	Documentation/devicetree/bindings/display/sitronix,st7586.txt
-F:	drivers/gpu/drm/tiny/st7586.c
+F:	drivers/gpu/drm/sitronix/st7586.c
 
 DRM DRIVER FOR SITRONIX ST7571 PANELS
 M:	Marcus Folkesson <[email protected]>
 S:	Maintained
 F:	Documentation/devicetree/bindings/display/sitronix,st7571.yaml
-F:	drivers/gpu/drm/tiny/st7571-i2c.c
+F:	drivers/gpu/drm/sitronix/st7571-i2c.c
 
 DRM DRIVER FOR SITRONIX ST7701 PANELS
 M:	Jagan Teki <[email protected]>
@@ -7707,7 +7707,7 @@ M:	David Lechner <[email protected]>
 S:	Maintained
 T:	git https://gitlab.freedesktop.org/drm/misc/kernel.git
 F:	Documentation/devicetree/bindings/display/sitronix,st7735r.yaml
-F:	drivers/gpu/drm/tiny/st7735r.c
+F:	drivers/gpu/drm/sitronix/st7735r.c
 
 DRM DRIVER FOR SOLOMON SSD130X OLED DISPLAYS
 M:	Javier Martinez Canillas <[email protected]>
drivers/gpu/drm/Kconfig +2 -0
index 3921772ae61214e6ac0337edc147a46af0010070..cc7385c334eb6ad484688d9eb483c2c6a9c39e11 100644
@@ -385,6 +385,8 @@ source "drivers/gpu/drm/xlnx/Kconfig"
 
 source "drivers/gpu/drm/gud/Kconfig"
 
+source "drivers/gpu/drm/sitronix/Kconfig"
+
 source "drivers/gpu/drm/solomon/Kconfig"
 
 source "drivers/gpu/drm/sprd/Kconfig"
drivers/gpu/drm/Makefile +1 -0
index b5d5561bbe5fd72f3915e6a52f325fdb79c7981e..70510620f29c874e376c795fb05d426a0faae05c 100644
@@ -221,6 +221,7 @@ obj-$(CONFIG_DRM_TIDSS) += tidss/
 obj-y			+= xlnx/
 obj-y			+= gud/
 obj-$(CONFIG_DRM_HYPERV) += hyperv/
+obj-y			+= sitronix/
 obj-y			+= solomon/
 obj-$(CONFIG_DRM_SPRD) += sprd/
 obj-$(CONFIG_DRM_LOONGSON) += loongson/
drivers/gpu/drm/sitronix/Kconfig new file +41 -0

41 lines not on this page · raw message

drivers/gpu/drm/sitronix/Makefile new file +3 -0
new file mode 100644
index 0000000000000000000000000000000000000000..bd139e5a6995fa026cc635b3c29782473d1efad7
@@ -0,0 +1,3 @@
+obj-$(CONFIG_DRM_ST7571_I2C)		+= st7571-i2c.o
+obj-$(CONFIG_DRM_ST7586)		+= st7586.o
+obj-$(CONFIG_DRM_ST7735R)		+= st7735r.o
drivers/gpu/drm/sitronix/st7571-i2c.c renamed from drivers/gpu/drm/tiny/st7571-i2c.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/tiny/st7571-i2c.c
rename to drivers/gpu/drm/sitronix/st7571-i2c.c
drivers/gpu/drm/sitronix/st7586.c renamed from drivers/gpu/drm/tiny/st7586.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/tiny/st7586.c
rename to drivers/gpu/drm/sitronix/st7586.c
drivers/gpu/drm/sitronix/st7735r.c renamed from drivers/gpu/drm/tiny/st7735r.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/tiny/st7735r.c
rename to drivers/gpu/drm/sitronix/st7735r.c
drivers/gpu/drm/tiny/Kconfig +0 -41

44 lines not on this page · raw message

drivers/gpu/drm/tiny/Makefile +0 -3
index 0151590db5cbd80aebde0629afd03f47b83c3045..4a9ff61ec25420e2c0a648c04eaab7ca25dd5407 100644
@@ -6,7 +6,6 @@ obj-$(CONFIG_DRM_BOCHS)			+= bochs.o
 obj-$(CONFIG_DRM_CIRRUS_QEMU)		+= cirrus-qemu.o
 obj-$(CONFIG_DRM_GM12U320)		+= gm12u320.o
 obj-$(CONFIG_DRM_PANEL_MIPI_DBI)	+= panel-mipi-dbi.o
-obj-$(CONFIG_DRM_ST7571_I2C)		+= st7571-i2c.o
 obj-$(CONFIG_TINYDRM_HX8357D)		+= hx8357d.o
 obj-$(CONFIG_TINYDRM_ILI9163)		+= ili9163.o
 obj-$(CONFIG_TINYDRM_ILI9225)		+= ili9225.o
@@ -15,5 +14,3 @@ obj-$(CONFIG_TINYDRM_ILI9486)		+= ili9486.o
 obj-$(CONFIG_TINYDRM_MI0283QT)		+= mi0283qt.o
 obj-$(CONFIG_TINYDRM_REPAPER)		+= repaper.o
 obj-$(CONFIG_TINYDRM_SHARP_MEMORY)	+= sharp-memory.o
-obj-$(CONFIG_TINYDRM_ST7586)		+= st7586.o
-obj-$(CONFIG_TINYDRM_ST7735R)		+= st7735r.o

---
base-commit: e782ac936941cff4c5580bb5cc2ec0e91468068c
change-id: 20250424-sitronix-2c1f68b46866

Best regards,

Signature · 1 line
Marcus Folkesson <[email protected]>
#1 lore raw

Hi,

there's one major issue here. You must not change the Kconfig symbols or you'll break kernel updates for a lot of people. So those TINYDRM_* must remain as is.

Best regards
Thomas

Am 03.05.25 um 10:13 schrieb Marcus Folkesson:

Quoted 220 lines

We start to have support many Sitronix displays in the tiny directory, and we expect more to come.

Move them to their own subdirectory.

---
Changes in v2:
- Rebase on drm-misc-next
- Link to v1: https://lore.kernel.org/r/[email protected]

---
  MAINTAINERS                                     |  6 ++--
  drivers/gpu/drm/Kconfig                         |  2 ++
  drivers/gpu/drm/Makefile                        |  1 +
  drivers/gpu/drm/sitronix/Kconfig                | 41 +++++++++++++++++++++++++
  drivers/gpu/drm/sitronix/Makefile               |  3 ++
  drivers/gpu/drm/{tiny => sitronix}/st7571-i2c.c |  0
  drivers/gpu/drm/{tiny => sitronix}/st7586.c     |  0
  drivers/gpu/drm/{tiny => sitronix}/st7735r.c    |  0
  drivers/gpu/drm/tiny/Kconfig                    | 41 -------------------------
  drivers/gpu/drm/tiny/Makefile                   |  3 --
  10 files changed, 50 insertions(+), 47 deletions(-)
MAINTAINERS +3 -3
index 81b81cc68ca2482f2965b801693ff8a43bbf2053..6b2d3d4c467b8b360317437027e20c4014c97a21 100644
@@ -7680,13 +7680,13 @@ M:	David Lechner <[email protected]>
  S:	Maintained
  T:	git https://gitlab.freedesktop.org/drm/misc/kernel.git
  F:	Documentation/devicetree/bindings/display/sitronix,st7586.txt
-F:	drivers/gpu/drm/tiny/st7586.c
+F:	drivers/gpu/drm/sitronix/st7586.c
 
  DRM DRIVER FOR SITRONIX ST7571 PANELS
  M:	Marcus Folkesson <[email protected]>
  S:	Maintained
  F:	Documentation/devicetree/bindings/display/sitronix,st7571.yaml
-F:	drivers/gpu/drm/tiny/st7571-i2c.c
+F:	drivers/gpu/drm/sitronix/st7571-i2c.c
 
  DRM DRIVER FOR SITRONIX ST7701 PANELS
  M:	Jagan Teki <[email protected]>
@@ -7707,7 +7707,7 @@ M:	David Lechner <[email protected]>
  S:	Maintained
  T:	git https://gitlab.freedesktop.org/drm/misc/kernel.git
  F:	Documentation/devicetree/bindings/display/sitronix,st7735r.yaml
-F:	drivers/gpu/drm/tiny/st7735r.c
+F:	drivers/gpu/drm/sitronix/st7735r.c
 
  DRM DRIVER FOR SOLOMON SSD130X OLED DISPLAYS
  M:	Javier Martinez Canillas <[email protected]>
drivers/gpu/drm/Kconfig +2 -0
index 3921772ae61214e6ac0337edc147a46af0010070..cc7385c334eb6ad484688d9eb483c2c6a9c39e11 100644
@@ -385,6 +385,8 @@ source "drivers/gpu/drm/xlnx/Kconfig"
 
  source "drivers/gpu/drm/gud/Kconfig"
 
+source "drivers/gpu/drm/sitronix/Kconfig"
+
  source "drivers/gpu/drm/solomon/Kconfig"
 
  source "drivers/gpu/drm/sprd/Kconfig"
drivers/gpu/drm/Makefile +1 -0
index b5d5561bbe5fd72f3915e6a52f325fdb79c7981e..70510620f29c874e376c795fb05d426a0faae05c 100644
@@ -221,6 +221,7 @@ obj-$(CONFIG_DRM_TIDSS) += tidss/
  obj-y			+= xlnx/
  obj-y			+= gud/
  obj-$(CONFIG_DRM_HYPERV) += hyperv/
+obj-y			+= sitronix/
  obj-y			+= solomon/
  obj-$(CONFIG_DRM_SPRD) += sprd/
  obj-$(CONFIG_DRM_LOONGSON) += loongson/
drivers/gpu/drm/sitronix/Kconfig new file +41 -0
new file mode 100644
index 0000000000000000000000000000000000000000..25cae32e5c3ec11399a12f1f2bb2ede91c27d4d4
@@ -0,0 +1,41 @@
+config DRM_ST7571_I2C
+	tristate "DRM support for Sitronix ST7571 display panels (I2C)"
+	depends on DRM && I2C && MMU
+	select DRM_CLIENT_SELECTION
+	select DRM_GEM_SHMEM_HELPER
+	select DRM_KMS_HELPER
+	select REGMAP_I2C
+	help
+	  DRM driver for Sitronix ST7571 panels controlled over I2C.
+
+	  if M is selected the module will be called st7571-i2c.
+
+config DRM_ST7586
+	tristate "DRM support for Sitronix ST7586 display panels"
+	depends on DRM && SPI
+	select DRM_CLIENT_SELECTION
+	select DRM_KMS_HELPER
+	select DRM_GEM_DMA_HELPER
+	select DRM_MIPI_DBI
+	help
+	  DRM driver for the following Sitronix ST7586 panels:
+	  * LEGO MINDSTORMS EV3
+
+	  If M is selected the module will be called st7586.
+
+config DRM_ST7735R
+	tristate "DRM support for Sitronix ST7715R/ST7735R display panels"
+	depends on DRM && SPI
+	select DRM_CLIENT_SELECTION
+	select DRM_KMS_HELPER
+	select DRM_GEM_DMA_HELPER
+	select DRM_MIPI_DBI
+	select BACKLIGHT_CLASS_DEVICE
+	help
+	  DRM driver for Sitronix ST7715R/ST7735R with one of the following
+	  LCDs:
+	  * Jianda JD-T18003-T01 1.8" 128x160 TFT
+	  * Okaya RH128128T 1.44" 128x128 TFT
+
+	  If M is selected the module will be called st7735r.
+
drivers/gpu/drm/sitronix/Makefile new file +3 -0
new file mode 100644
index 0000000000000000000000000000000000000000..bd139e5a6995fa026cc635b3c29782473d1efad7
@@ -0,0 +1,3 @@
+obj-$(CONFIG_DRM_ST7571_I2C)		+= st7571-i2c.o
+obj-$(CONFIG_DRM_ST7586)		+= st7586.o
+obj-$(CONFIG_DRM_ST7735R)		+= st7735r.o
drivers/gpu/drm/sitronix/st7571-i2c.c renamed from drivers/gpu/drm/tiny/st7571-i2c.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/tiny/st7571-i2c.c
rename to drivers/gpu/drm/sitronix/st7571-i2c.c
drivers/gpu/drm/sitronix/st7586.c renamed from drivers/gpu/drm/tiny/st7586.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/tiny/st7586.c
rename to drivers/gpu/drm/sitronix/st7586.c
drivers/gpu/drm/sitronix/st7735r.c renamed from drivers/gpu/drm/tiny/st7735r.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/tiny/st7735r.c
rename to drivers/gpu/drm/sitronix/st7735r.c
drivers/gpu/drm/tiny/Kconfig +0 -41
index daa1adbb1b43325d644ae13f3cabfc1bb01ff4d8..6d1b3e2cb3fbd8630864824ae985897b9d8095c7 100644
@@ -199,44 +199,3 @@ config TINYDRM_SHARP_MEMORY
  	  * 4.40" Sharp Memory LCD (LS044Q7DH01)
 
  	  If M is selected the module will be called sharp_memory.
-
-config TINYDRM_ST7586
-	tristate "DRM support for Sitronix ST7586 display panels"
-	depends on DRM && SPI
-	select DRM_CLIENT_SELECTION
-	select DRM_KMS_HELPER
-	select DRM_GEM_DMA_HELPER
-	select DRM_MIPI_DBI
-	help
-	  DRM driver for the following Sitronix ST7586 panels:
-	  * LEGO MINDSTORMS EV3
-
-	  If M is selected the module will be called st7586.
-
-config DRM_ST7571_I2C
-	tristate "DRM support for Sitronix ST7571 display panels (I2C)"
-	depends on DRM && I2C && MMU
-	select DRM_CLIENT_SELECTION
-	select DRM_GEM_SHMEM_HELPER
-	select DRM_KMS_HELPER
-	select REGMAP_I2C
-	help
-	  DRM driver for Sitronix ST7571 panels controlled over I2C.
-
-	  if M is selected the module will be called st7571-i2c.
-
-config TINYDRM_ST7735R
-	tristate "DRM support for Sitronix ST7715R/ST7735R display panels"
-	depends on DRM && SPI
-	select DRM_CLIENT_SELECTION
-	select DRM_KMS_HELPER
-	select DRM_GEM_DMA_HELPER
-	select DRM_MIPI_DBI
-	select BACKLIGHT_CLASS_DEVICE
-	help
-	  DRM driver for Sitronix ST7715R/ST7735R with one of the following
-	  LCDs:
-	  * Jianda JD-T18003-T01 1.8" 128x160 TFT
-	  * Okaya RH128128T 1.44" 128x128 TFT
-
-	  If M is selected the module will be called st7735r.
drivers/gpu/drm/tiny/Makefile +0 -4
index 0151590db5cbd80aebde0629afd03f47b83c3045..4a9ff61ec25420e2c0a648c04eaab7ca25dd5407 100644
@@ -6,7 +6,6 @@ obj-$(CONFIG_DRM_BOCHS)			+= bochs.o
  obj-$(CONFIG_DRM_CIRRUS_QEMU)		+= cirrus-qemu.o
  obj-$(CONFIG_DRM_GM12U320)		+= gm12u320.o
  obj-$(CONFIG_DRM_PANEL_MIPI_DBI)	+= panel-mipi-dbi.o
-obj-$(CONFIG_DRM_ST7571_I2C)		+= st7571-i2c.o
  obj-$(CONFIG_TINYDRM_HX8357D)		+= hx8357d.o
  obj-$(CONFIG_TINYDRM_ILI9163)		+= ili9163.o
  obj-$(CONFIG_TINYDRM_ILI9225)		+= ili9225.o
@@ -15,5 +14,3 @@ obj-$(CONFIG_TINYDRM_ILI9486)		+= ili9486.o
  obj-$(CONFIG_TINYDRM_MI0283QT)		+= mi0283qt.o
  obj-$(CONFIG_TINYDRM_REPAPER)		+= repaper.o
  obj-$(CONFIG_TINYDRM_SHARP_MEMORY)	+= sharp-memory.o
-obj-$(CONFIG_TINYDRM_ST7586)		+= st7586.o
-obj-$(CONFIG_TINYDRM_ST7735R)		+= st7735r.o
 
---

base-commit: e782ac936941cff4c5580bb5cc2ec0e91468068c
change-id: 20250424-sitronix-2c1f68b46866

Best regards,

Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
#2 lore raw

Thomas Zimmermann <[email protected]> writes:

Hello Thomas,

Quoted 6 lines

Hi,

there's one major issue here. You must not change the Kconfig symbols or you'll break kernel updates for a lot of people. So those TINYDRM_* must remain as is.

I disagree. The https://docs.kernel.org/admin-guide/abi.html document explictly states that Kconfig symbols are not an ABI, and userspace should not rely on these not changing over time.

Quoted 3 lines

Best regards
Thomas

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat
#3 lore raw

Hi Javier, Marcus

Am 05.05.25 um 11:27 schrieb Javier Martinez Canillas:

Quoted 6 lines

Thomas Zimmermann <[email protected]> writes:

Hello Thomas,

Quoted 2 lines

Hi,

Quoted 7 lines
Quoted 4 lines

there's one major issue here. You must not change the Kconfig symbols or you'll break kernel updates for a lot of people. So those TINYDRM_* must remain as is.

I disagree. The https://docs.kernel.org/admin-guide/abi.html document explictly states that Kconfig symbols are not an ABI, and userspace should not rely on these not changing over time.

To summarize our discussion on irc [1]: changing the symbols is ok, but we should make it compatible to ease the transition. To do so, the new Kconfig file can still contain the old Kconfig symbol and the new one defaults to it. Something like this:

config TINYDRM_ST7586
  tristate
  default n

config DRM_ST7586
  tristate "bla bla"
  ...
  default TINYDRM_ST7586

Doing 'make olddefconfig' or a similar make command sets the new symbol from the pre-existing one. After a few releases the old symbol can be removed.

Best regards
Thomas

[1] https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&highlight_names=&date=2025-05-05&show_html=true

Quoted 4 lines
Quoted 4 lines

Best regards
Thomas

Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
#4 lore raw
Quoted 26 lines · Thomas Zimmermann

Hi Javier, Marcus

Am 05.05.25 um 11:27 schrieb Javier Martinez Canillas:

Quoted 6 lines

Thomas Zimmermann <[email protected]> writes:

Hello Thomas,

Quoted 2 lines

Hi,

Quoted 7 lines
Quoted 4 lines

there's one major issue here. You must not change the Kconfig symbols or you'll break kernel updates for a lot of people. So those TINYDRM_* must remain as is.

I disagree. The https://docs.kernel.org/admin-guide/abi.html document explictly states that Kconfig symbols are not an ABI, and userspace should not rely on these not changing over time.

To summarize our discussion on irc [1]: changing the symbols is ok, but we should make it compatible to ease the transition. To do so, the new Kconfig file can still contain the old Kconfig symbol and the new one defaults to it. Something like this:

config TINYDRM_ST7586
  tristate
  default n

Quoted 9 lines

config DRM_ST7586
  tristate "bla bla"
  ...
  default TINYDRM_ST7586

Doing 'make olddefconfig' or a similar make command sets the new symbol from the pre-existing one. After a few releases the old symbol can be removed.

That makes sense to me, yes. I'm not against making the life of distro maintainers easier. We can then drop these transition symbols after a few kernel releases.

Quoted 7 lines

Best regards
Thomas

[1]
https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel&highlight_names=&date=2025-05-05&show_html=true

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat