aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-08-26 18:42:56 -0400
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-09-15 04:55:47 -0400
commit1d46fea7d091f9dc2d4fd3fcb9f0117ca288f9a5 (patch)
tree03074e1371f28dfffbc461b35dd4364702cc58f4
parentcd8968f3dd520fae9623ab7d9154760e8feb27c2 (diff)
drm/rcar-du: Use struct videomode in platform data
In preparation for DT support where panel timings will be described by a DRM-agnostic video mode, replace the struct drm_mode_modeinfo instance in the panel platform data with a struct videomode. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-rw-r--r--arch/arm/mach-shmobile/board-koelsch-reference.c19
-rw-r--r--arch/arm/mach-shmobile/board-koelsch.c19
-rw-r--r--arch/arm/mach-shmobile/board-lager-reference.c19
-rw-r--r--arch/arm/mach-shmobile/board-lager.c19
-rw-r--r--arch/arm/mach-shmobile/board-marzen.c19
-rw-r--r--drivers/gpu/drm/rcar-du/Kconfig1
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c15
-rw-r--r--include/linux/platform_data/rcar-du.h4
8 files changed, 51 insertions, 64 deletions
diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
index 3ff88c138896..364e69bf85d4 100644
--- a/arch/arm/mach-shmobile/board-koelsch-reference.c
+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
@@ -41,16 +41,15 @@ static struct rcar_du_encoder_data koelsch_du_encoders[] = {
41 .width_mm = 210, 41 .width_mm = 210,
42 .height_mm = 158, 42 .height_mm = 158,
43 .mode = { 43 .mode = {
44 .clock = 65000, 44 .pixelclock = 65000000,
45 .hdisplay = 1024, 45 .hactive = 1024,
46 .hsync_start = 1048, 46 .hfront_porch = 20,
47 .hsync_end = 1184, 47 .hback_porch = 160,
48 .htotal = 1344, 48 .hsync_len = 136,
49 .vdisplay = 768, 49 .vactive = 768,
50 .vsync_start = 771, 50 .vfront_porch = 3,
51 .vsync_end = 777, 51 .vback_porch = 29,
52 .vtotal = 806, 52 .vsync_len = 6,
53 .flags = 0,
54 }, 53 },
55 }, 54 },
56 }, 55 },
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
index b7d5bc7659cd..ad10ddb6a321 100644
--- a/arch/arm/mach-shmobile/board-koelsch.c
+++ b/arch/arm/mach-shmobile/board-koelsch.c
@@ -63,16 +63,15 @@ static struct rcar_du_encoder_data koelsch_du_encoders[] = {
63 .width_mm = 210, 63 .width_mm = 210,
64 .height_mm = 158, 64 .height_mm = 158,
65 .mode = { 65 .mode = {
66 .clock = 65000, 66 .pixelclock = 65000000,
67 .hdisplay = 1024, 67 .hactive = 1024,
68 .hsync_start = 1048, 68 .hfront_porch = 20,
69 .hsync_end = 1184, 69 .hback_porch = 160,
70 .htotal = 1344, 70 .hsync_len = 136,
71 .vdisplay = 768, 71 .vactive = 768,
72 .vsync_start = 771, 72 .vfront_porch = 3,
73 .vsync_end = 777, 73 .vback_porch = 29,
74 .vtotal = 806, 74 .vsync_len = 6,
75 .flags = 0,
76 }, 75 },
77 }, 76 },
78 }, 77 },
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
index 41c808e56005..12a53a1c3d02 100644
--- a/arch/arm/mach-shmobile/board-lager-reference.c
+++ b/arch/arm/mach-shmobile/board-lager-reference.c
@@ -43,16 +43,15 @@ static struct rcar_du_encoder_data lager_du_encoders[] = {
43 .width_mm = 210, 43 .width_mm = 210,
44 .height_mm = 158, 44 .height_mm = 158,
45 .mode = { 45 .mode = {
46 .clock = 65000, 46 .pixelclock = 65000000,
47 .hdisplay = 1024, 47 .hactive = 1024,
48 .hsync_start = 1048, 48 .hfront_porch = 20,
49 .hsync_end = 1184, 49 .hback_porch = 160,
50 .htotal = 1344, 50 .hsync_len = 136,
51 .vdisplay = 768, 51 .vactive = 768,
52 .vsync_start = 771, 52 .vfront_porch = 3,
53 .vsync_end = 777, 53 .vback_porch = 29,
54 .vtotal = 806, 54 .vsync_len = 6,
55 .flags = 0,
56 }, 55 },
57 }, 56 },
58 }, 57 },
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
index e1d8215da0b0..80576c2ee668 100644
--- a/arch/arm/mach-shmobile/board-lager.c
+++ b/arch/arm/mach-shmobile/board-lager.c
@@ -99,16 +99,15 @@ static struct rcar_du_encoder_data lager_du_encoders[] = {
99 .width_mm = 210, 99 .width_mm = 210,
100 .height_mm = 158, 100 .height_mm = 158,
101 .mode = { 101 .mode = {
102 .clock = 65000, 102 .pixelclock = 65000000,
103 .hdisplay = 1024, 103 .hactive = 1024,
104 .hsync_start = 1048, 104 .hfront_porch = 20,
105 .hsync_end = 1184, 105 .hback_porch = 160,
106 .htotal = 1344, 106 .hsync_len = 136,
107 .vdisplay = 768, 107 .vactive = 768,
108 .vsync_start = 771, 108 .vfront_porch = 3,
109 .vsync_end = 777, 109 .vback_porch = 29,
110 .vtotal = 806, 110 .vsync_len = 6,
111 .flags = 0,
112 }, 111 },
113 }, 112 },
114 }, 113 },
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index e5cf4201e769..ce33d7825c49 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -192,16 +192,15 @@ static struct rcar_du_encoder_data du_encoders[] = {
192 .width_mm = 210, 192 .width_mm = 210,
193 .height_mm = 158, 193 .height_mm = 158,
194 .mode = { 194 .mode = {
195 .clock = 65000, 195 .pixelclock = 65000000,
196 .hdisplay = 1024, 196 .hactive = 1024,
197 .hsync_start = 1048, 197 .hfront_porch = 20,
198 .hsync_end = 1184, 198 .hback_porch = 160,
199 .htotal = 1344, 199 .hsync_len = 136,
200 .vdisplay = 768, 200 .vactive = 768,
201 .vsync_start = 771, 201 .vfront_porch = 3,
202 .vsync_end = 777, 202 .vback_porch = 29,
203 .vtotal = 806, 203 .vsync_len = 6,
204 .flags = 0,
205 }, 204 },
206 }, 205 },
207 }, 206 },
diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
index 2e3d7b5b0ad7..c96f6089f8bf 100644
--- a/drivers/gpu/drm/rcar-du/Kconfig
+++ b/drivers/gpu/drm/rcar-du/Kconfig
@@ -6,6 +6,7 @@ config DRM_RCAR_DU
6 select DRM_KMS_CMA_HELPER 6 select DRM_KMS_CMA_HELPER
7 select DRM_GEM_CMA_HELPER 7 select DRM_GEM_CMA_HELPER
8 select DRM_KMS_FB_HELPER 8 select DRM_KMS_FB_HELPER
9 select VIDEOMODE_HELPERS
9 help 10 help
10 Choose this option if you have an R-Car chipset. 11 Choose this option if you have an R-Car chipset.
11 If M is selected the module will be called rcar-du-drm. 12 If M is selected the module will be called rcar-du-drm.
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c b/drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c
index cfcf6e74ad0a..d29544121658 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c
@@ -40,18 +40,9 @@ static int rcar_du_lvds_connector_get_modes(struct drm_connector *connector)
40 return 0; 40 return 0;
41 41
42 mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER; 42 mode->type = DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_DRIVER;
43 mode->clock = lvdscon->panel->mode.clock; 43
44 mode->hdisplay = lvdscon->panel->mode.hdisplay; 44 drm_display_mode_from_videomode(&lvdscon->panel->mode, mode);
45 mode->hsync_start = lvdscon->panel->mode.hsync_start; 45
46 mode->hsync_end = lvdscon->panel->mode.hsync_end;
47 mode->htotal = lvdscon->panel->mode.htotal;
48 mode->vdisplay = lvdscon->panel->mode.vdisplay;
49 mode->vsync_start = lvdscon->panel->mode.vsync_start;
50 mode->vsync_end = lvdscon->panel->mode.vsync_end;
51 mode->vtotal = lvdscon->panel->mode.vtotal;
52 mode->flags = lvdscon->panel->mode.flags;
53
54 drm_mode_set_name(mode);
55 drm_mode_probed_add(connector, mode); 46 drm_mode_probed_add(connector, mode);
56 47
57 return 1; 48 return 1;
diff --git a/include/linux/platform_data/rcar-du.h b/include/linux/platform_data/rcar-du.h
index 1a2e9901a22e..a5f045e1d8fe 100644
--- a/include/linux/platform_data/rcar-du.h
+++ b/include/linux/platform_data/rcar-du.h
@@ -14,7 +14,7 @@
14#ifndef __RCAR_DU_H__ 14#ifndef __RCAR_DU_H__
15#define __RCAR_DU_H__ 15#define __RCAR_DU_H__
16 16
17#include <drm/drm_mode.h> 17#include <video/videomode.h>
18 18
19enum rcar_du_output { 19enum rcar_du_output {
20 RCAR_DU_OUTPUT_DPAD0, 20 RCAR_DU_OUTPUT_DPAD0,
@@ -35,7 +35,7 @@ enum rcar_du_encoder_type {
35struct rcar_du_panel_data { 35struct rcar_du_panel_data {
36 unsigned int width_mm; /* Panel width in mm */ 36 unsigned int width_mm; /* Panel width in mm */
37 unsigned int height_mm; /* Panel height in mm */ 37 unsigned int height_mm; /* Panel height in mm */
38 struct drm_mode_modeinfo mode; 38 struct videomode mode;
39}; 39};
40 40
41struct rcar_du_connector_lvds_data { 41struct rcar_du_connector_lvds_data {