summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2019-07-22 06:43:11 -0400
committerNoralf Trønnes <noralf@tronnes.org>2019-07-25 04:45:07 -0400
commit174102f4de230a1bf85e6ef2f8c83e50b3ba22c9 (patch)
tree8cb1050af55a4f29180b16edae16fe2b96c61d0c
parent2d2bb61a6ce121902f0f621f88def07b4e59da0a (diff)
drm/tinydrm: Move mipi-dbi
This moves mipi-dbi to be a core helper with the name drm_mipi_dbi. Fixup include's in drivers. Move the docs entry and delete tinydrm.rst. Delete the last tinydrm todo entry. v2: Make DRM_MIPI_DBI tristate to enable it being built as a module. Cc: Eric Anholt <eric@anholt.net> Cc: David Lechner <david@lechnology.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: David Lechner <david@lechnology.com> Acked-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190722104312.16184-9-noralf@tronnes.org
-rw-r--r--Documentation/gpu/drivers.rst1
-rw-r--r--Documentation/gpu/drm-kms-helpers.rst12
-rw-r--r--Documentation/gpu/tinydrm.rst18
-rw-r--r--Documentation/gpu/todo.rst13
-rw-r--r--drivers/gpu/drm/Kconfig4
-rw-r--r--drivers/gpu/drm/Makefile1
-rw-r--r--drivers/gpu/drm/drm_mipi_dbi.c (renamed from drivers/gpu/drm/tinydrm/mipi-dbi.c)2
-rw-r--r--drivers/gpu/drm/tinydrm/Kconfig16
-rw-r--r--drivers/gpu/drm/tinydrm/Makefile4
-rw-r--r--drivers/gpu/drm/tinydrm/hx8357d.c2
-rw-r--r--drivers/gpu/drm/tinydrm/ili9225.c2
-rw-r--r--drivers/gpu/drm/tinydrm/ili9341.c2
-rw-r--r--drivers/gpu/drm/tinydrm/mi0283qt.c2
-rw-r--r--drivers/gpu/drm/tinydrm/st7586.c2
-rw-r--r--drivers/gpu/drm/tinydrm/st7735r.c2
-rw-r--r--include/drm/drm_mipi_dbi.h (renamed from include/drm/tinydrm/mipi-dbi.h)0
16 files changed, 30 insertions, 53 deletions
diff --git a/Documentation/gpu/drivers.rst b/Documentation/gpu/drivers.rst
index 4bfb7068e9f7..b4a0ed3ca961 100644
--- a/Documentation/gpu/drivers.rst
+++ b/Documentation/gpu/drivers.rst
@@ -11,7 +11,6 @@ GPU Driver Documentation
11 meson 11 meson
12 pl111 12 pl111
13 tegra 13 tegra
14 tinydrm
15 tve200 14 tve200
16 v3d 15 v3d
17 vc4 16 vc4
diff --git a/Documentation/gpu/drm-kms-helpers.rst b/Documentation/gpu/drm-kms-helpers.rst
index b327bbc11182..3868008db8a9 100644
--- a/Documentation/gpu/drm-kms-helpers.rst
+++ b/Documentation/gpu/drm-kms-helpers.rst
@@ -263,6 +263,18 @@ the MST topology helpers easier to understand
263 drm_dp_mst_topology_put_port 263 drm_dp_mst_topology_put_port
264 drm_dp_mst_get_mstb_malloc drm_dp_mst_put_mstb_malloc 264 drm_dp_mst_get_mstb_malloc drm_dp_mst_put_mstb_malloc
265 265
266MIPI DBI Helper Functions Reference
267===================================
268
269.. kernel-doc:: drivers/gpu/drm/drm_mipi_dbi.c
270 :doc: overview
271
272.. kernel-doc:: include/drm/drm_mipi_dbi.h
273 :internal:
274
275.. kernel-doc:: drivers/gpu/drm/drm_mipi_dbi.c
276 :export:
277
266MIPI DSI Helper Functions Reference 278MIPI DSI Helper Functions Reference
267=================================== 279===================================
268 280
diff --git a/Documentation/gpu/tinydrm.rst b/Documentation/gpu/tinydrm.rst
deleted file mode 100644
index 64bdf6356024..000000000000
--- a/Documentation/gpu/tinydrm.rst
+++ /dev/null
@@ -1,18 +0,0 @@
1============================
2drm/tinydrm Tiny DRM drivers
3============================
4
5tinydrm is a collection of DRM drivers that are so small they can fit in a
6single source file.
7
8MIPI DBI Compatible Controllers
9===============================
10
11.. kernel-doc:: drivers/gpu/drm/tinydrm/mipi-dbi.c
12 :doc: overview
13
14.. kernel-doc:: include/drm/tinydrm/mipi-dbi.h
15 :internal:
16
17.. kernel-doc:: drivers/gpu/drm/tinydrm/mipi-dbi.c
18 :export:
diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 688b4adbbf62..b81cc007acb8 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -437,19 +437,6 @@ Contact: Daniel Vetter
437Driver Specific 437Driver Specific
438=============== 438===============
439 439
440tinydrm
441-------
442
443Tinydrm is the helper driver for really simple fb drivers. The goal is to make
444those drivers as simple as possible, so lots of room for refactoring:
445
446- extract the mipi-dbi helper (well, the non-tinydrm specific parts at
447 least) into a separate helper, like we have for mipi-dsi already. Or follow
448 one of the ideas for having a shared dsi/dbi helper, abstracting away the
449 transport details more.
450
451Contact: Noralf Trønnes, Daniel Vetter
452
453AMD DC Display Driver 440AMD DC Display Driver
454--------------------- 441---------------------
455 442
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index f96b09333fad..a88581b0f002 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -24,6 +24,10 @@ menuconfig DRM
24 details. You should also select and configure AGP 24 details. You should also select and configure AGP
25 (/dev/agpgart) support if it is available for your platform. 25 (/dev/agpgart) support if it is available for your platform.
26 26
27config DRM_MIPI_DBI
28 tristate
29 depends on DRM
30
27config DRM_MIPI_DSI 31config DRM_MIPI_DSI
28 bool 32 bool
29 depends on DRM 33 depends on DRM
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 9728900fb3a2..98c732f925c7 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -55,6 +55,7 @@ obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
55obj-$(CONFIG_DRM_DEBUG_SELFTEST) += selftests/ 55obj-$(CONFIG_DRM_DEBUG_SELFTEST) += selftests/
56 56
57obj-$(CONFIG_DRM) += drm.o 57obj-$(CONFIG_DRM) += drm.o
58obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o
58obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o 59obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
59obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o 60obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o
60obj-y += arm/ 61obj-y += arm/
diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c
index d6f3406a4075..1961f713aaab 100644
--- a/drivers/gpu/drm/tinydrm/mipi-dbi.c
+++ b/drivers/gpu/drm/drm_mipi_dbi.c
@@ -20,11 +20,11 @@
20#include <drm/drm_format_helper.h> 20#include <drm/drm_format_helper.h>
21#include <drm/drm_fourcc.h> 21#include <drm/drm_fourcc.h>
22#include <drm/drm_gem_framebuffer_helper.h> 22#include <drm/drm_gem_framebuffer_helper.h>
23#include <drm/drm_mipi_dbi.h>
23#include <drm/drm_modes.h> 24#include <drm/drm_modes.h>
24#include <drm/drm_probe_helper.h> 25#include <drm/drm_probe_helper.h>
25#include <drm/drm_rect.h> 26#include <drm/drm_rect.h>
26#include <drm/drm_vblank.h> 27#include <drm/drm_vblank.h>
27#include <drm/tinydrm/mipi-dbi.h>
28#include <video/mipi_display.h> 28#include <video/mipi_display.h>
29 29
30#define MIPI_DBI_MAX_SPI_READ_SPEED 2000000 /* 2MHz */ 30#define MIPI_DBI_MAX_SPI_READ_SPEED 2000000 /* 2MHz */
diff --git a/drivers/gpu/drm/tinydrm/Kconfig b/drivers/gpu/drm/tinydrm/Kconfig
index 637697649612..42b06f4f8989 100644
--- a/drivers/gpu/drm/tinydrm/Kconfig
+++ b/drivers/gpu/drm/tinydrm/Kconfig
@@ -8,14 +8,10 @@ menuconfig DRM_TINYDRM
8 Choose this option if you have a tinydrm supported display. 8 Choose this option if you have a tinydrm supported display.
9 If M is selected the module will be called tinydrm. 9 If M is selected the module will be called tinydrm.
10 10
11config TINYDRM_MIPI_DBI
12 tristate
13 select DRM_KMS_HELPER
14
15config TINYDRM_HX8357D 11config TINYDRM_HX8357D
16 tristate "DRM support for HX8357D display panels" 12 tristate "DRM support for HX8357D display panels"
17 depends on DRM_TINYDRM && SPI 13 depends on DRM_TINYDRM && SPI
18 select TINYDRM_MIPI_DBI 14 select DRM_MIPI_DBI
19 select BACKLIGHT_CLASS_DEVICE 15 select BACKLIGHT_CLASS_DEVICE
20 help 16 help
21 DRM driver for the following HX8357D panels: 17 DRM driver for the following HX8357D panels:
@@ -26,7 +22,7 @@ config TINYDRM_HX8357D
26config TINYDRM_ILI9225 22config TINYDRM_ILI9225
27 tristate "DRM support for ILI9225 display panels" 23 tristate "DRM support for ILI9225 display panels"
28 depends on DRM_TINYDRM && SPI 24 depends on DRM_TINYDRM && SPI
29 select TINYDRM_MIPI_DBI 25 select DRM_MIPI_DBI
30 help 26 help
31 DRM driver for the following Ilitek ILI9225 panels: 27 DRM driver for the following Ilitek ILI9225 panels:
32 * No-name 2.2" color screen module 28 * No-name 2.2" color screen module
@@ -36,7 +32,7 @@ config TINYDRM_ILI9225
36config TINYDRM_ILI9341 32config TINYDRM_ILI9341
37 tristate "DRM support for ILI9341 display panels" 33 tristate "DRM support for ILI9341 display panels"
38 depends on DRM_TINYDRM && SPI 34 depends on DRM_TINYDRM && SPI
39 select TINYDRM_MIPI_DBI 35 select DRM_MIPI_DBI
40 select BACKLIGHT_CLASS_DEVICE 36 select BACKLIGHT_CLASS_DEVICE
41 help 37 help
42 DRM driver for the following Ilitek ILI9341 panels: 38 DRM driver for the following Ilitek ILI9341 panels:
@@ -47,7 +43,7 @@ config TINYDRM_ILI9341
47config TINYDRM_MI0283QT 43config TINYDRM_MI0283QT
48 tristate "DRM support for MI0283QT" 44 tristate "DRM support for MI0283QT"
49 depends on DRM_TINYDRM && SPI 45 depends on DRM_TINYDRM && SPI
50 select TINYDRM_MIPI_DBI 46 select DRM_MIPI_DBI
51 select BACKLIGHT_CLASS_DEVICE 47 select BACKLIGHT_CLASS_DEVICE
52 help 48 help
53 DRM driver for the Multi-Inno MI0283QT display panel 49 DRM driver for the Multi-Inno MI0283QT display panel
@@ -69,7 +65,7 @@ config TINYDRM_REPAPER
69config TINYDRM_ST7586 65config TINYDRM_ST7586
70 tristate "DRM support for Sitronix ST7586 display panels" 66 tristate "DRM support for Sitronix ST7586 display panels"
71 depends on DRM_TINYDRM && SPI 67 depends on DRM_TINYDRM && SPI
72 select TINYDRM_MIPI_DBI 68 select DRM_MIPI_DBI
73 help 69 help
74 DRM driver for the following Sitronix ST7586 panels: 70 DRM driver for the following Sitronix ST7586 panels:
75 * LEGO MINDSTORMS EV3 71 * LEGO MINDSTORMS EV3
@@ -79,7 +75,7 @@ config TINYDRM_ST7586
79config TINYDRM_ST7735R 75config TINYDRM_ST7735R
80 tristate "DRM support for Sitronix ST7735R display panels" 76 tristate "DRM support for Sitronix ST7735R display panels"
81 depends on DRM_TINYDRM && SPI 77 depends on DRM_TINYDRM && SPI
82 select TINYDRM_MIPI_DBI 78 select DRM_MIPI_DBI
83 select BACKLIGHT_CLASS_DEVICE 79 select BACKLIGHT_CLASS_DEVICE
84 help 80 help
85 DRM driver Sitronix ST7735R with one of the following LCDs: 81 DRM driver Sitronix ST7735R with one of the following LCDs:
diff --git a/drivers/gpu/drm/tinydrm/Makefile b/drivers/gpu/drm/tinydrm/Makefile
index ab6b9bebf321..6490167a9ad1 100644
--- a/drivers/gpu/drm/tinydrm/Makefile
+++ b/drivers/gpu/drm/tinydrm/Makefile
@@ -1,9 +1,5 @@
1# SPDX-License-Identifier: GPL-2.0-only 1# SPDX-License-Identifier: GPL-2.0-only
2 2
3# Controllers
4obj-$(CONFIG_TINYDRM_MIPI_DBI) += mipi-dbi.o
5
6# Displays
7obj-$(CONFIG_TINYDRM_HX8357D) += hx8357d.o 3obj-$(CONFIG_TINYDRM_HX8357D) += hx8357d.o
8obj-$(CONFIG_TINYDRM_ILI9225) += ili9225.o 4obj-$(CONFIG_TINYDRM_ILI9225) += ili9225.o
9obj-$(CONFIG_TINYDRM_ILI9341) += ili9341.o 5obj-$(CONFIG_TINYDRM_ILI9341) += ili9341.o
diff --git a/drivers/gpu/drm/tinydrm/hx8357d.c b/drivers/gpu/drm/tinydrm/hx8357d.c
index 471e545154b3..9af8ff84974f 100644
--- a/drivers/gpu/drm/tinydrm/hx8357d.c
+++ b/drivers/gpu/drm/tinydrm/hx8357d.c
@@ -21,8 +21,8 @@
21#include <drm/drm_fb_helper.h> 21#include <drm/drm_fb_helper.h>
22#include <drm/drm_gem_cma_helper.h> 22#include <drm/drm_gem_cma_helper.h>
23#include <drm/drm_gem_framebuffer_helper.h> 23#include <drm/drm_gem_framebuffer_helper.h>
24#include <drm/drm_mipi_dbi.h>
24#include <drm/drm_modeset_helper.h> 25#include <drm/drm_modeset_helper.h>
25#include <drm/tinydrm/mipi-dbi.h>
26#include <video/mipi_display.h> 26#include <video/mipi_display.h>
27 27
28#define HX8357D_SETOSC 0xb0 28#define HX8357D_SETOSC 0xb0
diff --git a/drivers/gpu/drm/tinydrm/ili9225.c b/drivers/gpu/drm/tinydrm/ili9225.c
index 33766fc21b2b..c66acc566c2b 100644
--- a/drivers/gpu/drm/tinydrm/ili9225.c
+++ b/drivers/gpu/drm/tinydrm/ili9225.c
@@ -24,9 +24,9 @@
24#include <drm/drm_fourcc.h> 24#include <drm/drm_fourcc.h>
25#include <drm/drm_gem_cma_helper.h> 25#include <drm/drm_gem_cma_helper.h>
26#include <drm/drm_gem_framebuffer_helper.h> 26#include <drm/drm_gem_framebuffer_helper.h>
27#include <drm/drm_mipi_dbi.h>
27#include <drm/drm_rect.h> 28#include <drm/drm_rect.h>
28#include <drm/drm_vblank.h> 29#include <drm/drm_vblank.h>
29#include <drm/tinydrm/mipi-dbi.h>
30 30
31#define ILI9225_DRIVER_READ_CODE 0x00 31#define ILI9225_DRIVER_READ_CODE 0x00
32#define ILI9225_DRIVER_OUTPUT_CONTROL 0x01 32#define ILI9225_DRIVER_OUTPUT_CONTROL 0x01
diff --git a/drivers/gpu/drm/tinydrm/ili9341.c b/drivers/gpu/drm/tinydrm/ili9341.c
index 71af275522a5..33b51dc7faa8 100644
--- a/drivers/gpu/drm/tinydrm/ili9341.c
+++ b/drivers/gpu/drm/tinydrm/ili9341.c
@@ -20,8 +20,8 @@
20#include <drm/drm_fb_helper.h> 20#include <drm/drm_fb_helper.h>
21#include <drm/drm_gem_cma_helper.h> 21#include <drm/drm_gem_cma_helper.h>
22#include <drm/drm_gem_framebuffer_helper.h> 22#include <drm/drm_gem_framebuffer_helper.h>
23#include <drm/drm_mipi_dbi.h>
23#include <drm/drm_modeset_helper.h> 24#include <drm/drm_modeset_helper.h>
24#include <drm/tinydrm/mipi-dbi.h>
25#include <video/mipi_display.h> 25#include <video/mipi_display.h>
26 26
27#define ILI9341_FRMCTR1 0xb1 27#define ILI9341_FRMCTR1 0xb1
diff --git a/drivers/gpu/drm/tinydrm/mi0283qt.c b/drivers/gpu/drm/tinydrm/mi0283qt.c
index 7925f69bc502..e2cfd9a17143 100644
--- a/drivers/gpu/drm/tinydrm/mi0283qt.c
+++ b/drivers/gpu/drm/tinydrm/mi0283qt.c
@@ -18,8 +18,8 @@
18#include <drm/drm_fb_helper.h> 18#include <drm/drm_fb_helper.h>
19#include <drm/drm_gem_cma_helper.h> 19#include <drm/drm_gem_cma_helper.h>
20#include <drm/drm_gem_framebuffer_helper.h> 20#include <drm/drm_gem_framebuffer_helper.h>
21#include <drm/drm_mipi_dbi.h>
21#include <drm/drm_modeset_helper.h> 22#include <drm/drm_modeset_helper.h>
22#include <drm/tinydrm/mipi-dbi.h>
23#include <video/mipi_display.h> 23#include <video/mipi_display.h>
24 24
25#define ILI9341_FRMCTR1 0xb1 25#define ILI9341_FRMCTR1 0xb1
diff --git a/drivers/gpu/drm/tinydrm/st7586.c b/drivers/gpu/drm/tinydrm/st7586.c
index 51871ee16ef6..3cc21a1b30c8 100644
--- a/drivers/gpu/drm/tinydrm/st7586.c
+++ b/drivers/gpu/drm/tinydrm/st7586.c
@@ -21,9 +21,9 @@
21#include <drm/drm_format_helper.h> 21#include <drm/drm_format_helper.h>
22#include <drm/drm_gem_cma_helper.h> 22#include <drm/drm_gem_cma_helper.h>
23#include <drm/drm_gem_framebuffer_helper.h> 23#include <drm/drm_gem_framebuffer_helper.h>
24#include <drm/drm_mipi_dbi.h>
24#include <drm/drm_rect.h> 25#include <drm/drm_rect.h>
25#include <drm/drm_vblank.h> 26#include <drm/drm_vblank.h>
26#include <drm/tinydrm/mipi-dbi.h>
27 27
28/* controller-specific commands */ 28/* controller-specific commands */
29#define ST7586_DISP_MODE_GRAY 0x38 29#define ST7586_DISP_MODE_GRAY 0x38
diff --git a/drivers/gpu/drm/tinydrm/st7735r.c b/drivers/gpu/drm/tinydrm/st7735r.c
index 66275ef3a456..3f4487c71684 100644
--- a/drivers/gpu/drm/tinydrm/st7735r.c
+++ b/drivers/gpu/drm/tinydrm/st7735r.c
@@ -19,7 +19,7 @@
19#include <drm/drm_fb_helper.h> 19#include <drm/drm_fb_helper.h>
20#include <drm/drm_gem_cma_helper.h> 20#include <drm/drm_gem_cma_helper.h>
21#include <drm/drm_gem_framebuffer_helper.h> 21#include <drm/drm_gem_framebuffer_helper.h>
22#include <drm/tinydrm/mipi-dbi.h> 22#include <drm/drm_mipi_dbi.h>
23 23
24#define ST7735R_FRMCTR1 0xb1 24#define ST7735R_FRMCTR1 0xb1
25#define ST7735R_FRMCTR2 0xb2 25#define ST7735R_FRMCTR2 0xb2
diff --git a/include/drm/tinydrm/mipi-dbi.h b/include/drm/drm_mipi_dbi.h
index 67c66f5ee591..67c66f5ee591 100644
--- a/include/drm/tinydrm/mipi-dbi.h
+++ b/include/drm/drm_mipi_dbi.h