aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-12-12 18:18:02 -0500
committerDave Airlie <airlied@redhat.com>2014-12-12 18:18:02 -0500
commit731d754550b4076d39e06e656ba608612e3f63dd (patch)
tree2140febd12c30a2baab51e39999377fef33eac03 /drivers
parentb59f78228ca3d81ecb491fb17d348b07002dbe03 (diff)
parentf78e772a2c7aa4e96398de9e3fa0be750c705d3a (diff)
Merge branch 'drm-sti-next-2014-12-11' of http://git.linaro.org/people/benjamin.gaignard/kernel into drm-next
This series of patches fix various issues in STI drm driver. Now HDMI i2c adapter could be selected in device tree and plug detection doesn't use gpio anymore. I also had fix some signal timing problems after testing the driver on more hardware. The remaining patches attemps to simplify the code and prepare the next evolutions like DVO and auxiliary CRTC support * 'drm-sti-next-2014-12-11' of http://git.linaro.org/people/benjamin.gaignard/kernel: drm: sti: correctly cleanup CRTC and planes drm: sti: add HQVDP plane drm: sti: add cursor plane drm: sti: enable auxiliary CRTC drm: sti: fix delay in VTG programming drm: sti: prepare sti_tvout to support auxiliary crtc drm: sti: use drm_crtc_vblank_{on/off} instead of drm_vblank_{on/off} drm: sti: fix hdmi avi infoframe drm: sti: remove event lock while disabling vblank drm: sti: simplify gdp code drm: sti: clear all mixer control drm: sti: remove gpio for HDMI hot plug detection drm: sti: allow to change hdmi ddc i2c adapter
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/sti/Kconfig1
-rw-r--r--drivers/gpu/drm/sti/Makefile4
-rw-r--r--drivers/gpu/drm/sti/sti_compositor.c20
-rw-r--r--drivers/gpu/drm/sti/sti_compositor.h2
-rw-r--r--drivers/gpu/drm/sti/sti_cursor.c242
-rw-r--r--drivers/gpu/drm/sti/sti_cursor.h12
-rw-r--r--drivers/gpu/drm/sti/sti_drm_crtc.c23
-rw-r--r--drivers/gpu/drm/sti/sti_drm_drv.c6
-rw-r--r--drivers/gpu/drm/sti/sti_drm_plane.c3
-rw-r--r--drivers/gpu/drm/sti/sti_gdp.c62
-rw-r--r--drivers/gpu/drm/sti/sti_hdmi.c84
-rw-r--r--drivers/gpu/drm/sti/sti_hdmi.h6
-rw-r--r--drivers/gpu/drm/sti/sti_hqvdp.c1072
-rw-r--r--drivers/gpu/drm/sti/sti_hqvdp.h12
-rw-r--r--drivers/gpu/drm/sti/sti_hqvdp_lut.h373
-rw-r--r--drivers/gpu/drm/sti/sti_layer.c16
-rw-r--r--drivers/gpu/drm/sti/sti_layer.h12
-rw-r--r--drivers/gpu/drm/sti/sti_mixer.c17
-rw-r--r--drivers/gpu/drm/sti/sti_mixer.h3
-rw-r--r--drivers/gpu/drm/sti/sti_tvout.c104
-rw-r--r--drivers/gpu/drm/sti/sti_vtg.c31
21 files changed, 1972 insertions, 133 deletions
diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig
index ae8850f3e63b..d6d6b705b8c1 100644
--- a/drivers/gpu/drm/sti/Kconfig
+++ b/drivers/gpu/drm/sti/Kconfig
@@ -5,6 +5,7 @@ config DRM_STI
5 select DRM_KMS_HELPER 5 select DRM_KMS_HELPER
6 select DRM_GEM_CMA_HELPER 6 select DRM_GEM_CMA_HELPER
7 select DRM_KMS_CMA_HELPER 7 select DRM_KMS_CMA_HELPER
8 select FW_LOADER_USER_HELPER_FALLBACK
8 help 9 help
9 Choose this option to enable DRM on STM stiH41x chipset 10 Choose this option to enable DRM on STM stiH41x chipset
10 11
diff --git a/drivers/gpu/drm/sti/Makefile b/drivers/gpu/drm/sti/Makefile
index 04ac2ceef27f..6ba9d27c1b90 100644
--- a/drivers/gpu/drm/sti/Makefile
+++ b/drivers/gpu/drm/sti/Makefile
@@ -3,6 +3,7 @@ sticompositor-y := \
3 sti_mixer.o \ 3 sti_mixer.o \
4 sti_gdp.o \ 4 sti_gdp.o \
5 sti_vid.o \ 5 sti_vid.o \
6 sti_cursor.o \
6 sti_compositor.o \ 7 sti_compositor.o \
7 sti_drm_crtc.o \ 8 sti_drm_crtc.o \
8 sti_drm_plane.o 9 sti_drm_plane.o
@@ -18,4 +19,5 @@ obj-$(CONFIG_DRM_STI) = \
18 sti_hda.o \ 19 sti_hda.o \
19 sti_tvout.o \ 20 sti_tvout.o \
20 sticompositor.o \ 21 sticompositor.o \
21 sti_drm_drv.o \ No newline at end of file 22 sti_hqvdp.o \
23 sti_drm_drv.o
diff --git a/drivers/gpu/drm/sti/sti_compositor.c b/drivers/gpu/drm/sti/sti_compositor.c
index 390d93e9a06c..c5cf4aea9694 100644
--- a/drivers/gpu/drm/sti/sti_compositor.c
+++ b/drivers/gpu/drm/sti/sti_compositor.c
@@ -24,14 +24,16 @@
24 * stiH407 compositor properties 24 * stiH407 compositor properties
25 */ 25 */
26struct sti_compositor_data stih407_compositor_data = { 26struct sti_compositor_data stih407_compositor_data = {
27 .nb_subdev = 6, 27 .nb_subdev = 8,
28 .subdev_desc = { 28 .subdev_desc = {
29 {STI_CURSOR_SUBDEV, (int)STI_CURSOR, 0x000},
29 {STI_GPD_SUBDEV, (int)STI_GDP_0, 0x100}, 30 {STI_GPD_SUBDEV, (int)STI_GDP_0, 0x100},
30 {STI_GPD_SUBDEV, (int)STI_GDP_1, 0x200}, 31 {STI_GPD_SUBDEV, (int)STI_GDP_1, 0x200},
31 {STI_GPD_SUBDEV, (int)STI_GDP_2, 0x300}, 32 {STI_GPD_SUBDEV, (int)STI_GDP_2, 0x300},
32 {STI_GPD_SUBDEV, (int)STI_GDP_3, 0x400}, 33 {STI_GPD_SUBDEV, (int)STI_GDP_3, 0x400},
33 {STI_VID_SUBDEV, (int)STI_VID_0, 0x700}, 34 {STI_VID_SUBDEV, (int)STI_VID_0, 0x700},
34 {STI_MIXER_MAIN_SUBDEV, STI_MIXER_MAIN, 0xC00} 35 {STI_MIXER_MAIN_SUBDEV, STI_MIXER_MAIN, 0xC00},
36 {STI_MIXER_AUX_SUBDEV, STI_MIXER_AUX, 0xD00},
35 }, 37 },
36}; 38};
37 39
@@ -67,11 +69,11 @@ static int sti_compositor_init_subdev(struct sti_compositor *compo,
67 break; 69 break;
68 case STI_GPD_SUBDEV: 70 case STI_GPD_SUBDEV:
69 case STI_VID_SUBDEV: 71 case STI_VID_SUBDEV:
72 case STI_CURSOR_SUBDEV:
70 compo->layer[layer_id++] = 73 compo->layer[layer_id++] =
71 sti_layer_create(compo->dev, desc[i].id, 74 sti_layer_create(compo->dev, desc[i].id,
72 compo->regs + desc[i].offset); 75 compo->regs + desc[i].offset);
73 break; 76 break;
74 /* case STI_CURSOR_SUBDEV : TODO */
75 default: 77 default:
76 DRM_ERROR("Unknow subdev compoment type\n"); 78 DRM_ERROR("Unknow subdev compoment type\n");
77 return 1; 79 return 1;
@@ -102,33 +104,35 @@ static int sti_compositor_bind(struct device *dev, struct device *master,
102 enum sti_layer_type type = desc & STI_LAYER_TYPE_MASK; 104 enum sti_layer_type type = desc & STI_LAYER_TYPE_MASK;
103 enum drm_plane_type plane_type = DRM_PLANE_TYPE_OVERLAY; 105 enum drm_plane_type plane_type = DRM_PLANE_TYPE_OVERLAY;
104 106
105 if (compo->mixer[crtc]) 107 if (crtc < compo->nb_mixers)
106 plane_type = DRM_PLANE_TYPE_PRIMARY; 108 plane_type = DRM_PLANE_TYPE_PRIMARY;
107 109
108 switch (type) { 110 switch (type) {
109 case STI_CUR: 111 case STI_CUR:
110 cursor = sti_drm_plane_init(drm_dev, 112 cursor = sti_drm_plane_init(drm_dev,
111 compo->layer[i], 113 compo->layer[i],
112 (1 << crtc) - 1, 114 1, DRM_PLANE_TYPE_CURSOR);
113 DRM_PLANE_TYPE_CURSOR);
114 break; 115 break;
115 case STI_GDP: 116 case STI_GDP:
116 case STI_VID: 117 case STI_VID:
117 primary = sti_drm_plane_init(drm_dev, 118 primary = sti_drm_plane_init(drm_dev,
118 compo->layer[i], 119 compo->layer[i],
119 (1 << crtc) - 1, plane_type); 120 (1 << compo->nb_mixers) - 1,
121 plane_type);
120 plane++; 122 plane++;
121 break; 123 break;
122 case STI_BCK: 124 case STI_BCK:
125 case STI_VDP:
123 break; 126 break;
124 } 127 }
125 128
126 /* The first planes are reserved for primary planes*/ 129 /* The first planes are reserved for primary planes*/
127 if (compo->mixer[crtc]) { 130 if (crtc < compo->nb_mixers && primary) {
128 sti_drm_crtc_init(drm_dev, compo->mixer[crtc], 131 sti_drm_crtc_init(drm_dev, compo->mixer[crtc],
129 primary, cursor); 132 primary, cursor);
130 crtc++; 133 crtc++;
131 cursor = NULL; 134 cursor = NULL;
135 primary = NULL;
132 } 136 }
133 } 137 }
134 } 138 }
diff --git a/drivers/gpu/drm/sti/sti_compositor.h b/drivers/gpu/drm/sti/sti_compositor.h
index 3ea19db72e0f..019eb44c62cc 100644
--- a/drivers/gpu/drm/sti/sti_compositor.h
+++ b/drivers/gpu/drm/sti/sti_compositor.h
@@ -64,7 +64,6 @@ struct sti_compositor_data {
64 * @layer: array of layers 64 * @layer: array of layers
65 * @nb_mixers: number of mixers for this compositor 65 * @nb_mixers: number of mixers for this compositor
66 * @nb_layers: number of layers (GDP,VID,...) for this compositor 66 * @nb_layers: number of layers (GDP,VID,...) for this compositor
67 * @enable: true if compositor is enable else false
68 * @vtg_vblank_nb: callback for VTG VSYNC notification 67 * @vtg_vblank_nb: callback for VTG VSYNC notification
69 */ 68 */
70struct sti_compositor { 69struct sti_compositor {
@@ -83,7 +82,6 @@ struct sti_compositor {
83 struct sti_layer *layer[STI_MAX_LAYER]; 82 struct sti_layer *layer[STI_MAX_LAYER];