diff options
34 files changed, 178 insertions, 317 deletions
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c index 264182f97194..53a4e6942616 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c | |||
| @@ -24,12 +24,12 @@ struct panel_drv_data { | |||
| 24 | 24 | ||
| 25 | struct device *dev; | 25 | struct device *dev; |
| 26 | 26 | ||
| 27 | struct omap_video_timings timings; | 27 | struct videomode timings; |
| 28 | 28 | ||
| 29 | bool invert_polarity; | 29 | bool invert_polarity; |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | static const struct omap_video_timings tvc_pal_timings = { | 32 | static const struct videomode tvc_pal_timings = { |
| 33 | .hactive = 720, | 33 | .hactive = 720, |
| 34 | .vactive = 574, | 34 | .vactive = 574, |
| 35 | .pixelclock = 13500000, | 35 | .pixelclock = 13500000, |
| @@ -127,7 +127,7 @@ static void tvc_disable(struct omap_dss_device *dssdev) | |||
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static void tvc_set_timings(struct omap_dss_device *dssdev, | 129 | static void tvc_set_timings(struct omap_dss_device *dssdev, |
| 130 | struct omap_video_timings *timings) | 130 | struct videomode *timings) |
| 131 | { | 131 | { |
| 132 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 132 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 133 | struct omap_dss_device *in = ddata->in; | 133 | struct omap_dss_device *in = ddata->in; |
| @@ -139,7 +139,7 @@ static void tvc_set_timings(struct omap_dss_device *dssdev, | |||
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | static void tvc_get_timings(struct omap_dss_device *dssdev, | 141 | static void tvc_get_timings(struct omap_dss_device *dssdev, |
| 142 | struct omap_video_timings *timings) | 142 | struct videomode *timings) |
| 143 | { | 143 | { |
| 144 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 144 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 145 | 145 | ||
| @@ -147,7 +147,7 @@ static void tvc_get_timings(struct omap_dss_device *dssdev, | |||
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | static int tvc_check_timings(struct omap_dss_device *dssdev, | 149 | static int tvc_check_timings(struct omap_dss_device *dssdev, |
| 150 | struct omap_video_timings *timings) | 150 | struct videomode *timings) |
| 151 | { | 151 | { |
| 152 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 152 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 153 | struct omap_dss_device *in = ddata->in; | 153 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c index 53967a4a96a7..f4f8bf07f38b 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-dvi.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-dvi.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | #include "../dss/omapdss.h" | 20 | #include "../dss/omapdss.h" |
| 21 | 21 | ||
| 22 | static const struct omap_video_timings dvic_default_timings = { | 22 | static const struct videomode dvic_default_timings = { |
| 23 | .hactive = 640, | 23 | .hactive = 640, |
| 24 | .vactive = 480, | 24 | .vactive = 480, |
| 25 | 25 | ||
| @@ -42,7 +42,7 @@ struct panel_drv_data { | |||
| 42 | struct omap_dss_device dssdev; | 42 | struct omap_dss_device dssdev; |
| 43 | struct omap_dss_device *in; | 43 | struct omap_dss_device *in; |
| 44 | 44 | ||
| 45 | struct omap_video_timings timings; | 45 | struct videomode timings; |
| 46 | 46 | ||
| 47 | struct i2c_adapter *i2c_adapter; | 47 | struct i2c_adapter *i2c_adapter; |
| 48 | }; | 48 | }; |
| @@ -113,7 +113,7 @@ static void dvic_disable(struct omap_dss_device *dssdev) | |||
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | static void dvic_set_timings(struct omap_dss_device *dssdev, | 115 | static void dvic_set_timings(struct omap_dss_device *dssdev, |
| 116 | struct omap_video_timings *timings) | 116 | struct videomode *timings) |
| 117 | { | 117 | { |
| 118 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 118 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 119 | struct omap_dss_device *in = ddata->in; | 119 | struct omap_dss_device *in = ddata->in; |
| @@ -125,7 +125,7 @@ static void dvic_set_timings(struct omap_dss_device *dssdev, | |||
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | static void dvic_get_timings(struct omap_dss_device *dssdev, | 127 | static void dvic_get_timings(struct omap_dss_device *dssdev, |
| 128 | struct omap_video_timings *timings) | 128 | struct videomode *timings) |
| 129 | { | 129 | { |
| 130 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 130 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 131 | 131 | ||
| @@ -133,7 +133,7 @@ static void dvic_get_timings(struct omap_dss_device *dssdev, | |||
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | static int dvic_check_timings(struct omap_dss_device *dssdev, | 135 | static int dvic_check_timings(struct omap_dss_device *dssdev, |
| 136 | struct omap_video_timings *timings) | 136 | struct videomode *timings) |
| 137 | { | 137 | { |
| 138 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 138 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 139 | struct omap_dss_device *in = ddata->in; | 139 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c index f9809f4eb390..4f77e03abd43 100644 --- a/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c +++ b/drivers/gpu/drm/omapdrm/displays/connector-hdmi.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | #include "../dss/omapdss.h" | 22 | #include "../dss/omapdss.h" |
| 23 | 23 | ||
| 24 | static const struct omap_video_timings hdmic_default_timings = { | 24 | static const struct videomode hdmic_default_timings = { |
| 25 | .hactive = 640, | 25 | .hactive = 640, |
| 26 | .vactive = 480, | 26 | .vactive = 480, |
| 27 | .pixelclock = 25175000, | 27 | .pixelclock = 25175000, |
| @@ -41,7 +41,7 @@ struct panel_drv_data { | |||
| 41 | 41 | ||
| 42 | struct device *dev; | 42 | struct device *dev; |
| 43 | 43 | ||
| 44 | struct omap_video_timings timings; | 44 | struct videomode timings; |
| 45 | 45 | ||
| 46 | int hpd_gpio; | 46 | int hpd_gpio; |
| 47 | }; | 47 | }; |
| @@ -120,7 +120,7 @@ static void hdmic_disable(struct omap_dss_device *dssdev) | |||
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | static void hdmic_set_timings(struct omap_dss_device *dssdev, | 122 | static void hdmic_set_timings(struct omap_dss_device *dssdev, |
| 123 | struct omap_video_timings *timings) | 123 | struct videomode *timings) |
| 124 | { | 124 | { |
| 125 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 125 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 126 | struct omap_dss_device *in = ddata->in; | 126 | struct omap_dss_device *in = ddata->in; |
| @@ -132,7 +132,7 @@ static void hdmic_set_timings(struct omap_dss_device *dssdev, | |||
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | static void hdmic_get_timings(struct omap_dss_device *dssdev, | 134 | static void hdmic_get_timings(struct omap_dss_device *dssdev, |
| 135 | struct omap_video_timings *timings) | 135 | struct videomode *timings) |
| 136 | { | 136 | { |
| 137 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 137 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 138 | 138 | ||
| @@ -140,7 +140,7 @@ static void hdmic_get_timings(struct omap_dss_device *dssdev, | |||
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | static int hdmic_check_timings(struct omap_dss_device *dssdev, | 142 | static int hdmic_check_timings(struct omap_dss_device *dssdev, |
| 143 | struct omap_video_timings *timings) | 143 | struct videomode *timings) |
| 144 | { | 144 | { |
| 145 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 145 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 146 | struct omap_dss_device *in = ddata->in; | 146 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c index fe4e7ec3bab0..e997128343c1 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c | |||
| @@ -27,7 +27,7 @@ struct panel_drv_data { | |||
| 27 | 27 | ||
| 28 | struct gpio_desc *enable_gpio; | 28 | struct gpio_desc *enable_gpio; |
| 29 | 29 | ||
| 30 | struct omap_video_timings timings; | 30 | struct videomode timings; |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) | 33 | #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) |
| @@ -123,7 +123,7 @@ static void opa362_disable(struct omap_dss_device *dssdev) | |||
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | static void opa362_set_timings(struct omap_dss_device *dssdev, | 125 | static void opa362_set_timings(struct omap_dss_device *dssdev, |
| 126 | struct omap_video_timings *timings) | 126 | struct videomode *timings) |
| 127 | { | 127 | { |
| 128 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 128 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 129 | struct omap_dss_device *in = ddata->in; | 129 | struct omap_dss_device *in = ddata->in; |
| @@ -137,7 +137,7 @@ static void opa362_set_timings(struct omap_dss_device *dssdev, | |||
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | static void opa362_get_timings(struct omap_dss_device *dssdev, | 139 | static void opa362_get_timings(struct omap_dss_device *dssdev, |
| 140 | struct omap_video_timings *timings) | 140 | struct videomode *timings) |
| 141 | { | 141 | { |
| 142 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 142 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 143 | 143 | ||
| @@ -147,7 +147,7 @@ static void opa362_get_timings(struct omap_dss_device *dssdev, | |||
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | static int opa362_check_timings(struct omap_dss_device *dssdev, | 149 | static int opa362_check_timings(struct omap_dss_device *dssdev, |
| 150 | struct omap_video_timings *timings) | 150 | struct videomode *timings) |
| 151 | { | 151 | { |
| 152 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 152 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 153 | struct omap_dss_device *in = ddata->in; | 153 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c index 69b4feab964c..96f0e7e7f889 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | |||
| @@ -24,7 +24,7 @@ struct panel_drv_data { | |||
| 24 | int pd_gpio; | 24 | int pd_gpio; |
| 25 | int data_lines; | 25 | int data_lines; |
| 26 | 26 | ||
| 27 | struct omap_video_timings timings; | 27 | struct videomode timings; |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) | 30 | #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) |
| @@ -113,7 +113,7 @@ static void tfp410_disable(struct omap_dss_device *dssdev) | |||
| 113 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; | 113 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | static void tfp410_fix_timings(struct omap_video_timings *timings) | 116 | static void tfp410_fix_timings(struct videomode *timings) |
| 117 | { | 117 | { |
| 118 | timings->flags |= DISPLAY_FLAGS_DE_HIGH | | 118 | timings->flags |= DISPLAY_FLAGS_DE_HIGH | |
| 119 | DISPLAY_FLAGS_PIXDATA_POSEDGE | | 119 | DISPLAY_FLAGS_PIXDATA_POSEDGE | |
| @@ -121,7 +121,7 @@ static void tfp410_fix_timings(struct omap_video_timings *timings) | |||
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | static void tfp410_set_timings(struct omap_dss_device *dssdev, | 123 | static void tfp410_set_timings(struct omap_dss_device *dssdev, |
| 124 | struct omap_video_timings *timings) | 124 | struct videomode *timings) |
| 125 | { | 125 | { |
| 126 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 126 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 127 | struct omap_dss_device *in = ddata->in; | 127 | struct omap_dss_device *in = ddata->in; |
| @@ -135,7 +135,7 @@ static void tfp410_set_timings(struct omap_dss_device *dssdev, | |||
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | static void tfp410_get_timings(struct omap_dss_device *dssdev, | 137 | static void tfp410_get_timings(struct omap_dss_device *dssdev, |
| 138 | struct omap_video_timings *timings) | 138 | struct videomode *timings) |
| 139 | { | 139 | { |
| 140 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 140 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 141 | 141 | ||
| @@ -143,7 +143,7 @@ static void tfp410_get_timings(struct omap_dss_device *dssdev, | |||
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | static int tfp410_check_timings(struct omap_dss_device *dssdev, | 145 | static int tfp410_check_timings(struct omap_dss_device *dssdev, |
| 146 | struct omap_video_timings *timings) | 146 | struct videomode *timings) |
| 147 | { | 147 | { |
| 148 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 148 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 149 | struct omap_dss_device *in = ddata->in; | 149 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c index 46855c8f5cbf..f4608c5a9e93 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | |||
| @@ -26,7 +26,7 @@ struct panel_drv_data { | |||
| 26 | struct gpio_desc *ls_oe_gpio; | 26 | struct gpio_desc *ls_oe_gpio; |
| 27 | struct gpio_desc *hpd_gpio; | 27 | struct gpio_desc *hpd_gpio; |
| 28 | 28 | ||
| 29 | struct omap_video_timings timings; | 29 | struct videomode timings; |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) | 32 | #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev) |
| @@ -105,7 +105,7 @@ static void tpd_disable(struct omap_dss_device *dssdev) | |||
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | static void tpd_set_timings(struct omap_dss_device *dssdev, | 107 | static void tpd_set_timings(struct omap_dss_device *dssdev, |
| 108 | struct omap_video_timings *timings) | 108 | struct videomode *timings) |
| 109 | { | 109 | { |
| 110 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 110 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 111 | struct omap_dss_device *in = ddata->in; | 111 | struct omap_dss_device *in = ddata->in; |
| @@ -117,7 +117,7 @@ static void tpd_set_timings(struct omap_dss_device *dssdev, | |||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | static void tpd_get_timings(struct omap_dss_device *dssdev, | 119 | static void tpd_get_timings(struct omap_dss_device *dssdev, |
| 120 | struct omap_video_timings *timings) | 120 | struct videomode *timings) |
| 121 | { | 121 | { |
| 122 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 122 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 123 | 123 | ||
| @@ -125,7 +125,7 @@ static void tpd_get_timings(struct omap_dss_device *dssdev, | |||
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | static int tpd_check_timings(struct omap_dss_device *dssdev, | 127 | static int tpd_check_timings(struct omap_dss_device *dssdev, |
| 128 | struct omap_video_timings *timings) | 128 | struct videomode *timings) |
| 129 | { | 129 | { |
| 130 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 130 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 131 | struct omap_dss_device *in = ddata->in; | 131 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c index 7f16f985ab22..50359b3d9db2 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c | |||
| @@ -28,7 +28,7 @@ struct panel_drv_data { | |||
| 28 | 28 | ||
| 29 | int data_lines; | 29 | int data_lines; |
| 30 | 30 | ||
| 31 | struct omap_video_timings videomode; | 31 | struct videomode videomode; |
| 32 | 32 | ||
| 33 | /* used for non-DT boot, to be removed */ | 33 | /* used for non-DT boot, to be removed */ |
| 34 | int backlight_gpio; | 34 | int backlight_gpio; |
| @@ -122,7 +122,7 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev) | |||
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | static void panel_dpi_set_timings(struct omap_dss_device *dssdev, | 124 | static void panel_dpi_set_timings(struct omap_dss_device *dssdev, |
| 125 | struct omap_video_timings *timings) | 125 | struct videomode *timings) |
| 126 | { | 126 | { |
| 127 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 127 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 128 | struct omap_dss_device *in = ddata->in; | 128 | struct omap_dss_device *in = ddata->in; |
| @@ -134,7 +134,7 @@ static void panel_dpi_set_timings(struct omap_dss_device *dssdev, | |||
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | static void panel_dpi_get_timings(struct omap_dss_device *dssdev, | 136 | static void panel_dpi_get_timings(struct omap_dss_device *dssdev, |
| 137 | struct omap_video_timings *timings) | 137 | struct videomode *timings) |
| 138 | { | 138 | { |
| 139 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 139 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 140 | 140 | ||
| @@ -142,7 +142,7 @@ static void panel_dpi_get_timings(struct omap_dss_device *dssdev, | |||
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | static int panel_dpi_check_timings(struct omap_dss_device *dssdev, | 144 | static int panel_dpi_check_timings(struct omap_dss_device *dssdev, |
| 145 | struct omap_video_timings *timings) | 145 | struct videomode *timings) |
| 146 | { | 146 | { |
| 147 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 147 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 148 | struct omap_dss_device *in = ddata->in; | 148 | struct omap_dss_device *in = ddata->in; |
| @@ -169,7 +169,6 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev) | |||
| 169 | const struct panel_dpi_platform_data *pdata; | 169 | const struct panel_dpi_platform_data *pdata; |
| 170 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); | 170 | struct panel_drv_data *ddata = platform_get_drvdata(pdev); |
| 171 | struct omap_dss_device *dssdev, *in; | 171 | struct omap_dss_device *dssdev, *in; |
| 172 | struct videomode vm; | ||
| 173 | int r; | 172 | int r; |
| 174 | 173 | ||
| 175 | pdata = dev_get_platdata(&pdev->dev); | 174 | pdata = dev_get_platdata(&pdev->dev); |
| @@ -185,8 +184,7 @@ static int panel_dpi_probe_pdata(struct platform_device *pdev) | |||
| 185 | 184 | ||
| 186 | ddata->data_lines = pdata->data_lines; | 185 | ddata->data_lines = pdata->data_lines; |
| 187 | 186 | ||
| 188 | videomode_from_timing(pdata->display_timing, &vm); | 187 | videomode_from_timing(pdata->display_timing, &ddata->videomode); |
| 189 | videomode_to_omap_video_timings(&vm, &ddata->videomode); | ||
| 190 | 188 | ||
| 191 | dssdev = &ddata->dssdev; | 189 | dssdev = &ddata->dssdev; |
| 192 | dssdev->name = pdata->name; | 190 | dssdev->name = pdata->name; |
| @@ -214,7 +212,6 @@ static int panel_dpi_probe_of(struct platform_device *pdev) | |||
| 214 | struct omap_dss_device *in; | 212 | struct omap_dss_device *in; |
| 215 | int r; | 213 | int r; |
| 216 | struct display_timing timing; | 214 | struct display_timing timing; |
| 217 | struct videomode vm; | ||
| 218 | struct gpio_desc *gpio; | 215 | struct gpio_desc *gpio; |
| 219 | 216 | ||
| 220 | gpio = devm_gpiod_get_optional(&pdev->dev, "enable", GPIOD_OUT_LOW); | 217 | gpio = devm_gpiod_get_optional(&pdev->dev, "enable", GPIOD_OUT_LOW); |
| @@ -245,8 +242,7 @@ static int panel_dpi_probe_of(struct platform_device *pdev) | |||
| 245 | return r; | 242 | return r; |
| 246 | } | 243 | } |
| 247 | 244 | ||
| 248 | videomode_from_timing(&timing, &vm); | 245 | videomode_from_timing(&timing, &ddata->videomode); |
| 249 | videomode_to_omap_video_timings(&vm, &ddata->videomode); | ||
| 250 | 246 | ||
| 251 | in = omapdss_of_find_source_for_first_ep(node); | 247 | in = omapdss_of_find_source_for_first_ep(node); |
| 252 | if (IS_ERR(in)) { | 248 | if (IS_ERR(in)) { |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 8f676b8ac038..10a2a69ced2a 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | |||
| @@ -42,7 +42,7 @@ struct panel_drv_data { | |||
| 42 | struct omap_dss_device dssdev; | 42 | struct omap_dss_device dssdev; |
| 43 | struct omap_dss_device *in; | 43 | struct omap_dss_device *in; |
| 44 | 44 | ||
| 45 | struct omap_video_timings timings; | 45 | struct videomode timings; |
| 46 | 46 | ||
| 47 | struct platform_device *pdev; | 47 | struct platform_device *pdev; |
| 48 | 48 | ||
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c index 4328d6781228..3559efd6170d 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | #include "../dss/omapdss.h" | 20 | #include "../dss/omapdss.h" |
| 21 | 21 | ||
| 22 | static struct omap_video_timings lb035q02_timings = { | 22 | static struct videomode lb035q02_timings = { |
| 23 | .hactive = 320, | 23 | .hactive = 320, |
| 24 | .vactive = 240, | 24 | .vactive = 240, |
| 25 | 25 | ||
| @@ -46,7 +46,7 @@ struct panel_drv_data { | |||
| 46 | 46 | ||
| 47 | int data_lines; | 47 | int data_lines; |
| 48 | 48 | ||
| 49 | struct omap_video_timings videomode; | 49 | struct videomode videomode; |
| 50 | 50 | ||
| 51 | struct gpio_desc *enable_gpio; | 51 | struct gpio_desc *enable_gpio; |
| 52 | }; | 52 | }; |
| @@ -187,7 +187,7 @@ static void lb035q02_disable(struct omap_dss_device *dssdev) | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | static void lb035q02_set_timings(struct omap_dss_device *dssdev, | 189 | static void lb035q02_set_timings(struct omap_dss_device *dssdev, |
| 190 | struct omap_video_timings *timings) | 190 | struct videomode *timings) |
| 191 | { | 191 | { |
| 192 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 192 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 193 | struct omap_dss_device *in = ddata->in; | 193 | struct omap_dss_device *in = ddata->in; |
| @@ -199,7 +199,7 @@ static void lb035q02_set_timings(struct omap_dss_device *dssdev, | |||
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | static void lb035q02_get_timings(struct omap_dss_device *dssdev, | 201 | static void lb035q02_get_timings(struct omap_dss_device *dssdev, |
| 202 | struct omap_video_timings *timings) | 202 | struct videomode *timings) |
| 203 | { | 203 | { |
| 204 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 204 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 205 | 205 | ||
| @@ -207,7 +207,7 @@ static void lb035q02_get_timings(struct omap_dss_device *dssdev, | |||
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | static int lb035q02_check_timings(struct omap_dss_device *dssdev, | 209 | static int lb035q02_check_timings(struct omap_dss_device *dssdev, |
| 210 | struct omap_video_timings *timings) | 210 | struct videomode *timings) |
| 211 | { | 211 | { |
| 212 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 212 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 213 | struct omap_dss_device *in = ddata->in; | 213 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c index 58f39f588c62..5e1e3a02c32b 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | |||
| @@ -23,7 +23,7 @@ struct panel_drv_data { | |||
| 23 | struct omap_dss_device dssdev; | 23 | struct omap_dss_device dssdev; |
| 24 | struct omap_dss_device *in; | 24 | struct omap_dss_device *in; |
| 25 | 25 | ||
| 26 | struct omap_video_timings videomode; | 26 | struct videomode videomode; |
| 27 | 27 | ||
| 28 | int data_lines; | 28 | int data_lines; |
| 29 | 29 | ||
| @@ -65,7 +65,7 @@ static const struct { | |||
| 65 | { 156, 0x00 }, { 157, 0x00 }, { 2, 0x00 }, | 65 | { 156, 0x00 }, { 157, 0x00 }, { 2, 0x00 }, |
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | static const struct omap_video_timings nec_8048_panel_timings = { | 68 | static const struct videomode nec_8048_panel_timings = { |
| 69 | .hactive = LCD_XRES, | 69 | .hactive = LCD_XRES, |
| 70 | .vactive = LCD_YRES, | 70 | .vactive = LCD_YRES, |
| 71 | .pixelclock = LCD_PIXEL_CLOCK, | 71 | .pixelclock = LCD_PIXEL_CLOCK, |
| @@ -186,7 +186,7 @@ static void nec_8048_disable(struct omap_dss_device *dssdev) | |||
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | static void nec_8048_set_timings(struct omap_dss_device *dssdev, | 188 | static void nec_8048_set_timings(struct omap_dss_device *dssdev, |
| 189 | struct omap_video_timings *timings) | 189 | struct videomode *timings) |
| 190 | { | 190 | { |
| 191 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 191 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 192 | struct omap_dss_device *in = ddata->in; | 192 | struct omap_dss_device *in = ddata->in; |
| @@ -198,7 +198,7 @@ static void nec_8048_set_timings(struct omap_dss_device *dssdev, | |||
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | static void nec_8048_get_timings(struct omap_dss_device *dssdev, | 200 | static void nec_8048_get_timings(struct omap_dss_device *dssdev, |
| 201 | struct omap_video_timings *timings) | 201 | struct videomode *timings) |
| 202 | { | 202 | { |
| 203 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 203 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 204 | 204 | ||
| @@ -206,7 +206,7 @@ static void nec_8048_get_timings(struct omap_dss_device *dssdev, | |||
| 206 | } | 206 | } |
| 207 | 207 | ||
| 208 | static int nec_8048_check_timings(struct omap_dss_device *dssdev, | 208 | static int nec_8048_check_timings(struct omap_dss_device *dssdev, |
| 209 | struct omap_video_timings *timings) | 209 | struct videomode *timings) |
| 210 | { | 210 | { |
| 211 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 211 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 212 | struct omap_dss_device *in = ddata->in; | 212 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c index d41ba3152859..0aac8aa0f685 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | |||
| @@ -26,7 +26,7 @@ struct panel_drv_data { | |||
| 26 | 26 | ||
| 27 | int data_lines; | 27 | int data_lines; |
| 28 | 28 | ||
| 29 | struct omap_video_timings videomode; | 29 | struct videomode videomode; |
| 30 | 30 | ||
| 31 | struct gpio_desc *resb_gpio; /* low = reset active min 20 us */ | 31 | struct gpio_desc *resb_gpio; /* low = reset active min 20 us */ |
| 32 | struct gpio_desc *ini_gpio; /* high = power on */ | 32 | struct gpio_desc *ini_gpio; /* high = power on */ |
| @@ -35,7 +35,7 @@ struct panel_drv_data { | |||
| 35 | struct gpio_desc *ud_gpio; /* high = conventional vertical scanning */ | 35 | struct gpio_desc *ud_gpio; /* high = conventional vertical scanning */ |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | static const struct omap_video_timings sharp_ls_timings = { | 38 | static const struct videomode sharp_ls_timings = { |
| 39 | .hactive = 480, | 39 | .hactive = 480, |
| 40 | .vactive = 640, | 40 | .vactive = 640, |
| 41 | 41 | ||
| @@ -152,7 +152,7 @@ static void sharp_ls_disable(struct omap_dss_device *dssdev) | |||
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | static void sharp_ls_set_timings(struct omap_dss_device *dssdev, | 154 | static void sharp_ls_set_timings(struct omap_dss_device *dssdev, |
| 155 | struct omap_video_timings *timings) | 155 | struct videomode *timings) |
| 156 | { | 156 | { |
| 157 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 157 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 158 | struct omap_dss_device *in = ddata->in; | 158 | struct omap_dss_device *in = ddata->in; |
| @@ -164,7 +164,7 @@ static void sharp_ls_set_timings(struct omap_dss_device *dssdev, | |||
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | static void sharp_ls_get_timings(struct omap_dss_device *dssdev, | 166 | static void sharp_ls_get_timings(struct omap_dss_device *dssdev, |
| 167 | struct omap_video_timings *timings) | 167 | struct videomode *timings) |
| 168 | { | 168 | { |
| 169 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 169 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 170 | 170 | ||
| @@ -172,7 +172,7 @@ static void sharp_ls_get_timings(struct omap_dss_device *dssdev, | |||
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | static int sharp_ls_check_timings(struct omap_dss_device *dssdev, | 174 | static int sharp_ls_check_timings(struct omap_dss_device *dssdev, |
| 175 | struct omap_video_timings *timings) | 175 | struct videomode *timings) |
| 176 | { | 176 | { |
| 177 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 177 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 178 | struct omap_dss_device *in = ddata->in; | 178 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c index 1e0980635113..e83e12724ff5 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | |||
| @@ -71,7 +71,7 @@ struct panel_drv_data { | |||
| 71 | int reset_gpio; | 71 | int reset_gpio; |
| 72 | int datapairs; | 72 | int datapairs; |
| 73 | 73 | ||
| 74 | struct omap_video_timings videomode; | 74 | struct videomode videomode; |
| 75 | 75 | ||
| 76 | char *name; | 76 | char *name; |
| 77 | int enabled; | 77 | int enabled; |
| @@ -92,7 +92,7 @@ struct panel_drv_data { | |||
| 92 | struct backlight_device *bl_dev; | 92 | struct backlight_device *bl_dev; |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | static const struct omap_video_timings acx565akm_panel_timings = { | 95 | static const struct videomode acx565akm_panel_timings = { |
| 96 | .hactive = 800, | 96 | .hactive = 800, |
| 97 | .vactive = 480, | 97 | .vactive = 480, |
| 98 | .pixelclock = 24000000, | 98 | .pixelclock = 24000000, |
| @@ -659,7 +659,7 @@ static void acx565akm_disable(struct omap_dss_device *dssdev) | |||
| 659 | } | 659 | } |
| 660 | 660 | ||
| 661 | static void acx565akm_set_timings(struct omap_dss_device *dssdev, | 661 | static void acx565akm_set_timings(struct omap_dss_device *dssdev, |
| 662 | struct omap_video_timings *timings) | 662 | struct videomode *timings) |
| 663 | { | 663 | { |
| 664 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 664 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 665 | struct omap_dss_device *in = ddata->in; | 665 | struct omap_dss_device *in = ddata->in; |
| @@ -671,7 +671,7 @@ static void acx565akm_set_timings(struct omap_dss_device *dssdev, | |||
| 671 | } | 671 | } |
| 672 | 672 | ||
| 673 | static void acx565akm_get_timings(struct omap_dss_device *dssdev, | 673 | static void acx565akm_get_timings(struct omap_dss_device *dssdev, |
| 674 | struct omap_video_timings *timings) | 674 | struct videomode *timings) |
| 675 | { | 675 | { |
| 676 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 676 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 677 | 677 | ||
| @@ -679,7 +679,7 @@ static void acx565akm_get_timings(struct omap_dss_device *dssdev, | |||
| 679 | } | 679 | } |
| 680 | 680 | ||
| 681 | static int acx565akm_check_timings(struct omap_dss_device *dssdev, | 681 | static int acx565akm_check_timings(struct omap_dss_device *dssdev, |
| 682 | struct omap_video_timings *timings) | 682 | struct videomode *timings) |
| 683 | { | 683 | { |
| 684 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 684 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 685 | struct omap_dss_device *in = ddata->in; | 685 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c index 9711ec469f39..2b38867e17a5 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c | |||
| @@ -37,12 +37,12 @@ struct panel_drv_data { | |||
| 37 | 37 | ||
| 38 | int data_lines; | 38 | int data_lines; |
| 39 | 39 | ||
| 40 | struct omap_video_timings videomode; | 40 | struct videomode videomode; |
| 41 | 41 | ||
| 42 | struct spi_device *spi_dev; | 42 | struct spi_device *spi_dev; |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | static struct omap_video_timings td028ttec1_panel_timings = { | 45 | static struct videomode td028ttec1_panel_timings = { |
| 46 | .hactive = 480, | 46 | .hactive = 480, |
| 47 | .vactive = 640, | 47 | .vactive = 640, |
| 48 | .pixelclock = 22153000, | 48 | .pixelclock = 22153000, |
| @@ -322,7 +322,7 @@ static void td028ttec1_panel_disable(struct omap_dss_device *dssdev) | |||
| 322 | } | 322 | } |
| 323 | 323 | ||
| 324 | static void td028ttec1_panel_set_timings(struct omap_dss_device *dssdev, | 324 | static void td028ttec1_panel_set_timings(struct omap_dss_device *dssdev, |
| 325 | struct omap_video_timings *timings) | 325 | struct videomode *timings) |
| 326 | { | 326 | { |
| 327 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 327 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 328 | struct omap_dss_device *in = ddata->in; | 328 | struct omap_dss_device *in = ddata->in; |
| @@ -334,7 +334,7 @@ static void td028ttec1_panel_set_timings(struct omap_dss_device *dssdev, | |||
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev, | 336 | static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev, |
| 337 | struct omap_video_timings *timings) | 337 | struct videomode *timings) |
| 338 | { | 338 | { |
| 339 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 339 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 340 | 340 | ||
| @@ -342,7 +342,7 @@ static void td028ttec1_panel_get_timings(struct omap_dss_device *dssdev, | |||
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | static int td028ttec1_panel_check_timings(struct omap_dss_device *dssdev, | 344 | static int td028ttec1_panel_check_timings(struct omap_dss_device *dssdev, |
| 345 | struct omap_video_timings *timings) | 345 | struct videomode *timings) |
| 346 | { | 346 | { |
| 347 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 347 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 348 | struct omap_dss_device *in = ddata->in; | 348 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c index 3f701686f992..da7b75751c71 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c | |||
| @@ -56,7 +56,7 @@ struct panel_drv_data { | |||
| 56 | struct omap_dss_device dssdev; | 56 | struct omap_dss_device dssdev; |
| 57 | struct omap_dss_device *in; | 57 | struct omap_dss_device *in; |
| 58 | 58 | ||
| 59 | struct omap_video_timings videomode; | 59 | struct videomode videomode; |
| 60 | 60 | ||
| 61 | int data_lines; | 61 | int data_lines; |
| 62 | 62 | ||
| @@ -72,7 +72,7 @@ struct panel_drv_data { | |||
| 72 | u32 power_on_resume:1; | 72 | u32 power_on_resume:1; |
| 73 | }; | 73 | }; |
| 74 | 74 | ||
| 75 | static const struct omap_video_timings tpo_td043_timings = { | 75 | static const struct videomode tpo_td043_timings = { |
| 76 | .hactive = 800, | 76 | .hactive = 800, |
| 77 | .vactive = 480, | 77 | .vactive = 480, |
| 78 | 78 | ||
| @@ -416,7 +416,7 @@ static void tpo_td043_disable(struct omap_dss_device *dssdev) | |||
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | static void tpo_td043_set_timings(struct omap_dss_device *dssdev, | 418 | static void tpo_td043_set_timings(struct omap_dss_device *dssdev, |
| 419 | struct omap_video_timings *timings) | 419 | struct videomode *timings) |
| 420 | { | 420 | { |
| 421 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 421 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 422 | struct omap_dss_device *in = ddata->in; | 422 | struct omap_dss_device *in = ddata->in; |
| @@ -428,7 +428,7 @@ static void tpo_td043_set_timings(struct omap_dss_device *dssdev, | |||
| 428 | } | 428 | } |
| 429 | 429 | ||
| 430 | static void tpo_td043_get_timings(struct omap_dss_device *dssdev, | 430 | static void tpo_td043_get_timings(struct omap_dss_device *dssdev, |
| 431 | struct omap_video_timings *timings) | 431 | struct videomode *timings) |
| 432 | { | 432 | { |
| 433 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 433 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 434 | 434 | ||
| @@ -436,7 +436,7 @@ static void tpo_td043_get_timings(struct omap_dss_device *dssdev, | |||
| 436 | } | 436 | } |
| 437 | 437 | ||
| 438 | static int tpo_td043_check_timings(struct omap_dss_device *dssdev, | 438 | static int tpo_td043_check_timings(struct omap_dss_device *dssdev, |
| 439 | struct omap_video_timings *timings) | 439 | struct videomode *timings) |
| 440 | { | 440 | { |
| 441 | struct panel_drv_data *ddata = to_panel_data(dssdev); | 441 | struct panel_drv_data *ddata = to_panel_data(dssdev); |
| 442 | struct omap_dss_device *in = ddata->in; | 442 | struct omap_dss_device *in = ddata->in; |
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index 63d3dc44913c..a5b7488a5cfb 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c | |||
| @@ -75,7 +75,7 @@ struct dispc_features { | |||
| 75 | unsigned long max_lcd_pclk; | 75 | unsigned long max_lcd_pclk; |
| 76 | unsigned long max_tv_pclk; | 76 | unsigned long max_tv_pclk; |
| 77 | int (*calc_scaling) (unsigned long pclk, unsigned long lclk, | 77 | int (*calc_scaling) (unsigned long pclk, unsigned long lclk, |
| 78 | const struct omap_video_timings *mgr_timings, | 78 | const struct videomode *mgr_timings, |
| 79 | u16 width, u16 height, u16 out_width, u16 out_height, | 79 | u16 width, u16 height, u16 out_width, u16 out_height, |
| 80 | enum omap_color_mode color_mode, bool *five_taps, | 80 | enum omap_color_mode color_mode, bool *five_taps, |
| 81 | int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, | 81 | int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, |
| @@ -2179,7 +2179,7 @@ static void calc_tiler_rotation_offset(u16 screen_width, u16 width, | |||
| 2179 | * undocumented horizontal position and timing related limitations. | 2179 | * undocumented horizontal position and timing related limitations. |
| 2180 | */ | 2180 | */ |
| 2181 | static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk, | 2181 | static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk, |
| 2182 | const struct omap_video_timings *t, u16 pos_x, | 2182 | const struct videomode *t, u16 pos_x, |
| 2183 | u16 width, u16 height, u16 out_width, u16 out_height, | 2183 | u16 width, u16 height, u16 out_width, u16 out_height, |
| 2184 | bool five_taps) | 2184 | bool five_taps) |
| 2185 | { | 2185 | { |
| @@ -2233,7 +2233,7 @@ static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk, | |||
| 2233 | } | 2233 | } |
| 2234 | 2234 | ||
| 2235 | static unsigned long calc_core_clk_five_taps(unsigned long pclk, | 2235 | static unsigned long calc_core_clk_five_taps(unsigned long pclk, |
| 2236 | const struct omap_video_timings *mgr_timings, u16 width, | 2236 | const struct videomode *mgr_timings, u16 width, |
| 2237 | u16 height, u16 out_width, u16 out_height, | 2237 | u16 height, u16 out_width, u16 out_height, |
| 2238 | enum omap_color_mode color_mode) | 2238 | enum omap_color_mode color_mode) |
| 2239 | { | 2239 | { |
| @@ -2326,7 +2326,7 @@ static unsigned long calc_core_clk_44xx(unsigned long pclk, u16 width, | |||
| 2326 | } | 2326 | } |
| 2327 | 2327 | ||
| 2328 | static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk, | 2328 | static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk, |
| 2329 | const struct omap_video_timings *mgr_timings, | 2329 | const struct videomode *mgr_timings, |
| 2330 | u16 width, u16 height, u16 out_width, u16 out_height, | 2330 | u16 width, u16 height, u16 out_width, u16 out_height, |
| 2331 | enum omap_color_mode color_mode, bool *five_taps, | 2331 | enum omap_color_mode color_mode, bool *five_taps, |
| 2332 | int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, | 2332 | int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, |
| @@ -2372,7 +2372,7 @@ static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk, | |||
| 2372 | } | 2372 | } |
| 2373 | 2373 | ||
| 2374 | static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk, | 2374 | static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk, |
| 2375 | const struct omap_video_timings *mgr_timings, | 2375 | const struct videomode *mgr_timings, |
| 2376 | u16 width, u16 height, u16 out_width, u16 out_height, | 2376 | u16 width, u16 height, u16 out_width, u16 out_height, |
| 2377 | enum omap_color_mode color_mode, bool *five_taps, | 2377 | enum omap_color_mode color_mode, bool *five_taps, |
| 2378 | int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, | 2378 | int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, |
| @@ -2457,7 +2457,7 @@ again: | |||
| 2457 | } | 2457 | } |
| 2458 | 2458 | ||
| 2459 | static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk, | 2459 | static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk, |
| 2460 | const struct omap_video_timings *mgr_timings, | 2460 | const struct videomode *mgr_timings, |
| 2461 | u16 width, u16 height, u16 out_width, u16 out_height, | 2461 | u16 width, u16 height, u16 out_width, u16 out_height, |
| 2462 | enum omap_color_mode color_mode, bool *five_taps, | 2462 | enum omap_color_mode color_mode, bool *five_taps, |
| 2463 | int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, | 2463 | int *x_predecim, int *y_predecim, int *decim_x, int *decim_y, |
| @@ -2503,7 +2503,7 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk, | |||
| 2503 | 2503 | ||
| 2504 | static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk, | 2504 | static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk, |
| 2505 | enum omap_overlay_caps caps, | 2505 | enum omap_overlay_caps caps, |
| 2506 | const struct omap_video_timings *mgr_timings, | 2506 | const struct videomode *mgr_timings, |
| 2507 | u16 width, u16 height, u16 out_width, u16 out_height, | 2507 | u16 width, u16 height, u16 out_width, u16 out_height, |
| 2508 | enum omap_color_mode color_mode, bool *five_taps, | 2508 | enum omap_color_mode color_mode, bool *five_taps, |
| 2509 | int *x_predecim, int *y_predecim, u16 pos_x, | 2509 | int *x_predecim, int *y_predecim, u16 pos_x, |
| @@ -2593,7 +2593,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane, | |||
| 2593 | u16 out_width, u16 out_height, enum omap_color_mode color_mode, | 2593 | u16 out_width, u16 out_height, enum omap_color_mode color_mode, |
| 2594 | u8 rotation, bool mirror, u8 zorder, u8 pre_mult_alpha, | 2594 | u8 rotation, bool mirror, u8 zorder, u8 pre_mult_alpha, |
| 2595 | u8 global_alpha, enum omap_dss_rotation_type rotation_type, | 2595 | u8 global_alpha, enum omap_dss_rotation_type rotation_type, |
| 2596 | bool replication, const struct omap_video_timings *mgr_timings, | 2596 | bool replication, const struct videomode *mgr_timings, |
| 2597 | bool mem_to_mem) | 2597 | bool mem_to_mem) |
| 2598 | { | 2598 | { |
| 2599 | bool five_taps = true; | 2599 | bool five_taps = true; |
| @@ -2786,7 +2786,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane, | |||
| 2786 | } | 2786 | } |
| 2787 | 2787 | ||
| 2788 | int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, | 2788 | int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, |
| 2789 | bool replication, const struct omap_video_timings *mgr_timings, | 2789 | bool replication, const struct videomode *mgr_timings, |
| 2790 | bool mem_to_mem) | 2790 | bool mem_to_mem) |
| 2791 | { | 2791 | { |
| 2792 | int r; | 2792 | int r; |
| @@ -2812,7 +2812,7 @@ int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, | |||
| 2812 | EXPORT_SYMBOL(dispc_ovl_setup); | 2812 | EXPORT_SYMBOL(dispc_ovl_setup); |
| 2813 | 2813 | ||
| 2814 | int dispc_wb_setup(const struct omap_dss_writeback_info *wi, | 2814 | int dispc_wb_setup(const struct omap_dss_writeback_info *wi, |
| 2815 | bool mem_to_mem, const struct omap_video_timings *mgr_timings) | 2815 | bool mem_to_mem, const struct videomode *mgr_timings) |
| 2816 | { | 2816 | { |
| 2817 | int r; | 2817 | int r; |
| 2818 | u32 l; | 2818 | u32 l; |
| @@ -3119,7 +3119,7 @@ static bool _dispc_mgr_pclk_ok(enum omap_channel channel, | |||
| 3119 | } | 3119 | } |
| 3120 | 3120 | ||
| 3121 | bool dispc_mgr_timings_ok(enum omap_channel channel, | 3121 | bool dispc_mgr_timings_ok(enum omap_channel channel, |
| 3122 | const struct omap_video_timings *timings) | 3122 | const struct videomode *timings) |
| 3123 | { | 3123 | { |
| 3124 | if (!_dispc_mgr_size_ok(timings->hactive, timings->vactive)) | 3124 | if (!_dispc_mgr_size_ok(timings->hactive, timings->vactive)) |
| 3125 | return false; | 3125 | return false; |
| @@ -3143,7 +3143,7 @@ bool dispc_mgr_timings_ok(enum omap_channel channel, | |||
| 3143 | } | 3143 | } |
| 3144 | 3144 | ||
| 3145 | static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, | 3145 | static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, |
| 3146 | const struct omap_video_timings *ovt) | 3146 | const struct videomode *ovt) |
| 3147 | { | 3147 | { |
| 3148 | u32 timing_h, timing_v, l; | 3148 | u32 timing_h, timing_v, l; |
| 3149 | bool onoff, rf, ipc, vs, hs, de; | 3149 | bool onoff, rf, ipc, vs, hs, de; |
| @@ -3221,11 +3221,11 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, | |||
| 3221 | 3221 | ||
| 3222 | /* change name to mode? */ | 3222 | /* change name to mode? */ |
| 3223 | void dispc_mgr_set_timings(enum omap_channel channel, | 3223 | void dispc_mgr_set_timings(enum omap_channel channel, |
| 3224 | const struct omap_video_timings *timings) | 3224 | const struct videomode *timings) |
| 3225 | { | 3225 | { |
| 3226 | unsigned xtot, ytot; | 3226 | unsigned xtot, ytot; |
| 3227 | unsigned long ht, vt; | 3227 | unsigned long ht, vt; |
| 3228 | struct omap_video_timings t = *timings; | 3228 | struct videomode t = *timings; |
| 3229 | 3229 | ||
| 3230 | DSSDBG("channel %d xres %u yres %u\n", channel, t.hactive, t.vactive); | 3230 | DSSDBG("channel %d xres %u yres %u\n", channel, t.hactive, t.vactive); |
| 3231 | 3231 | ||
| @@ -4185,7 +4185,7 @@ EXPORT_SYMBOL(dispc_free_irq); | |||
| 4185 | */ | 4185 | */ |
| 4186 | 4186 | ||
| 4187 | static const struct dispc_errata_i734_data { | 4187 | static const struct dispc_errata_i734_data { |
| 4188 | struct omap_video_timings timings; | 4188 | struct videomode timings; |
| 4189 | struct omap_overlay_info ovli; | 4189 | struct omap_overlay_info ovli; |
| 4190 | struct omap_overlay_manager_info mgri; | 4190 | struct omap_overlay_manager_info mgri; |
| 4191 | struct dss_lcd_mgr_config lcd_conf; | 4191 | struct dss_lcd_mgr_config lcd_conf; |
diff --git a/drivers/gpu/drm/omapdrm/dss/display.c b/drivers/gpu/drm/omapdrm/dss/display.c index 1e19a2c00f8f..56cc071b6223 100644 --- a/drivers/gpu/drm/omapdrm/dss/display.c +++ b/drivers/gpu/drm/omapdrm/dss/display.c | |||
| @@ -72,7 +72,7 @@ int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev) | |||
| 72 | EXPORT_SYMBOL(omapdss_default_get_recommended_bpp); | 72 | EXPORT_SYMBOL(omapdss_default_get_recommended_bpp); |
| 73 | 73 | ||
| 74 | void omapdss_default_get_timings(struct omap_dss_device *dssdev, | 74 | void omapdss_default_get_timings(struct omap_dss_device *dssdev, |
| 75 | struct omap_video_timings *timings) | 75 | struct videomode *timings) |
| 76 | { | 76 | { |
| 77 | *timings = dssdev->panel.timings; | 77 | *timings = dssdev->panel.timings; |
| 78 | } | 78 | } |
| @@ -217,40 +217,3 @@ struct omap_dss_device *omap_dss_find_device(void *data, | |||
| 217 | return NULL; | 217 | return NULL; |
| 218 | } | 218 | } |
| 219 | EXPORT_SYMBOL(omap_dss_find_device); | 219 | EXPORT_SYMBOL(omap_dss_find_device); |
| 220 | |||
| 221 | void videomode_to_omap_video_timings(const struct videomode *vm, | ||
| 222 | struct omap_video_timings *ovt) | ||
| 223 | { | ||
| 224 | memset(ovt, 0, sizeof(*ovt)); | ||
| 225 | |||
| 226 | ovt->pixelclock = vm->pixelclock; | ||
| 227 | ovt->hactive = vm->hactive; | ||
| 228 | ovt->hback_porch = vm->hback_porch; | ||
| 229 | ovt->hfront_porch = vm->hfront_porch; | ||
| 230 | ovt->hsync_len = vm->hsync_len; | ||
| 231 | ovt->vactive = vm->vactive; | ||
| 232 | ovt->vback_porch = vm->vback_porch; | ||
| 233 | ovt->vfront_porch = vm->vfront_porch; | ||
| 234 | ovt->vsync_len = vm->vsync_len; | ||
| 235 | ovt->flags = vm->flags; | ||
| 236 | } | ||
| 237 | EXPORT_SYMBOL(videomode_to_omap_video_timings); | ||
| 238 | |||
| 239 | void omap_video_timings_to_videomode(const struct omap_video_timings *ovt, | ||
| 240 | struct videomode *vm) | ||
| 241 | { | ||
| 242 | memset(vm, 0, sizeof(*vm)); | ||
| 243 | |||
| 244 | vm->pixelclock = ovt->pixelclock; | ||
| 245 | |||
| 246 | vm->hactive = ovt->hactive; | ||
| 247 | vm->hback_porch = ovt->hback_porch; | ||
| 248 | vm->hfront_porch = ovt->hfront_porch; | ||
| 249 | vm->hsync_len = ovt->hsync_len; | ||
| 250 | vm->vactive = ovt->vactive; | ||
| 251 | vm->vback_porch = ovt->vback_porch; | ||
| 252 | vm->vfront_porch = ovt->vfront_porch; | ||
| 253 | vm->vsync_len = ovt->vsync_len; | ||
| 254 | vm->flags = ovt->flags; | ||
| 255 | } | ||
| 256 | EXPORT_SYMBOL(omap_video_timings_to_videomode); | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index 8fb40efa65af..178335094288 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c | |||
| @@ -47,7 +47,7 @@ struct dpi_data { | |||
| 47 | 47 | ||
| 48 | struct mutex lock; | 48 | struct mutex lock; |
| 49 | 49 | ||
| 50 | struct omap_video_timings timings; | 50 | struct videomode timings; |
| 51 | struct dss_lcd_mgr_config mgr_config; | 51 | struct dss_lcd_mgr_config mgr_config; |
| 52 | int data_lines; | 52 | int data_lines; |
| 53 | 53 | ||
| @@ -333,7 +333,7 @@ static int dpi_set_mode(struct dpi_data *dpi) | |||
| 333 | { | 333 | { |
| 334 | struct omap_dss_device *out = &dpi->output; | 334 | struct omap_dss_device *out = &dpi->output; |
| 335 | enum omap_channel channel = out->dispc_channel; | 335 | enum omap_channel channel = out->dispc_channel; |
| 336 | struct omap_video_timings *t = &dpi->timings; | 336 | struct videomode *t = &dpi->timings; |
| 337 | int lck_div = 0, pck_div = 0; | 337 | int lck_div = 0, pck_div = 0; |
| 338 | unsigned long fck = 0; | 338 | unsigned long fck = 0; |
| 339 | unsigned long pck; | 339 | unsigned long pck; |
| @@ -476,7 +476,7 @@ static void dpi_display_disable(struct omap_dss_device *dssdev) | |||
| 476 | } | 476 | } |
| 477 | 477 | ||
| 478 | static void dpi_set_timings(struct omap_dss_device *dssdev, | 478 | static void dpi_set_timings(struct omap_dss_device *dssdev, |
| 479 | struct omap_video_timings *timings) | 479 | struct videomode *timings) |
| 480 | { | 480 | { |
| 481 | struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); | 481 | struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); |
| 482 | 482 | ||
| @@ -490,7 +490,7 @@ static void dpi_set_timings(struct omap_dss_device *dssdev, | |||
| 490 | } | 490 | } |
| 491 | 491 | ||
| 492 | static void dpi_get_timings(struct omap_dss_device *dssdev, | 492 | static void dpi_get_timings(struct omap_dss_device *dssdev, |
| 493 | struct omap_video_timings *timings) | 493 | struct videomode *timings) |
| 494 | { | 494 | { |
| 495 | struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); | 495 | struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); |
| 496 | 496 | ||
| @@ -502,7 +502,7 @@ static void dpi_get_timings(struct omap_dss_device *dssdev, | |||
| 502 | } | 502 | } |
| 503 | 503 | ||
| 504 | static int dpi_check_timings(struct omap_dss_device *dssdev, | 504 | static int dpi_check_timings(struct omap_dss_device *dssdev, |
| 505 | struct omap_video_timings *timings) | 505 | struct videomode *timings) |
| 506 | { | 506 | { |
| 507 | struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); | 507 | struct dpi_data *dpi = dpi_get_data_from_dssdev(dssdev); |
| 508 | enum omap_channel channel = dpi->output.dispc_channel; | 508 | enum omap_channel channel = dpi->output.dispc_channel; |
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 1dec7dd38029..13569cb3f786 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c | |||
| @@ -289,7 +289,7 @@ struct dsi_clk_calc_ctx { | |||
| 289 | struct dss_pll_clock_info dsi_cinfo; | 289 | struct dss_pll_clock_info dsi_cinfo; |
| 290 | struct dispc_clock_info dispc_cinfo; | 290 | struct dispc_clock_info dispc_cinfo; |
| 291 | 291 | ||
| 292 | struct omap_video_timings dispc_vm; | 292 | struct videomode dispc_vm; |
| 293 | struct omap_dss_dsi_videomode_timings dsi_vm; | 293 | struct omap_dss_dsi_videomode_timings dsi_vm; |
| 294 | }; | 294 | }; |
| 295 | 295 | ||
| @@ -383,7 +383,7 @@ struct dsi_data { | |||
| 383 | unsigned scp_clk_refcount; | 383 | unsigned scp_clk_refcount; |
| 384 | 384 | ||
| 385 | struct dss_lcd_mgr_config mgr_config; | 385 | struct dss_lcd_mgr_config mgr_config; |
| 386 | struct omap_video_timings timings; | 386 | struct videomode timings; |
| 387 | enum omap_dss_dsi_pixel_format pix_fmt; | 387 | enum omap_dss_dsi_pixel_format pix_fmt; |
| 388 | enum omap_dss_dsi_mode mode; | 388 | enum omap_dss_dsi_mode mode; |
| 389 | struct omap_dss_dsi_videomode_timings vm_timings; | 389 | struct omap_dss_dsi_videomode_timings vm_timings; |
| @@ -3321,7 +3321,7 @@ static void dsi_config_vp_num_line_buffers(struct platform_device *dsidev) | |||
| 3321 | 3321 | ||
| 3322 | if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) { | 3322 | if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) { |
| 3323 | int bpp = dsi_get_pixel_size(dsi->pix_fmt); | 3323 | int bpp = dsi_get_pixel_size(dsi->pix_fmt); |
| 3324 | struct omap_video_timings *timings = &dsi->timings; | 3324 | struct videomode *timings = &dsi->timings; |
| 3325 | /* | 3325 | /* |
| 3326 | * Don't use line buffers if width is greater than the video | 3326 | * Don't use line buffers if width is greater than the video |
| 3327 | * port's line buffer size | 3327 | * port's line buffer size |
| @@ -3453,7 +3453,7 @@ static void dsi_config_cmd_mode_interleaving(struct platform_device *dsidev) | |||
| 3453 | int ddr_clk_pre, ddr_clk_post, enter_hs_mode_lat, exit_hs_mode_lat; | 3453 | int ddr_clk_pre, ddr_clk_post, enter_hs_mode_lat, exit_hs_mode_lat; |
| 3454 | int tclk_trail, ths_exit, exiths_clk; | 3454 | int tclk_trail, ths_exit, exiths_clk; |
| 3455 | bool ddr_alwon; | 3455 | bool ddr_alwon; |
| 3456 | struct omap_video_timings *timings = &dsi->timings; | 3456 | struct videomode *timings = &dsi->timings; |
| 3457 | int bpp = dsi_get_pixel_size(dsi->pix_fmt); | 3457 | int bpp = dsi_get_pixel_size(dsi->pix_fmt); |
| 3458 | int ndl = dsi->num_lanes_used - 1; | 3458 | int ndl = dsi->num_lanes_used - 1; |
| 3459 | int dsi_fclk_hsdiv = dsi->user_dsi_cinfo.mX[HSDIV_DSI] + 1; | 3459 | int dsi_fclk_hsdiv = dsi->user_dsi_cinfo.mX[HSDIV_DSI] + 1; |
| @@ -3705,7 +3705,7 @@ static void dsi_proto_timings(struct platform_device *dsidev) | |||
| 3705 | int vbp = dsi->vm_timings.vbp; | 3705 | int vbp = dsi->vm_timings.vbp; |
| 3706 | int window_sync = dsi->vm_timings.window_sync; | 3706 | int window_sync = dsi->vm_timings.window_sync; |
| 3707 | bool hsync_end; | 3707 | bool hsync_end; |
| 3708 | struct omap_video_timings *timings = &dsi->timings; | 3708 | struct videomode *timings = &dsi->timings; |
| 3709 | int bpp = dsi_get_pixel_size(dsi->pix_fmt); | 3709 | int bpp = dsi_get_pixel_size(dsi->pix_fmt); |
| 3710 | int tl, t_he, width_bytes; | 3710 | int tl, t_he, width_bytes; |
| 3711 | 3711 | ||
| @@ -4120,7 +4120,7 @@ static int dsi_display_init_dispc(struct platform_device *dsidev, | |||
| 4120 | 4120 | ||
| 4121 | /* | 4121 | /* |
| 4122 | * override interlace, logic level and edge related parameters in | 4122 | * override interlace, logic level and edge related parameters in |
| 4123 | * omap_video_timings with default values | 4123 | * videomode with default values |
| 4124 | */ | 4124 | */ |
| 4125 | dsi->timings.flags &= ~DISPLAY_FLAGS_INTERLACED; | 4125 | dsi->timings.flags &= ~DISPLAY_FLAGS_INTERLACED; |
| 4126 | dsi->timings.flags &= ~DISPLAY_FLAGS_HSYNC_LOW; | 4126 | dsi->timings.flags &= ~DISPLAY_FLAGS_HSYNC_LOW; |
| @@ -4361,7 +4361,7 @@ static void print_dsi_vm(const char *str, | |||
| 4361 | #undef TO_DSI_T | 4361 | #undef TO_DSI_T |
| 4362 | } | 4362 | } |
| 4363 | 4363 | ||
| 4364 | static void print_dispc_vm(const char *str, const struct omap_video_timings *t) | 4364 | static void print_dispc_vm(const char *str, const struct videomode *t) |
| 4365 | { | 4365 | { |
| 4366 | unsigned long pck = t->pixelclock; | 4366 | unsigned long pck = t->pixelclock; |
| 4367 | int hact, bl, tot; | 4367 | int hact, bl, tot; |
| @@ -4392,7 +4392,7 @@ static void print_dispc_vm(const char *str, const struct omap_video_timings *t) | |||
| 4392 | static void print_dsi_dispc_vm(const char *str, | 4392 | static void print_dsi_dispc_vm(const char *str, |
| 4393 | const struct omap_dss_dsi_videomode_timings *t) | 4393 | const struct omap_dss_dsi_videomode_timings *t) |
| 4394 | { | 4394 | { |
| 4395 | struct omap_video_timings vm = { 0 }; | 4395 | struct videomode vm = { 0 }; |
| 4396 | unsigned long byteclk = t->hsclk / 4; | 4396 | unsigned long byteclk = t->hsclk / 4; |
| 4397 | unsigned long pck; | 4397 | unsigned long pck; |
| 4398 | u64 dsi_tput; | 4398 | u64 dsi_tput; |
| @@ -4417,7 +4417,7 @@ static bool dsi_cm_calc_dispc_cb(int lckd, int pckd, unsigned long lck, | |||
| 4417 | unsigned long pck, void *data) | 4417 | unsigned long pck, void *data) |
| 4418 | { | 4418 | { |
| 4419 | struct dsi_clk_calc_ctx *ctx = data; | 4419 | struct dsi_clk_calc_ctx *ctx = data; |
| 4420 | struct omap_video_timings *t = &ctx->dispc_vm; | 4420 | struct videomode *t = &ctx->dispc_vm; |
| 4421 | 4421 | ||
| 4422 | ctx->dispc_cinfo.lck_div = lckd; | 4422 | ctx->dispc_cinfo.lck_div = lckd; |
| 4423 | ctx->dispc_cinfo.pck_div = pckd; | 4423 | ctx->dispc_cinfo.pck_div = pckd; |
| @@ -4515,8 +4515,8 @@ static bool dsi_vm_calc_blanking(struct dsi_clk_calc_ctx *ctx) | |||
| 4515 | int dispc_htot, dispc_hbl; /* pixels */ | 4515 | int dispc_htot, dispc_hbl; /* pixels */ |
| 4516 | int dsi_htot, dsi_hact, dsi_hbl, hss, hse; /* byteclks */ | 4516 | int dsi_htot, dsi_hact, dsi_hbl, hss, hse; /* byteclks */ |
| 4517 | int hfp, hsa, hbp; | 4517 | int hfp, hsa, hbp; |
| 4518 | const struct omap_video_timings *req_vm; | 4518 | const struct videomode *req_vm; |
| 4519 | struct omap_video_timings *dispc_vm; | 4519 | struct videomode *dispc_vm; |
| 4520 | struct omap_dss_dsi_videomode_timings *dsi_vm; | 4520 | struct omap_dss_dsi_videomode_timings *dsi_vm; |
| 4521 | u64 dsi_tput, dispc_tput; | 4521 | u64 dsi_tput, dispc_tput; |
| 4522 | 4522 | ||
| @@ -4764,7 +4764,7 @@ static bool dsi_vm_calc(struct dsi_data *dsi, | |||
| 4764 | const struct omap_dss_dsi_config *cfg, | 4764 | const struct omap_dss_dsi_config *cfg, |
| 4765 | struct dsi_clk_calc_ctx *ctx) | 4765 | struct dsi_clk_calc_ctx *ctx) |
| 4766 | { | 4766 | { |
| 4767 | const struct omap_video_timings *t = cfg->timings; | 4767 | const struct videomode *t = cfg->timings; |
| 4768 | unsigned long clkin; | 4768 | unsigned long clkin; |
| 4769 | unsigned long pll_min; | 4769 | unsigned long pll_min; |
| 4770 | unsigned long pll_max; | 4770 | unsigned long pll_max; |
diff --git a/drivers/gpu/drm/omapdrm/dss/dss.h b/drivers/gpu/drm/omapdrm/dss/dss.h index 4fd06dc41cb3..384267591b12 100644 --- a/drivers/gpu/drm/omapdrm/dss/dss.h +++ b/drivers/gpu/drm/omapdrm/dss/dss.h | |||
| @@ -367,7 +367,7 @@ bool dispc_div_calc(unsigned long dispc, | |||
| 367 | dispc_div_calc_func func, void *data); | 367 | dispc_div_calc_func func, void *data); |
| 368 | 368 | ||
| 369 | bool dispc_mgr_timings_ok(enum omap_channel channel, | 369 | bool dispc_mgr_timings_ok(enum omap_channel channel, |
| 370 | const struct omap_video_timings *timings); | 370 | const struct videomode *timings); |
| 371 | int dispc_calc_clock_rates(unsigned long dispc_fclk_rate, | 371 | int dispc_calc_clock_rates(unsigned long dispc_fclk_rate, |
| 372 | struct dispc_clock_info *cinfo); | 372 | struct dispc_clock_info *cinfo); |
| 373 | 373 | ||
| @@ -390,7 +390,7 @@ void dispc_wb_enable(bool enable); | |||
| 390 | bool dispc_wb_is_enabled(void); | 390 | bool dispc_wb_is_enabled(void); |
| 391 | void dispc_wb_set_channel_in(enum dss_writeback_channel channel); | 391 | void dispc_wb_set_channel_in(enum dss_writeback_channel channel); |
| 392 | int dispc_wb_setup(const struct omap_dss_writeback_info *wi, | 392 | int dispc_wb_setup(const struct omap_dss_writeback_info *wi, |
| 393 | bool mem_to_mem, const struct omap_video_timings *timings); | 393 | bool mem_to_mem, const struct videomode *timings); |
| 394 | 394 | ||
| 395 | /* VENC */ | 395 | /* VENC */ |
| 396 | int venc_init_platform_driver(void) __init; | 396 | int venc_init_platform_driver(void) __init; |
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi.h b/drivers/gpu/drm/omapdrm/dss/hdmi.h index 63e711545865..b97ee6702e6f 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi.h +++ b/drivers/gpu/drm/omapdrm/dss/hdmi.h | |||
| @@ -181,7 +181,7 @@ struct hdmi_video_format { | |||
| 181 | }; | 181 | }; |
| 182 | 182 | ||
| 183 | struct hdmi_config { | 183 | struct hdmi_config { |
| 184 | struct omap_video_timings timings; | 184 | struct videomode timings; |
| 185 | struct hdmi_avi_infoframe infoframe; | 185 | struct hdmi_avi_infoframe infoframe; |
| 186 | enum hdmi_core_hdmi_dvi hdmi_dvi_mode; | 186 | enum hdmi_core_hdmi_dvi hdmi_dvi_mode; |
| 187 | }; | 187 | }; |
| @@ -298,11 +298,11 @@ int hdmi_wp_set_pll_pwr(struct hdmi_wp_data *wp, enum hdmi_pll_pwr val); | |||
| 298 | void hdmi_wp_video_config_format(struct hdmi_wp_data *wp, | 298 | void hdmi_wp_video_config_format(struct hdmi_wp_data *wp, |
| 299 | struct hdmi_video_format *video_fmt); | 299 | struct hdmi_video_format *video_fmt); |
| 300 | void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp, | 300 | void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp, |
| 301 | struct omap_video_timings *timings); | 301 | struct videomode *timings); |
| 302 | void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp, | 302 | void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp, |
| 303 | struct omap_video_timings *timings); | 303 | struct videomode *timings); |
| 304 | void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt, | 304 | void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt, |
| 305 | struct omap_video_timings *timings, struct hdmi_config *param); | 305 | struct videomode *timings, struct hdmi_config *param); |
| 306 | int hdmi_wp_init(struct platform_device *pdev, struct hdmi_wp_data *wp); | 306 | int hdmi_wp_init(struct platform_device *pdev, struct hdmi_wp_data *wp); |
| 307 | phys_addr_t hdmi_wp_get_audio_dma_addr(struct hdmi_wp_data *wp); | 307 | phys_addr_t hdmi_wp_get_audio_dma_addr(struct hdmi_wp_data *wp); |
| 308 | 308 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index 891518502d3d..a53dfd0bc3b3 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c | |||
| @@ -155,7 +155,7 @@ static void hdmi_power_off_core(struct omap_dss_device *dssdev) | |||
| 155 | static int hdmi_power_on_full(struct omap_dss_device *dssdev) | 155 | static int hdmi_power_on_full(struct omap_dss_device *dssdev) |
| 156 | { | 156 | { |
| 157 | int r; | 157 | int r; |
| 158 | struct omap_video_timings *p; | 158 | struct videomode *p; |
| 159 | enum omap_channel channel = dssdev->dispc_channel; | 159 | enum omap_channel channel = dssdev->dispc_channel; |
| 160 | struct hdmi_wp_data *wp = &hdmi.wp; | 160 | struct hdmi_wp_data *wp = &hdmi.wp; |
| 161 | struct dss_pll_clock_info hdmi_cinfo = { 0 }; | 161 | struct dss_pll_clock_info hdmi_cinfo = { 0 }; |
| @@ -256,7 +256,7 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev) | |||
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | static int hdmi_display_check_timing(struct omap_dss_device *dssdev, | 258 | static int hdmi_display_check_timing(struct omap_dss_device *dssdev, |
| 259 | struct omap_video_timings *timings) | 259 | struct videomode *timings) |
| 260 | { | 260 | { |
| 261 | if (!dispc_mgr_timings_ok(dssdev->dispc_channel, timings)) | 261 | if (!dispc_mgr_timings_ok(dssdev->dispc_channel, timings)) |
| 262 | return -EINVAL; | 262 | return -EINVAL; |
| @@ -265,7 +265,7 @@ static int hdmi_display_check_timing(struct omap_dss_device *dssdev, | |||
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | static void hdmi_display_set_timing(struct omap_dss_device *dssdev, | 267 | static void hdmi_display_set_timing(struct omap_dss_device *dssdev, |
| 268 | struct omap_video_timings *timings) | 268 | struct videomode *timings) |
| 269 | { | 269 | { |
| 270 | mutex_lock(&hdmi.lock); | 270 | mutex_lock(&hdmi.lock); |
| 271 | 271 | ||
| @@ -277,7 +277,7 @@ static void hdmi_display_set_timing(struct omap_dss_device *dssdev, | |||
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | static void hdmi_display_get_timings(struct omap_dss_device *dssdev, | 279 | static void hdmi_display_get_timings(struct omap_dss_device *dssdev, |
| 280 | struct omap_video_timings *timings) | 280 | struct videomode *timings) |
| 281 | { | 281 | { |
| 282 | *timings = hdmi.cfg.timings; | 282 | *timings = hdmi.cfg.timings; |
| 283 | } | 283 | } |
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c index ef3afe99e487..505cfee892aa 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | |||
| @@ -310,7 +310,7 @@ void hdmi4_configure(struct hdmi_core_data *core, | |||
| 310 | struct hdmi_wp_data *wp, struct hdmi_config *cfg) | 310 | struct hdmi_wp_data *wp, struct hdmi_config *cfg) |
| 311 | { | 311 | { |
| 312 | /* HDMI */ | 312 | /* HDMI */ |
| 313 | struct omap_video_timings video_timing; | 313 | struct videomode video_timing; |
| 314 | struct hdmi_video_format video_format; | 314 | struct hdmi_video_format video_format; |
| 315 | /* HDMI core */ | 315 | /* HDMI core */ |
| 316 | struct hdmi_core_video_config v_core_cfg; | 316 | struct hdmi_core_video_config v_core_cfg; |
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index 8206ef69caf1..880f67ae6e9b 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c | |||
| @@ -172,7 +172,7 @@ static void hdmi_power_off_core(struct omap_dss_device *dssdev) | |||
| 172 | static int hdmi_power_on_full(struct omap_dss_device *dssdev) | 172 | static int hdmi_power_on_full(struct omap_dss_device *dssdev) |
| 173 | { | 173 | { |
| 174 | int r; | 174 | int r; |
| 175 | struct omap_video_timings *p; | 175 | struct videomode *p; |
| 176 | enum omap_channel channel = dssdev->dispc_channel; | 176 | enum omap_channel channel = dssdev->dispc_channel; |
| 177 | struct dss_pll_clock_info hdmi_cinfo = { 0 }; | 177 | struct dss_pll_clock_info hdmi_cinfo = { 0 }; |
| 178 | unsigned pc; | 178 | unsigned pc; |
| @@ -273,7 +273,7 @@ static void hdmi_power_off_full(struct omap_dss_device *dssdev) | |||
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | static int hdmi_display_check_timing(struct omap_dss_device *dssdev, | 275 | static int hdmi_display_check_timing(struct omap_dss_device *dssdev, |
| 276 | struct omap_video_timings *timings) | 276 | struct videomode *timings) |
| 277 | { | 277 | { |
| 278 | if (!dispc_mgr_timings_ok(dssdev->dispc_channel, timings)) | 278 | if (!dispc_mgr_timings_ok(dssdev->dispc_channel, timings)) |
| 279 | return -EINVAL; | 279 | return -EINVAL; |
| @@ -282,7 +282,7 @@ static int hdmi_display_check_timing(struct omap_dss_device *dssdev, | |||
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | static void hdmi_display_set_timing(struct omap_dss_device *dssdev, | 284 | static void hdmi_display_set_timing(struct omap_dss_device *dssdev, |
| 285 | struct omap_video_timings *timings) | 285 | struct videomode *timings) |
| 286 | { | 286 | { |
| 287 | mutex_lock(&hdmi.lock); | 287 | mutex_lock(&hdmi.lock); |
| 288 | 288 | ||
| @@ -294,7 +294,7 @@ static void hdmi_display_set_timing(struct omap_dss_device *dssdev, | |||
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | static void hdmi_display_get_timings(struct omap_dss_device *dssdev, | 296 | static void hdmi_display_get_timings(struct omap_dss_device *dssdev, |
| 297 | struct omap_video_timings *timings) | 297 | struct videomode *timings) |
| 298 | { | 298 | { |
| 299 | *timings = hdmi.cfg.timings; | 299 | *timings = hdmi.cfg.timings; |
| 300 | } | 300 | } |
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c index e86972b98a91..a5ac9318a11d 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | |||
| @@ -329,7 +329,7 @@ static void hdmi_core_video_config(struct hdmi_core_data *core, | |||
| 329 | struct hdmi_core_vid_config *cfg) | 329 | struct hdmi_core_vid_config *cfg) |
| 330 | { | 330 | { |
| 331 | void __iomem *base = core->base; | 331 | void __iomem *base = core->base; |
| 332 | struct omap_video_timings *ovt = &cfg->v_fc_config.timings; | 332 | struct videomode *ovt = &cfg->v_fc_config.timings; |
| 333 | unsigned char r = 0; | 333 | unsigned char r = 0; |
| 334 | bool vsync_pol, hsync_pol; | 334 | bool vsync_pol, hsync_pol; |
| 335 | 335 | ||
| @@ -609,7 +609,7 @@ int hdmi5_core_handle_irqs(struct hdmi_core_data *core) | |||
| 609 | void hdmi5_configure(struct hdmi_core_data *core, struct hdmi_wp_data *wp, | 609 | void hdmi5_configure(struct hdmi_core_data *core, struct hdmi_wp_data *wp, |
| 610 | struct hdmi_config *cfg) | 610 | struct hdmi_config *cfg) |
| 611 | { | 611 | { |
| 612 | struct omap_video_timings video_timing; | 612 | struct videomode video_timing; |
| 613 | struct hdmi_video_format video_format; | 613 | struct hdmi_video_format video_format; |
| 614 | struct hdmi_core_vid_config v_core_cfg; | 614 | struct hdmi_core_vid_config v_core_cfg; |
| 615 | 615 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c b/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c index 20effa9260ec..b490e335b3df 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c | |||
| @@ -144,7 +144,7 @@ void hdmi_wp_video_config_format(struct hdmi_wp_data *wp, | |||
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp, | 146 | void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp, |
| 147 | struct omap_video_timings *timings) | 147 | struct videomode *timings) |
| 148 | { | 148 | { |
| 149 | u32 r; | 149 | u32 r; |
| 150 | bool vsync_pol, hsync_pol; | 150 | bool vsync_pol, hsync_pol; |
| @@ -162,7 +162,7 @@ void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp, | |||
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp, | 164 | void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp, |
| 165 | struct omap_video_timings *timings) | 165 | struct videomode *timings) |
| 166 | { | 166 | { |
| 167 | u32 timing_h = 0; | 167 | u32 timing_h = 0; |
| 168 | u32 timing_v = 0; | 168 | u32 timing_v = 0; |
| @@ -193,7 +193,7 @@ void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp, | |||
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt, | 195 | void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt, |
| 196 | struct omap_video_timings *timings, struct hdmi_config *param) | 196 | struct videomode *timings, struct hdmi_config *param) |
| 197 | { | 197 | { |
| 198 | DSSDBG("Enter hdmi_wp_video_init_format\n"); | 198 | DSSDBG("Enter hdmi_wp_video_init_format\n"); |
| 199 | 199 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index bd38da3af01f..54e88ee3ef8e 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h | |||
| @@ -290,7 +290,7 @@ struct omap_dss_dsi_videomode_timings { | |||
| 290 | struct omap_dss_dsi_config { | 290 | struct omap_dss_dsi_config { |
| 291 | enum omap_dss_dsi_mode mode; | 291 | enum omap_dss_dsi_mode mode; |
| 292 | enum omap_dss_dsi_pixel_format pixel_format; | 292 | enum omap_dss_dsi_pixel_format pixel_format; |
| 293 | const struct omap_video_timings *timings; | 293 | const struct videomode *timings; |
| 294 | 294 | ||
| 295 | unsigned long hs_clk_min, hs_clk_max; | 295 | unsigned long hs_clk_min, hs_clk_max; |
| 296 | unsigned long lp_clk_min, lp_clk_max; | 296 | unsigned long lp_clk_min, lp_clk_max; |
| @@ -299,35 +299,12 @@ struct omap_dss_dsi_config { | |||
| 299 | enum omap_dss_dsi_trans_mode trans_mode; | 299 | enum omap_dss_dsi_trans_mode trans_mode; |
| 300 | }; | 300 | }; |
| 301 | 301 | ||
| 302 | struct omap_video_timings { | ||
| 303 | /* Unit: pixels */ | ||
| 304 | u32 hactive; | ||
| 305 | /* Unit: pixels */ | ||
| 306 | u32 vactive; | ||
| 307 | /* Unit: Hz */ | ||
| 308 | unsigned long pixelclock; | ||
| 309 | /* Unit: pixel clocks */ | ||
| 310 | u32 hsync_len; /* Horizontal synchronization pulse width */ | ||
| 311 | /* Unit: pixel clocks */ | ||
| 312 | u32 hfront_porch; /* Horizontal front porch */ | ||
| 313 | /* Unit: pixel clocks */ | ||
| 314 | u32 hback_porch; /* Horizontal back porch */ | ||
| 315 | /* Unit: line clocks */ | ||
| 316 | u32 vsync_len; /* Vertical synchronization pulse width */ | ||
| 317 | /* Unit: line clocks */ | ||
| 318 | u32 vfront_porch; /* Vertical front porch */ | ||
| 319 | /* Unit: line clocks */ | ||
| 320 | u32 vback_porch; /* Vertical back porch */ | ||
| 321 | |||
| 322 | enum display_flags flags; | ||
| 323 | }; | ||
| 324 | |||
| 325 | /* Hardcoded timings for tv modes. Venc only uses these to | 302 | /* Hardcoded timings for tv modes. Venc only uses these to |
| 326 | * identify the mode, and does not actually use the configs | 303 | * identify the mode, and does not actually use the configs |
| 327 | * itself. However, the configs should be something that | 304 | * itself. However, the configs should be something that |
| 328 | * a normal monitor can also show */ | 305 | * a normal monitor can also show */ |
| 329 | extern const struct omap_video_timings omap_dss_pal_timings; | 306 | extern const struct videomode omap_dss_pal_timings; |
| 330 | extern const struct omap_video_timings omap_dss_ntsc_timings; | 307 | extern const struct videomode omap_dss_ntsc_timings; |
| 331 | 308 | ||
| 332 | struct omap_dss_cpr_coefs { | 309 | struct omap_dss_cpr_coefs { |
| 333 | s16 rr, rg, rb; | 310 | s16 rr, rg, rb; |
| @@ -489,11 +466,11 @@ struct omapdss_dpi_ops { | |||
| 489 | void (*disable)(struct omap_dss_device *dssdev); | 466 | void (*disable)(struct omap_dss_device *dssdev); |
| 490 | 467 | ||
| 491 | int (*check_timings)(struct omap_dss_device *dssdev, | 468 | int (*check_timings)(struct omap_dss_device *dssdev, |
| 492 | struct omap_video_timings *timings); | 469 | struct videomode *timings); |
| 493 | void (*set_timings)(struct omap_dss_device *dssdev, | 470 | void (*set_timings)(struct omap_dss_device *dssdev, |
| 494 | struct omap_video_timings *timings); | 471 | struct videomode *timings); |
| 495 | void (*get_timings)(struct omap_dss_device *dssdev, | 472 | void (*get_timings)(struct omap_dss_device *dssdev, |
| 496 | struct omap_video_timings *timings); | 473 | struct videomode *timings); |
| 497 | 474 | ||
| 498 | void (*set_data_lines)(struct omap_dss_device *dssdev, int data_lines); | 475 | void (*set_data_lines)(struct omap_dss_device *dssdev, int data_lines); |
| 499 | }; | 476 | }; |
| @@ -508,11 +485,11 @@ struct omapdss_sdi_ops { | |||
| 508 | void (*disable)(struct omap_dss_device *dssdev); | 485 | void (*disable)(struct omap_dss_device *dssdev); |
| 509 | 486 | ||
| 510 | int (*check_timings)(struct omap_dss_device *dssdev, | 487 | int (*check_timings)(struct omap_dss_device *dssdev, |
| 511 | struct omap_video_timings *timings); | 488 | struct videomode *timings); |
| 512 | void (*set_timings)(struct omap_dss_device *dssdev, | 489 | void (*set_timings)(struct omap_dss_device *dssdev, |
| 513 | struct omap_video_timings *timings); | 490 | struct videomode *timings); |
| 514 | void (*get_timings)(struct omap_dss_device *dssdev, | 491 | void (*get_timings)(struct omap_dss_device *dssdev, |
| 515 | struct omap_video_timings *timings); | 492 | struct videomode *timings); |
| 516 | 493 | ||
| 517 | void (*set_datapairs)(struct omap_dss_device *dssdev, int datapairs); | 494 | void (*set_datapairs)(struct omap_dss_device *dssdev, int datapairs); |
| 518 | }; | 495 | }; |
| @@ -527,11 +504,11 @@ struct omapdss_dvi_ops { | |||
| 527 | void (*disable)(struct omap_dss_device *dssdev); | 504 | void (*disable)(struct omap_dss_device *dssdev); |
| 528 | 505 | ||
| 529 | int (*check_timings)(struct omap_dss_device *dssdev, | 506 | int (*check_timings)(struct omap_dss_device *dssdev, |
| 530 | struct omap_video_timings *timings); | 507 | struct videomode *timings); |
| 531 | void (*set_timings)(struct omap_dss_device *dssdev, | 508 | void (*set_timings)(struct omap_dss_device *dssdev, |
| 532 | struct omap_video_timings *timings); | 509 | struct videomode *timings); |
| 533 | void (*get_timings)(struct omap_dss_device *dssdev, | 510 | void (*get_timings)(struct omap_dss_device *dssdev, |
| 534 | struct omap_video_timings *timings); | 511 | struct videomode *timings); |
| 535 | }; | 512 | }; |
| 536 | 513 | ||
| 537 | struct omapdss_atv_ops { | 514 | struct omapdss_atv_ops { |
| @@ -544,11 +521,11 @@ struct omapdss_atv_ops { | |||
| 544 | void (*disable)(struct omap_dss_device *dssdev); | 521 | void (*disable)(struct omap_dss_device *dssdev); |
| 545 | 522 | ||
| 546 | int (*check_timings)(struct omap_dss_device *dssdev, | 523 | int (*check_timings)(struct omap_dss_device *dssdev, |
| 547 | struct omap_video_timings *timings); | 524 | struct videomode *timings); |
| 548 | void (*set_timings)(struct omap_dss_device *dssdev, | 525 | void (*set_timings)(struct omap_dss_device *dssdev, |
| 549 | struct omap_video_timings *timings); | 526 | struct videomode *timings); |
| 550 | void (*get_timings)(struct omap_dss_device *dssdev, | 527 | void (*get_timings)(struct omap_dss_device *dssdev, |
| 551 | struct omap_video_timings *timings); | 528 | struct videomode *timings); |
| 552 | 529 | ||
| 553 | void (*set_type)(struct omap_dss_device *dssdev, | 530 | void (*set_type)(struct omap_dss_device *dssdev, |
| 554 | enum omap_dss_venc_type type); | 531 | enum omap_dss_venc_type type); |
| @@ -569,11 +546,11 @@ struct omapdss_hdmi_ops { | |||
| 569 | void (*disable)(struct omap_dss_device *dssdev); | 546 | void (*disable)(struct omap_dss_device *dssdev); |
| 570 | 547 | ||
| 571 | int (*check_timings)(struct omap_dss_device *dssdev, | 548 | int (*check_timings)(struct omap_dss_device *dssdev, |
| 572 | struct omap_video_timings *timings); | 549 | struct videomode *timings); |
| 573 | void (*set_timings)(struct omap_dss_device *dssdev, | 550 | void (*set_timings)(struct omap_dss_device *dssdev, |
| 574 | struct omap_video_timings *timings); | 551 | struct videomode *timings); |
| 575 | void (*get_timings)(struct omap_dss_device *dssdev, | 552 | void (*get_timings)(struct omap_dss_device *dssdev, |
| 576 | struct omap_video_timings *timings); | 553 | struct videomode *timings); |
| 577 | 554 | ||
| 578 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | 555 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); |
| 579 | bool (*detect)(struct omap_dss_device *dssdev); | 556 | bool (*detect)(struct omap_dss_device *dssdev); |
| @@ -679,7 +656,7 @@ struct omap_dss_device { | |||
| 679 | } phy; | 656 | } phy; |
| 680 | 657 | ||
| 681 | struct { | 658 | struct { |
| 682 | struct omap_video_timings timings; | 659 | struct videomode timings; |
| 683 | 660 | ||
| 684 | enum omap_dss_dsi_pixel_format dsi_pix_fmt; | 661 | enum omap_dss_dsi_pixel_format dsi_pix_fmt; |
| 685 | enum omap_dss_dsi_mode dsi_mode; | 662 | enum omap_dss_dsi_mode dsi_mode; |
| @@ -772,11 +749,11 @@ struct omap_dss_driver { | |||
| 772 | int (*get_recommended_bpp)(struct omap_dss_device *dssdev); | 749 | int (*get_recommended_bpp)(struct omap_dss_device *dssdev); |
| 773 | 750 | ||
| 774 | int (*check_timings)(struct omap_dss_device *dssdev, | 751 | int (*check_timings)(struct omap_dss_device *dssdev, |
| 775 | struct omap_video_timings *timings); | 752 | struct videomode *timings); |
| 776 | void (*set_timings)(struct omap_dss_device *dssdev, | 753 | void (*set_timings)(struct omap_dss_device *dssdev, |
| 777 | struct omap_video_timings *timings); | 754 | struct videomode *timings); |
| 778 | void (*get_timings)(struct omap_dss_device *dssdev, | 755 | void (*get_timings)(struct omap_dss_device *dssdev, |
| 779 | struct omap_video_timings *timings); | 756 | struct videomode *timings); |
| 780 | 757 | ||
| 781 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); | 758 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); |
| 782 | u32 (*get_wss)(struct omap_dss_device *dssdev); | 759 | u32 (*get_wss)(struct omap_dss_device *dssdev); |
| @@ -806,11 +783,6 @@ struct omap_dss_device *omap_dss_find_device(void *data, | |||
| 806 | int (*match)(struct omap_dss_device *dssdev, void *data)); | 783 | int (*match)(struct omap_dss_device *dssdev, void *data)); |
| 807 | const char *omapdss_get_default_display_name(void); | 784 | const char *omapdss_get_default_display_name(void); |
| 808 | 785 | ||
| 809 | void videomode_to_omap_video_timings(const struct videomode *vm, | ||
| 810 | struct omap_video_timings *ovt); | ||
| 811 | void omap_video_timings_to_videomode(const struct omap_video_timings *ovt, | ||
| 812 | struct videomode *vm); | ||
| 813 | |||
| 814 | int dss_feat_get_num_mgrs(void); | 786 | int dss_feat_get_num_mgrs(void); |
| 815 | int dss_feat_get_num_ovls(void); | 787 | int dss_feat_get_num_ovls(void); |
| 816 | enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane); | 788 | enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane); |
| @@ -839,7 +811,7 @@ void omapdss_default_get_resolution(struct omap_dss_device *dssdev, | |||
| 839 | u16 *xres, u16 *yres); | 811 | u16 *xres, u16 *yres); |
| 840 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); | 812 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); |
| 841 | void omapdss_default_get_timings(struct omap_dss_device *dssdev, | 813 | void omapdss_default_get_timings(struct omap_dss_device *dssdev, |
| 842 | struct omap_video_timings *timings); | 814 | struct videomode *timings); |
| 843 | 815 | ||
| 844 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); | 816 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); |
| 845 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | 817 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); |
| @@ -893,7 +865,7 @@ void dispc_mgr_go(enum omap_channel channel); | |||
| 893 | void dispc_mgr_set_lcd_config(enum omap_channel channel, | 865 | void dispc_mgr_set_lcd_config(enum omap_channel channel, |
| 894 | const struct dss_lcd_mgr_config *config); | 866 | const struct dss_lcd_mgr_config *config); |
| 895 | void dispc_mgr_set_timings(enum omap_channel channel, | 867 | void dispc_mgr_set_timings(enum omap_channel channel, |
| 896 | const struct omap_video_timings *timings); | 868 | const struct videomode *timings); |
| 897 | void dispc_mgr_setup(enum omap_channel channel, | 869 | void dispc_mgr_setup(enum omap_channel channel, |
| 898 | const struct omap_overlay_manager_info *info); | 870 | const struct omap_overlay_manager_info *info); |
| 899 | u32 dispc_mgr_gamma_size(enum omap_channel channel); | 871 | u32 dispc_mgr_gamma_size(enum omap_channel channel); |
| @@ -906,7 +878,7 @@ bool dispc_ovl_enabled(enum omap_plane plane); | |||
| 906 | void dispc_ovl_set_channel_out(enum omap_plane plane, | 878 | void dispc_ovl_set_channel_out(enum omap_plane plane, |
| 907 | enum omap_channel channel); | 879 | enum omap_channel channel); |
| 908 | int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, | 880 | int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, |
| 909 | bool replication, const struct omap_video_timings *mgr_timings, | 881 | bool replication, const struct videomode *mgr_timings, |
| 910 | bool mem_to_mem); | 882 | bool mem_to_mem); |
| 911 | 883 | ||
| 912 | enum omap_dss_output_id dispc_mgr_get_supported_outputs(enum omap_channel channel); | 884 | enum omap_dss_output_id dispc_mgr_get_supported_outputs(enum omap_channel channel); |
| @@ -921,7 +893,7 @@ struct dss_mgr_ops { | |||
| 921 | int (*enable)(enum omap_channel channel); | 893 | int (*enable)(enum omap_channel channel); |
| 922 | void (*disable)(enum omap_channel channel); | 894 | void (*disable)(enum omap_channel channel); |
| 923 | void (*set_timings)(enum omap_channel channel, | 895 | void (*set_timings)(enum omap_channel channel, |
| 924 | const struct omap_video_timings *timings); | 896 | const struct videomode *timings); |
| 925 | void (*set_lcd_config)(enum omap_channel channel, | 897 | void (*set_lcd_config)(enum omap_channel channel, |
| 926 | const struct dss_lcd_mgr_config *config); | 898 | const struct dss_lcd_mgr_config *config); |
| 927 | int (*register_framedone_handler)(enum omap_channel channel, | 899 | int (*register_framedone_handler)(enum omap_channel channel, |
| @@ -938,7 +910,7 @@ int dss_mgr_connect(enum omap_channel channel, | |||
| 938 | void dss_mgr_disconnect(enum omap_channel channel, | 910 | void dss_mgr_disconnect(enum omap_channel channel, |
| 939 | struct omap_dss_device *dst); | 911 | struct omap_dss_device *dst); |
| 940 | void dss_mgr_set_timings(enum omap_channel channel, | 912 | void dss_mgr_set_timings(enum omap_channel channel, |
| 941 | const struct omap_video_timings *timings); | 913 | const struct videomode *timings); |
| 942 | void dss_mgr_set_lcd_config(enum omap_channel channel, | 914 | void dss_mgr_set_lcd_config(enum omap_channel channel, |
| 943 | const struct dss_lcd_mgr_config *config); | 915 | const struct dss_lcd_mgr_config *config); |
| 944 | int dss_mgr_enable(enum omap_channel channel); | 916 | int dss_mgr_enable(enum omap_channel channel); |
diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c index 24f859488201..28fc5c159066 100644 --- a/drivers/gpu/drm/omapdrm/dss/output.c +++ b/drivers/gpu/drm/omapdrm/dss/output.c | |||
| @@ -202,7 +202,7 @@ void dss_mgr_disconnect(enum omap_channel channel, | |||
| 202 | EXPORT_SYMBOL(dss_mgr_disconnect); | 202 | EXPORT_SYMBOL(dss_mgr_disconnect); |
| 203 | 203 | ||
| 204 | void dss_mgr_set_timings(enum omap_channel channel, | 204 | void dss_mgr_set_timings(enum omap_channel channel, |
| 205 | const struct omap_video_timings *timings) | 205 | const struct videomode *timings) |
| 206 | { | 206 | { |
| 207 | dss_mgr_ops->set_timings(channel, timings); | 207 | dss_mgr_ops->set_timings(channel, timings); |
| 208 | } | 208 | } |
diff --git a/drivers/gpu/drm/omapdrm/dss/rfbi.c b/drivers/gpu/drm/omapdrm/dss/rfbi.c index ce431817e781..a08734ae2253 100644 --- a/drivers/gpu/drm/omapdrm/dss/rfbi.c +++ b/drivers/gpu/drm/omapdrm/dss/rfbi.c | |||
| @@ -113,7 +113,7 @@ static struct { | |||
| 113 | 113 | ||
| 114 | struct semaphore bus_lock; | 114 | struct semaphore bus_lock; |
| 115 | 115 | ||
| 116 | struct omap_video_timings timings; | 116 | struct videomode timings; |
| 117 | int pixel_size; | 117 | int pixel_size; |
| 118 | int data_lines; | 118 | int data_lines; |
| 119 | struct rfbi_timings intf_timings; | 119 | struct rfbi_timings intf_timings; |
diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index c8658f97ab7d..e2f2d6b2aa76 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c | |||
| @@ -39,7 +39,7 @@ static struct { | |||
| 39 | struct regulator *vdds_sdi_reg; | 39 | struct regulator *vdds_sdi_reg; |
| 40 | 40 | ||
| 41 | struct dss_lcd_mgr_config mgr_config; | 41 | struct dss_lcd_mgr_config mgr_config; |
| 42 | struct omap_video_timings timings; | 42 | struct videomode timings; |
| 43 | int datapairs; | 43 | int datapairs; |
| 44 | 44 | ||
| 45 | struct omap_dss_device output; | 45 | struct omap_dss_device output; |
| @@ -131,7 +131,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) | |||
| 131 | { | 131 | { |
| 132 | struct omap_dss_device *out = &sdi.output; | 132 | struct omap_dss_device *out = &sdi.output; |
| 133 | enum omap_channel channel = dssdev->dispc_channel; | 133 | enum omap_channel channel = dssdev->dispc_channel; |
| 134 | struct omap_video_timings *t = &sdi.timings; | 134 | struct videomode *t = &sdi.timings; |
| 135 | unsigned long fck; | 135 | unsigned long fck; |
| 136 | struct dispc_clock_info dispc_cinfo; | 136 | struct dispc_clock_info dispc_cinfo; |
| 137 | unsigned long pck; | 137 | unsigned long pck; |
| @@ -228,19 +228,19 @@ static void sdi_display_disable(struct omap_dss_device *dssdev) | |||
| 228 | } | 228 | } |
| 229 | 229 | ||
| 230 | static void sdi_set_timings(struct omap_dss_device *dssdev, | 230 | static void sdi_set_timings(struct omap_dss_device *dssdev, |
| 231 | struct omap_video_timings *timings) | 231 | struct videomode *timings) |
| 232 | { | 232 | { |
| 233 | sdi.timings = *timings; | 233 | sdi.timings = *timings; |
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | static void sdi_get_timings(struct omap_dss_device *dssdev, | 236 | static void sdi_get_timings(struct omap_dss_device *dssdev, |
| 237 | struct omap_video_timings *timings) | 237 | struct videomode *timings) |
| 238 | { | 238 | { |
| 239 | *timings = sdi.timings; | 239 | *timings = sdi.timings; |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | static int sdi_check_timings(struct omap_dss_device *dssdev, | 242 | static int sdi_check_timings(struct omap_dss_device *dssdev, |
| 243 | struct omap_video_timings *timings) | 243 | struct videomode *timings) |
| 244 | { | 244 | { |
| 245 | enum omap_channel channel = dssdev->dispc_channel; | 245 | enum omap_channel channel = dssdev->dispc_channel; |
| 246 | 246 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c index 43f98547e9fc..68a04a8753b0 100644 --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c | |||
| @@ -262,7 +262,7 @@ static const struct venc_config venc_config_pal_bdghi = { | |||
| 262 | .fid_ext_start_y__fid_ext_offset_y = 0x01380005, | 262 | .fid_ext_start_y__fid_ext_offset_y = 0x01380005, |
| 263 | }; | 263 | }; |
| 264 | 264 | ||
| 265 | const struct omap_video_timings omap_dss_pal_timings = { | 265 | const struct videomode omap_dss_pal_timings = { |
| 266 | .hactive = 720, | 266 | .hactive = 720, |
| 267 | .vactive = 574, | 267 | .vactive = 574, |
| 268 | .pixelclock = 13500000, | 268 | .pixelclock = 13500000, |
| @@ -280,7 +280,7 @@ const struct omap_video_timings omap_dss_pal_timings = { | |||
| 280 | }; | 280 | }; |
| 281 | EXPORT_SYMBOL(omap_dss_pal_timings); | 281 | EXPORT_SYMBOL(omap_dss_pal_timings); |
| 282 | 282 | ||
| 283 | const struct omap_video_timings omap_dss_ntsc_timings = { | 283 | const struct videomode omap_dss_ntsc_timings = { |
| 284 | .hactive = 720, | 284 | .hactive = 720, |
| 285 | .vactive = 482, | 285 | .vactive = 482, |
| 286 | .pixelclock = 13500000, | 286 | .pixelclock = 13500000, |
| @@ -307,7 +307,7 @@ static struct { | |||
| 307 | 307 | ||
| 308 | struct clk *tv_dac_clk; | 308 | struct clk *tv_dac_clk; |
| 309 | 309 | ||
| 310 | struct omap_video_timings timings; | 310 | struct videomode timings; |
| 311 | enum omap_dss_venc_type type; | 311 | enum omap_dss_venc_type type; |
| 312 | bool invert_polarity; | 312 | bool invert_polarity; |
| 313 | 313 | ||
| @@ -422,7 +422,7 @@ static void venc_runtime_put(void) | |||
| 422 | } | 422 | } |
| 423 | 423 | ||
| 424 | static const struct venc_config *venc_timings_to_config( | 424 | static const struct venc_config *venc_timings_to_config( |
| 425 | struct omap_video_timings *timings) | 425 | struct videomode *timings) |
| 426 | { | 426 | { |
| 427 | if (memcmp(&omap_dss_pal_timings, timings, sizeof(*timings)) == 0) | 427 | if (memcmp(&omap_dss_pal_timings, timings, sizeof(*timings)) == 0) |
| 428 | return &venc_config_pal_trm; | 428 | return &venc_config_pal_trm; |
| @@ -540,7 +540,7 @@ static void venc_display_disable(struct omap_dss_device *dssdev) | |||
| 540 | } | 540 | } |
| 541 | 541 | ||
| 542 | static void venc_set_timings(struct omap_dss_device *dssdev, | 542 | static void venc_set_timings(struct omap_dss_device *dssdev, |
| 543 | struct omap_video_timings *timings) | 543 | struct videomode *timings) |
| 544 | { | 544 | { |
| 545 | DSSDBG("venc_set_timings\n"); | 545 | DSSDBG("venc_set_timings\n"); |
| 546 | 546 | ||
| @@ -558,7 +558,7 @@ static void venc_set_timings(struct omap_dss_device *dssdev, | |||
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | static int venc_check_timings(struct omap_dss_device *dssdev, | 560 | static int venc_check_timings(struct omap_dss_device *dssdev, |
| 561 | struct omap_video_timings *timings) | 561 | struct videomode *timings) |
| 562 | { | 562 | { |
| 563 | DSSDBG("venc_check_timings\n"); | 563 | DSSDBG("venc_check_timings\n"); |
| 564 | 564 | ||
| @@ -572,7 +572,7 @@ static int venc_check_timings(struct omap_dss_device *dssdev, | |||
| 572 | } | 572 | } |
| 573 | 573 | ||
| 574 | static void venc_get_timings(struct omap_dss_device *dssdev, | 574 | static void venc_get_timings(struct omap_dss_device *dssdev, |
| 575 | struct omap_video_timings *timings) | 575 | struct videomode *timings) |
| 576 | { | 576 | { |
| 577 | mutex_lock(&venc.venc_lock); | 577 | mutex_lock(&venc.venc_lock); |
| 578 | 578 | ||
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c index 562a04d49939..b04586b7e594 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.c +++ b/drivers/gpu/drm/omapdrm/omap_connector.c | |||
| @@ -42,76 +42,6 @@ bool omap_connector_get_hdmi_mode(struct drm_connector *connector) | |||
| 42 | return omap_connector->hdmi_mode; | 42 | return omap_connector->hdmi_mode; |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | void copy_timings_omap_to_drm(struct drm_display_mode *mode, | ||
| 46 | struct omap_video_timings *timings) | ||
| 47 | { | ||
| 48 | mode->clock = timings->pixelclock / 1000; | ||
| 49 | |||
| 50 | mode->hdisplay = timings->hactive; | ||
| 51 | mode->hsync_start = mode->hdisplay + timings->hfront_porch; | ||
| 52 | mode->hsync_end = mode->hsync_start + timings->hsync_len; | ||
| 53 | mode->htotal = mode->hsync_end + timings->hback_porch; | ||
| 54 | |||
| 55 | mode->vdisplay = timings->vactive; | ||
| 56 | mode->vsync_start = mode->vdisplay + timings->vfront_porch; | ||
| 57 | mode->vsync_end = mode->vsync_start + timings->vsync_len; | ||
| 58 | mode->vtotal = mode->vsync_end + timings->vback_porch; | ||
| 59 | |||
| 60 | mode->flags = 0; | ||
| 61 | |||
| 62 | if (timings->flags & DISPLAY_FLAGS_INTERLACED) | ||
| 63 | mode->flags |= DRM_MODE_FLAG_INTERLACE; | ||
| 64 | |||
| 65 | if (timings->flags & DISPLAY_FLAGS_DOUBLECLK) | ||
| 66 | mode->flags |= DRM_MODE_FLAG_DBLCLK; | ||
| 67 | |||
| 68 | if (timings->flags & DISPLAY_FLAGS_HSYNC_HIGH) | ||
| 69 | mode->flags |= DRM_MODE_FLAG_PHSYNC; | ||
| 70 | else | ||
| 71 | mode->flags |= DRM_MODE_FLAG_NHSYNC; | ||
| 72 | |||
| 73 | if (timings->flags & DISPLAY_FLAGS_VSYNC_HIGH) | ||
| 74 | mode->flags |= DRM_MODE_FLAG_PVSYNC; | ||
| 75 | else | ||
| 76 | mode->flags |= DRM_MODE_FLAG_NVSYNC; | ||
| 77 | } | ||
| 78 | |||
| 79 | void copy_timings_drm_to_omap(struct omap_video_timings *timings, | ||
| 80 | struct drm_display_mode *mode) | ||
| 81 | { | ||
| 82 | timings->pixelclock = mode->clock * 1000; | ||
| 83 | |||
| 84 | timings->hactive = mode->hdisplay; | ||
| 85 | timings->hfront_porch = mode->hsync_start - mode->hdisplay; | ||
| 86 | timings->hsync_len = mode->hsync_end - mode->hsync_start; | ||
| 87 | timings->hback_porch = mode->htotal - mode->hsync_end; | ||
| 88 | |||
| 89 | timings->vactive = mode->vdisplay; | ||
| 90 | timings->vfront_porch = mode->vsync_start - mode->vdisplay; | ||
| 91 | timings->vsync_len = mode->vsync_end - mode->vsync_start; | ||
| 92 | timings->vback_porch = mode->vtotal - mode->vsync_end; | ||
| 93 | |||
| 94 | if (mode->flags & DRM_MODE_FLAG_INTERLACE) | ||
| 95 | timings->flags |= DISPLAY_FLAGS_INTERLACED; | ||
| 96 | |||
| 97 | if (mode->flags & DRM_MODE_FLAG_DBLCLK) | ||
| 98 | timings->flags |= DISPLAY_FLAGS_DOUBLECLK; | ||
| 99 | |||
| 100 | if (mode->flags & DRM_MODE_FLAG_PHSYNC) | ||
| 101 | timings->flags |= DISPLAY_FLAGS_HSYNC_HIGH; | ||
| 102 | else | ||
| 103 | timings->flags |= DISPLAY_FLAGS_HSYNC_LOW; | ||
| 104 | |||
| 105 | if (mode->flags & DRM_MODE_FLAG_PVSYNC) | ||
| 106 | timings->flags |= DISPLAY_FLAGS_VSYNC_HIGH; | ||
| 107 | else | ||
| 108 | timings->flags |= DISPLAY_FLAGS_VSYNC_LOW; | ||
| 109 | |||
| 110 | timings->flags |= DISPLAY_FLAGS_DE_HIGH | | ||
| 111 | DISPLAY_FLAGS_PIXDATA_POSEDGE | | ||
| 112 | DISPLAY_FLAGS_SYNC_NEGEDGE; | ||
| 113 | } | ||
| 114 | |||
| 115 | static enum drm_connector_status omap_connector_detect( | 45 | static enum drm_connector_status omap_connector_detect( |
| 116 | struct drm_connector *connector, bool force) | 46 | struct drm_connector *connector, bool force) |
| 117 | { | 47 | { |
| @@ -188,11 +118,11 @@ static int omap_connector_get_modes(struct drm_connector *connector) | |||
| 188 | kfree(edid); | 118 | kfree(edid); |
| 189 | } else { | 119 | } else { |
| 190 | struct drm_display_mode *mode = drm_mode_create(dev); | 120 | struct drm_display_mode *mode = drm_mode_create(dev); |
| 191 | struct omap_video_timings timings = {0}; | 121 | struct videomode timings = {0}; |
| 192 | 122 | ||
| 193 | dssdrv->get_timings(dssdev, &timings); | 123 | dssdrv->get_timings(dssdev, &timings); |
| 194 | 124 | ||
| 195 | copy_timings_omap_to_drm(mode, &timings); | 125 | drm_display_mode_from_videomode(&timings, mode); |
| 196 | 126 | ||
| 197 | mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; | 127 | mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; |
| 198 | drm_mode_set_name(mode); | 128 | drm_mode_set_name(mode); |
| @@ -210,12 +140,14 @@ static int omap_connector_mode_valid(struct drm_connector *connector, | |||
| 210 | struct omap_connector *omap_connector = to_omap_connector(connector); | 140 | struct omap_connector *omap_connector = to_omap_connector(connector); |
| 211 | struct omap_dss_device *dssdev = omap_connector->dssdev; | 141 | struct omap_dss_device *dssdev = omap_connector->dssdev; |
| 212 | struct omap_dss_driver *dssdrv = dssdev->driver; | 142 | struct omap_dss_driver *dssdrv = dssdev->driver; |
| 213 | struct omap_video_timings timings = {0}; | 143 | struct videomode timings = {0}; |
| 214 | struct drm_device *dev = connector->dev; | 144 | struct drm_device *dev = connector->dev; |
| 215 | struct drm_display_mode *new_mode; | 145 | struct drm_display_mode *new_mode; |
| 216 | int r, ret = MODE_BAD; | 146 | int r, ret = MODE_BAD; |
| 217 | 147 | ||
| 218 | copy_timings_drm_to_omap(&timings, mode); | 148 | drm_display_mode_to_videomode(mode, &timings); |
| 149 | timings.flags |= DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE | | ||
| 150 | DISPLAY_FLAGS_SYNC_NEGEDGE; | ||
| 219 | mode->vrefresh = drm_mode_vrefresh(mode); | 151 | mode->vrefresh = drm_mode_vrefresh(mode); |
| 220 | 152 | ||
| 221 | /* | 153 | /* |
| @@ -226,11 +158,11 @@ static int omap_connector_mode_valid(struct drm_connector *connector, | |||
| 226 | if (dssdrv->check_timings) { | 158 | if (dssdrv->check_timings) { |
| 227 | r = dssdrv->check_timings(dssdev, &timings); | 159 | r = dssdrv->check_timings(dssdev, &timings); |
| 228 | } else { | 160 | } else { |
| 229 | struct omap_video_timings t = {0}; | 161 | struct videomode t = {0}; |
| 230 | 162 | ||
| 231 | dssdrv->get_timings(dssdev, &t); | 163 | dssdrv->get_timings(dssdev, &t); |
| 232 | 164 | ||
| 233 | if (memcmp(&timings, &t, sizeof(struct omap_video_timings))) | 165 | if (memcmp(&timings, &t, sizeof(struct videomode))) |
| 234 | r = -EINVAL; | 166 | r = -EINVAL; |
| 235 | else | 167 | else |
| 236 | r = 0; | 168 | r = 0; |
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index a25d5f769d6f..c819e350fb1b 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c | |||
| @@ -34,7 +34,7 @@ struct omap_crtc { | |||
| 34 | const char *name; | 34 | const char *name; |
| 35 | enum omap_channel channel; | 35 | enum omap_channel channel; |
| 36 | 36 | ||
| 37 | struct omap_video_timings timings; | 37 | struct videomode timings; |
| 38 | 38 | ||
| 39 | struct omap_drm_irq vblank_irq; | 39 | struct omap_drm_irq vblank_irq; |
| 40 | struct omap_drm_irq error_irq; | 40 | struct omap_drm_irq error_irq; |
| @@ -56,7 +56,7 @@ uint32_t pipe2vbl(struct drm_crtc *crtc) | |||
| 56 | return dispc_mgr_get_vsync_irq(omap_crtc->channel); | 56 | return dispc_mgr_get_vsync_irq(omap_crtc->channel); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc) | 59 | struct videomode *omap_crtc_timings(struct drm_crtc *crtc) |
| 60 | { | 60 | { |
| 61 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); | 61 | struct omap_crtc *omap_crtc = to_omap_crtc(crtc); |
| 62 | return &omap_crtc->timings; | 62 | return &omap_crtc->timings; |
| @@ -215,7 +215,7 @@ static void omap_crtc_dss_disable(enum omap_channel channel) | |||
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | static void omap_crtc_dss_set_timings(enum omap_channel channel, | 217 | static void omap_crtc_dss_set_timings(enum omap_channel channel, |
| 218 | const struct omap_video_timings *timings) | 218 | const struct videomode *timings) |
| 219 | { | 219 | { |
| 220 | struct omap_crtc *omap_crtc = omap_crtcs[channel]; | 220 | struct omap_crtc *omap_crtc = omap_crtcs[channel]; |
| 221 | DBG("%s", omap_crtc->name); | 221 | DBG("%s", omap_crtc->name); |
| @@ -369,7 +369,10 @@ static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc) | |||
| 369 | mode->vdisplay, mode->vsync_start, mode->vsync_end, mode->vtotal, | 369 | mode->vdisplay, mode->vsync_start, mode->vsync_end, mode->vtotal, |
| 370 | mode->type, mode->flags); | 370 | mode->type, mode->flags); |
| 371 | 371 | ||
| 372 | copy_timings_drm_to_omap(&omap_crtc->timings, mode); | 372 | drm_display_mode_to_videomode(mode, &omap_crtc->timings); |
| 373 | omap_crtc->timings.flags |= DISPLAY_FLAGS_DE_HIGH | | ||
| 374 | DISPLAY_FLAGS_PIXDATA_POSEDGE | | ||
| 375 | DISPLAY_FLAGS_SYNC_NEGEDGE; | ||
| 373 | } | 376 | } |
| 374 | 377 | ||
| 375 | static int omap_crtc_atomic_check(struct drm_crtc *crtc, | 378 | static int omap_crtc_atomic_check(struct drm_crtc *crtc, |
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h index dcc30a98b9d4..4c51135eb9a6 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.h +++ b/drivers/gpu/drm/omapdrm/omap_drv.h | |||
| @@ -148,7 +148,7 @@ static inline void omap_fbdev_free(struct drm_device *dev) | |||
| 148 | } | 148 | } |
| 149 | #endif | 149 | #endif |
| 150 | 150 | ||
| 151 | struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc); | 151 | struct videomode *omap_crtc_timings(struct drm_crtc *crtc); |
| 152 | enum omap_channel omap_crtc_channel(struct drm_crtc *crtc); | 152 | enum omap_channel omap_crtc_channel(struct drm_crtc *crtc); |
| 153 | void omap_crtc_pre_init(void); | 153 | void omap_crtc_pre_init(void); |
| 154 | void omap_crtc_pre_uninit(void); | 154 | void omap_crtc_pre_uninit(void); |
| @@ -171,11 +171,6 @@ struct drm_encoder *omap_connector_attached_encoder( | |||
| 171 | struct drm_connector *connector); | 171 | struct drm_connector *connector); |
| 172 | bool omap_connector_get_hdmi_mode(struct drm_connector *connector); | 172 | bool omap_connector_get_hdmi_mode(struct drm_connector *connector); |
| 173 | 173 | ||
| 174 | void copy_timings_omap_to_drm(struct drm_display_mode *mode, | ||
| 175 | struct omap_video_timings *timings); | ||
| 176 | void copy_timings_drm_to_omap(struct omap_video_timings *timings, | ||
| 177 | struct drm_display_mode *mode); | ||
| 178 | |||
| 179 | uint32_t omap_framebuffer_get_formats(uint32_t *pixel_formats, | 174 | uint32_t omap_framebuffer_get_formats(uint32_t *pixel_formats, |
| 180 | uint32_t max_formats, enum omap_color_mode supported_modes); | 175 | uint32_t max_formats, enum omap_color_mode supported_modes); |
| 181 | struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev, | 176 | struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev, |
diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c b/drivers/gpu/drm/omapdrm/omap_encoder.c index 0bbb9c59622e..f54065e9e2bf 100644 --- a/drivers/gpu/drm/omapdrm/omap_encoder.c +++ b/drivers/gpu/drm/omapdrm/omap_encoder.c | |||
| @@ -102,7 +102,7 @@ static void omap_encoder_disable(struct drm_encoder *encoder) | |||
| 102 | 102 | ||
| 103 | static int omap_encoder_update(struct drm_encoder *encoder, | 103 | static int omap_encoder_update(struct drm_encoder *encoder, |
| 104 | enum omap_channel channel, | 104 | enum omap_channel channel, |
| 105 | struct omap_video_timings *timings) | 105 | struct videomode *timings) |
| 106 | { | 106 | { |
| 107 | struct drm_device *dev = encoder->dev; | 107 | struct drm_device *dev = encoder->dev; |
| 108 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); | 108 | struct omap_encoder *omap_encoder = to_omap_encoder(encoder); |
| @@ -113,11 +113,11 @@ static int omap_encoder_update(struct drm_encoder *encoder, | |||
| 113 | if (dssdrv->check_timings) { | 113 | if (dssdrv->check_timings) { |
| 114 | ret = dssdrv->check_timings(dssdev, timings); | 114 | ret = dssdrv->check_timings(dssdev, timings); |
| 115 | } else { | 115 | } else { |
| 116 | struct omap_video_timings t = {0}; | 116 | struct videomode t = {0}; |
| 117 | 117 | ||
| 118 | dssdrv->get_timings(dssdev, &t); | 118 | dssdrv->get_timings(dssdev, &t); |
| 119 | 119 | ||
| 120 | if (memcmp(timings, &t, sizeof(struct omap_video_timings))) | 120 | if (memcmp(timings, &t, sizeof(struct videomode))) |
| 121 | ret = -EINVAL; | 121 | ret = -EINVAL; |
| 122 | else | 122 | else |
| 123 | ret = 0; | 123 | ret = 0; |
