aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2016-09-22 07:07:03 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-11-02 04:48:18 -0400
commit4520ff28aaa1e7f1b45f3abc0c45429ea9e93817 (patch)
tree3c10acd71910c43edb4637fbea5f932439a9e6b2 /drivers/gpu/drm/omapdrm/dss
parent7aa91e76aec9dda35ae643c572a8d1b1d596d27b (diff)
drm/omap: Replace struct omap_video_timings with videomode
omap_video_timings can be replaced with the generic videomode in omapdrm and the omap_video_timings can be removed. This patch will replace the omap_video_timings with videomode. With the change we no longer need the functions to convert to/from videomode and drm_display_mode to omap_video_timings, these can be removed as well. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dispc.c30
-rw-r--r--drivers/gpu/drm/omapdrm/dss/display.c39
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dpi.c10
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dsi.c24
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dss.h4
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi.h8
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi4.c8
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi4_core.c2
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi5.c8
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi5_core.c4
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi_wp.c6
-rw-r--r--drivers/gpu/drm/omapdrm/dss/omapdss.h82
-rw-r--r--drivers/gpu/drm/omapdrm/dss/output.c2
-rw-r--r--drivers/gpu/drm/omapdrm/dss/rfbi.c2
-rw-r--r--drivers/gpu/drm/omapdrm/dss/sdi.c10
-rw-r--r--drivers/gpu/drm/omapdrm/dss/venc.c14
16 files changed, 94 insertions, 159 deletions
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 */
2181static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk, 2181static 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
2235static unsigned long calc_core_clk_five_taps(unsigned long pclk, 2235static 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
2328static int dispc_ovl_calc_scaling_24xx(unsigned long pclk, unsigned long lclk, 2328static 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
2374static int dispc_ovl_calc_scaling_34xx(unsigned long pclk, unsigned long lclk, 2374static 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
2459static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk, 2459static 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
2504static int dispc_ovl_calc_scaling(unsigned long pclk, unsigned long lclk, 2504static 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
2788int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, 2788int 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,
2812EXPORT_SYMBOL(dispc_ovl_setup); 2812EXPORT_SYMBOL(dispc_ovl_setup);
2813 2813
2814int dispc_wb_setup(const struct omap_dss_writeback_info *wi, 2814int 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
3121bool dispc_mgr_timings_ok(enum omap_channel channel, 3121bool 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
3145static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, 3145static 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? */
3223void dispc_mgr_set_timings(enum omap_channel channel, 3223void 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
4187static const struct dispc_errata_i734_data { 4187static 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)
72EXPORT_SYMBOL(omapdss_default_get_recommended_bpp); 72EXPORT_SYMBOL(omapdss_default_get_recommended_bpp);
73 73
74void omapdss_default_get_timings(struct omap_dss_device *dssdev, 74void 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}
219EXPORT_SYMBOL(omap_dss_find_device); 219EXPORT_SYMBOL(omap_dss_find_device);
220
221void 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}
237EXPORT_SYMBOL(videomode_to_omap_video_timings);
238
239void 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}
256EXPORT_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
478static void dpi_set_timings(struct omap_dss_device *dssdev, 478static 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
492static void dpi_get_timings(struct omap_dss_device *dssdev, 492static 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
504static int dpi_check_timings(struct omap_dss_device *dssdev, 504static 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
4364static void print_dispc_vm(const char *str, const struct omap_video_timings *t) 4364static 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)
4392static void print_dsi_dispc_vm(const char *str, 4392static 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
369bool dispc_mgr_timings_ok(enum omap_channel channel, 369bool dispc_mgr_timings_ok(enum omap_channel channel,
370 const struct omap_video_timings *timings); 370 const struct videomode *timings);
371int dispc_calc_clock_rates(unsigned long dispc_fclk_rate, 371int 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);
390bool dispc_wb_is_enabled(void); 390bool dispc_wb_is_enabled(void);
391void dispc_wb_set_channel_in(enum dss_writeback_channel channel); 391void dispc_wb_set_channel_in(enum dss_writeback_channel channel);
392int dispc_wb_setup(const struct omap_dss_writeback_info *wi, 392int 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 */
396int venc_init_platform_driver(void) __init; 396int 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
183struct hdmi_config { 183struct 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);
298void hdmi_wp_video_config_format(struct hdmi_wp_data *wp, 298void hdmi_wp_video_config_format(struct hdmi_wp_data *wp,
299 struct hdmi_video_format *video_fmt); 299 struct hdmi_video_format *video_fmt);
300void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp, 300void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp,
301 struct omap_video_timings *timings); 301 struct videomode *timings);
302void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp, 302void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp,
303 struct omap_video_timings *timings); 303 struct videomode *timings);
304void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt, 304void 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);
306int hdmi_wp_init(struct platform_device *pdev, struct hdmi_wp_data *wp); 306int hdmi_wp_init(struct platform_device *pdev, struct hdmi_wp_data *wp);
307phys_addr_t hdmi_wp_get_audio_dma_addr(struct hdmi_wp_data *wp); 307phys_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)
155static int hdmi_power_on_full(struct omap_dss_device *dssdev) 155static 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
258static int hdmi_display_check_timing(struct omap_dss_device *dssdev, 258static 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
267static void hdmi_display_set_timing(struct omap_dss_device *dssdev, 267static 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
279static void hdmi_display_get_timings(struct omap_dss_device *dssdev, 279static 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)
172static int hdmi_power_on_full(struct omap_dss_device *dssdev) 172static 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
275static int hdmi_display_check_timing(struct omap_dss_device *dssdev, 275static 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
284static void hdmi_display_set_timing(struct omap_dss_device *dssdev, 284static 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
296static void hdmi_display_get_timings(struct omap_dss_device *dssdev, 296static 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)
609void hdmi5_configure(struct hdmi_core_data *core, struct hdmi_wp_data *wp, 609void 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
146void hdmi_wp_video_config_interface(struct hdmi_wp_data *wp, 146void 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
164void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp, 164void 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
195void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt, 195void 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 {
290struct omap_dss_dsi_config { 290struct 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
302struct 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 */
329extern const struct omap_video_timings omap_dss_pal_timings; 306extern const struct videomode omap_dss_pal_timings;
330extern const struct omap_video_timings omap_dss_ntsc_timings; 307extern const struct videomode omap_dss_ntsc_timings;
331 308
332struct omap_dss_cpr_coefs { 309struct 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
537struct omapdss_atv_ops { 514struct 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));
807const char *omapdss_get_default_display_name(void); 784const char *omapdss_get_default_display_name(void);
808 785
809void videomode_to_omap_video_timings(const struct videomode *vm,
810 struct omap_video_timings *ovt);
811void omap_video_timings_to_videomode(const struct omap_video_timings *ovt,
812 struct videomode *vm);
813
814int dss_feat_get_num_mgrs(void); 786int dss_feat_get_num_mgrs(void);
815int dss_feat_get_num_ovls(void); 787int dss_feat_get_num_ovls(void);
816enum omap_color_mode dss_feat_get_supported_color_modes(enum omap_plane plane); 788enum 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);
840int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); 812int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev);
841void omapdss_default_get_timings(struct omap_dss_device *dssdev, 813void omapdss_default_get_timings(struct omap_dss_device *dssdev,
842 struct omap_video_timings *timings); 814 struct videomode *timings);
843 815
844typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); 816typedef void (*omap_dispc_isr_t) (void *arg, u32 mask);
845int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); 817int 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);
893void dispc_mgr_set_lcd_config(enum omap_channel channel, 865void 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);
895void dispc_mgr_set_timings(enum omap_channel channel, 867void dispc_mgr_set_timings(enum omap_channel channel,
896 const struct omap_video_timings *timings); 868 const struct videomode *timings);
897void dispc_mgr_setup(enum omap_channel channel, 869void dispc_mgr_setup(enum omap_channel channel,
898 const struct omap_overlay_manager_info *info); 870 const struct omap_overlay_manager_info *info);
899u32 dispc_mgr_gamma_size(enum omap_channel channel); 871u32 dispc_mgr_gamma_size(enum omap_channel channel);
@@ -906,7 +878,7 @@ bool dispc_ovl_enabled(enum omap_plane plane);
906void dispc_ovl_set_channel_out(enum omap_plane plane, 878void dispc_ovl_set_channel_out(enum omap_plane plane,
907 enum omap_channel channel); 879 enum omap_channel channel);
908int dispc_ovl_setup(enum omap_plane plane, const struct omap_overlay_info *oi, 880int 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
912enum omap_dss_output_id dispc_mgr_get_supported_outputs(enum omap_channel channel); 884enum 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,
938void dss_mgr_disconnect(enum omap_channel channel, 910void dss_mgr_disconnect(enum omap_channel channel,
939 struct omap_dss_device *dst); 911 struct omap_dss_device *dst);
940void dss_mgr_set_timings(enum omap_channel channel, 912void dss_mgr_set_timings(enum omap_channel channel,
941 const struct omap_video_timings *timings); 913 const struct videomode *timings);
942void dss_mgr_set_lcd_config(enum omap_channel channel, 914void 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);
944int dss_mgr_enable(enum omap_channel channel); 916int 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,
202EXPORT_SYMBOL(dss_mgr_disconnect); 202EXPORT_SYMBOL(dss_mgr_disconnect);
203 203
204void dss_mgr_set_timings(enum omap_channel channel, 204void 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
230static void sdi_set_timings(struct omap_dss_device *dssdev, 230static 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
236static void sdi_get_timings(struct omap_dss_device *dssdev, 236static 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
242static int sdi_check_timings(struct omap_dss_device *dssdev, 242static 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
265const struct omap_video_timings omap_dss_pal_timings = { 265const 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};
281EXPORT_SYMBOL(omap_dss_pal_timings); 281EXPORT_SYMBOL(omap_dss_pal_timings);
282 282
283const struct omap_video_timings omap_dss_ntsc_timings = { 283const 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
424static const struct venc_config *venc_timings_to_config( 424static 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
542static void venc_set_timings(struct omap_dss_device *dssdev, 542static 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
560static int venc_check_timings(struct omap_dss_device *dssdev, 560static 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
574static void venc_get_timings(struct omap_dss_device *dssdev, 574static 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