aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2016-09-22 07:06:48 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-11-02 04:48:18 -0400
commit4dc2250d7d9e816b986d656cde90f55c096012ed (patch)
treee6aab55339297cd000c19cc9f70ba45431ff8bf1 /drivers/gpu/drm/omapdrm/dss
parentfb7f3c4399ffa75bc31aaaaeab45238ea60c3d1a (diff)
drm/omap: omap_display_timings: rename hsw to hsync_len
In preparation to move the stack to use the generic videmode struct for display timing information rename the hsw member to hsync_len. 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.c29
-rw-r--r--drivers/gpu/drm/omapdrm/dss/display.c4
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dsi.c22
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi5_core.c8
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi_wp.c12
-rw-r--r--drivers/gpu/drm/omapdrm/dss/omapdss.h2
-rw-r--r--drivers/gpu/drm/omapdrm/dss/rfbi.c2
-rw-r--r--drivers/gpu/drm/omapdrm/dss/venc.c4
8 files changed, 42 insertions, 41 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index 3d208ce67794..8f97a11a2e97 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -2189,14 +2189,14 @@ static int check_horiz_timing_omap3(unsigned long pclk, unsigned long lclk,
2189 u64 val, blank; 2189 u64 val, blank;
2190 int i; 2190 int i;
2191 2191
2192 nonactive = t->hactive + t->hfp + t->hsw + t->hbp - out_width; 2192 nonactive = t->hactive + t->hfp + t->hsync_len + t->hbp - out_width;
2193 2193
2194 i = 0; 2194 i = 0;
2195 if (out_height < height) 2195 if (out_height < height)
2196 i++; 2196 i++;
2197 if (out_width < width) 2197 if (out_width < width)
2198 i++; 2198 i++;
2199 blank = div_u64((u64)(t->hbp + t->hsw + t->hfp) * lclk, pclk); 2199 blank = div_u64((u64)(t->hbp + t->hsync_len + t->hfp) * lclk, pclk);
2200 DSSDBG("blanking period + ppl = %llu (limit = %u)\n", blank, limits[i]); 2200 DSSDBG("blanking period + ppl = %llu (limit = %u)\n", blank, limits[i]);
2201 if (blank <= limits[i]) 2201 if (blank <= limits[i])
2202 return -EINVAL; 2202 return -EINVAL;
@@ -3093,10 +3093,10 @@ static bool _dispc_mgr_size_ok(u16 width, u16 height)
3093 height <= dispc.feat->mgr_height_max; 3093 height <= dispc.feat->mgr_height_max;
3094} 3094}
3095 3095
3096static bool _dispc_lcd_timings_ok(int hsw, int hfp, int hbp, 3096static bool _dispc_lcd_timings_ok(int hsync_len, int hfp, int hbp,
3097 int vsw, int vfp, int vbp) 3097 int vsw, int vfp, int vbp)
3098{ 3098{
3099 if (hsw < 1 || hsw > dispc.feat->sw_max || 3099 if (hsync_len < 1 || hsync_len > dispc.feat->sw_max ||
3100 hfp < 1 || hfp > dispc.feat->hp_max || 3100 hfp < 1 || hfp > dispc.feat->hp_max ||
3101 hbp < 1 || hbp > dispc.feat->hp_max || 3101 hbp < 1 || hbp > dispc.feat->hp_max ||
3102 vsw < 1 || vsw > dispc.feat->sw_max || 3102 vsw < 1 || vsw > dispc.feat->sw_max ||
@@ -3129,7 +3129,7 @@ bool dispc_mgr_timings_ok(enum omap_channel channel,
3129 if (timings->interlace) 3129 if (timings->interlace)
3130 return false; 3130 return false;
3131 3131
3132 if (!_dispc_lcd_timings_ok(timings->hsw, timings->hfp, 3132 if (!_dispc_lcd_timings_ok(timings->hsync_len, timings->hfp,
3133 timings->hbp, timings->vsw, timings->vfp, 3133 timings->hbp, timings->vsw, timings->vfp,
3134 timings->vbp)) 3134 timings->vbp))
3135 return false; 3135 return false;
@@ -3138,7 +3138,7 @@ bool dispc_mgr_timings_ok(enum omap_channel channel,
3138 return true; 3138 return true;
3139} 3139}
3140 3140
3141static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsw, 3141static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsync_len,
3142 int hfp, int hbp, int vsw, int vfp, int vbp, 3142 int hfp, int hbp, int vsw, int vfp, int vbp,
3143 enum omap_dss_signal_level vsync_level, 3143 enum omap_dss_signal_level vsync_level,
3144 enum omap_dss_signal_level hsync_level, 3144 enum omap_dss_signal_level hsync_level,
@@ -3150,7 +3150,7 @@ static void _dispc_mgr_set_lcd_timings(enum omap_channel channel, int hsw,
3150 u32 timing_h, timing_v, l; 3150 u32 timing_h, timing_v, l;
3151 bool onoff, rf, ipc, vs, hs, de; 3151 bool onoff, rf, ipc, vs, hs, de;
3152 3152
3153 timing_h = FLD_VAL(hsw-1, dispc.feat->sw_start, 0) | 3153 timing_h = FLD_VAL(hsync_len-1, dispc.feat->sw_start, 0) |
3154 FLD_VAL(hfp-1, dispc.feat->fp_start, 8) | 3154 FLD_VAL(hfp-1, dispc.feat->fp_start, 8) |
3155 FLD_VAL(hbp-1, dispc.feat->bp_start, 20); 3155 FLD_VAL(hbp-1, dispc.feat->bp_start, 20);
3156 timing_v = FLD_VAL(vsw-1, dispc.feat->sw_start, 0) | 3156 timing_v = FLD_VAL(vsw-1, dispc.feat->sw_start, 0) |
@@ -3267,19 +3267,20 @@ void dispc_mgr_set_timings(enum omap_channel channel,
3267 } 3267 }
3268 3268
3269 if (dss_mgr_is_lcd(channel)) { 3269 if (dss_mgr_is_lcd(channel)) {
3270 _dispc_mgr_set_lcd_timings(channel, t.hsw, t.hfp, t.hbp, t.vsw, 3270 _dispc_mgr_set_lcd_timings(channel, t.hsync_len, t.hfp, t.hbp,
3271 t.vfp, t.vbp, t.vsync_level, t.hsync_level, 3271 t.vsw, t.vfp, t.vbp, t.vsync_level,
3272 t.data_pclk_edge, t.de_level, t.sync_pclk_edge); 3272 t.hsync_level, t.data_pclk_edge, t.de_level,
3273 t.sync_pclk_edge);
3273 3274
3274 xtot = t.hactive + t.hfp + t.hsw + t.hbp; 3275 xtot = t.hactive + t.hfp + t.hsync_len + t.hbp;
3275 ytot = t.vactive + t.vfp + t.vsw + t.vbp; 3276 ytot = t.vactive + t.vfp + t.vsw + t.vbp;
3276 3277
3277 ht = timings->pixelclock / xtot; 3278 ht = timings->pixelclock / xtot;
3278 vt = timings->pixelclock / xtot / ytot; 3279 vt = timings->pixelclock / xtot / ytot;
3279 3280
3280 DSSDBG("pck %u\n", timings->pixelclock); 3281 DSSDBG("pck %u\n", timings->pixelclock);
3281 DSSDBG("hsw %d hfp %d hbp %d vsw %d vfp %d vbp %d\n", 3282 DSSDBG("hsync_len %d hfp %d hbp %d vsw %d vfp %d vbp %d\n",
3282 t.hsw, t.hfp, t.hbp, t.vsw, t.vfp, t.vbp); 3283 t.hsync_len, t.hfp, t.hbp, t.vsw, t.vfp, t.vbp);
3283 DSSDBG("vsync_level %d hsync_level %d data_pclk_edge %d de_level %d sync_pclk_edge %d\n", 3284 DSSDBG("vsync_level %d hsync_level %d data_pclk_edge %d de_level %d sync_pclk_edge %d\n",
3284 t.vsync_level, t.hsync_level, t.data_pclk_edge, 3285 t.vsync_level, t.hsync_level, t.data_pclk_edge,
3285 t.de_level, t.sync_pclk_edge); 3286 t.de_level, t.sync_pclk_edge);
@@ -4222,7 +4223,7 @@ static const struct dispc_errata_i734_data {
4222 .timings = { 4223 .timings = {
4223 .hactive = 8, .vactive = 1, 4224 .hactive = 8, .vactive = 1,
4224 .pixelclock = 16000000, 4225 .pixelclock = 16000000,
4225 .hsw = 8, .hfp = 4, .hbp = 4, 4226 .hsync_len = 8, .hfp = 4, .hbp = 4,
4226 .vsw = 1, .vfp = 1, .vbp = 1, 4227 .vsw = 1, .vfp = 1, .vbp = 1,
4227 .vsync_level = OMAPDSS_SIG_ACTIVE_LOW, 4228 .vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
4228 .hsync_level = OMAPDSS_SIG_ACTIVE_LOW, 4229 .hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
diff --git a/drivers/gpu/drm/omapdrm/dss/display.c b/drivers/gpu/drm/omapdrm/dss/display.c
index 29ae5d6e1508..78ceaa5e8198 100644
--- a/drivers/gpu/drm/omapdrm/dss/display.c
+++ b/drivers/gpu/drm/omapdrm/dss/display.c
@@ -227,7 +227,7 @@ void videomode_to_omap_video_timings(const struct videomode *vm,
227 ovt->hactive = vm->hactive; 227 ovt->hactive = vm->hactive;
228 ovt->hbp = vm->hback_porch; 228 ovt->hbp = vm->hback_porch;
229 ovt->hfp = vm->hfront_porch; 229 ovt->hfp = vm->hfront_porch;
230 ovt->hsw = vm->hsync_len; 230 ovt->hsync_len = vm->hsync_len;
231 ovt->vactive = vm->vactive; 231 ovt->vactive = vm->vactive;
232 ovt->vbp = vm->vback_porch; 232 ovt->vbp = vm->vback_porch;
233 ovt->vfp = vm->vfront_porch; 233 ovt->vfp = vm->vfront_porch;
@@ -260,7 +260,7 @@ void omap_video_timings_to_videomode(const struct omap_video_timings *ovt,
260 vm->hactive = ovt->hactive; 260 vm->hactive = ovt->hactive;
261 vm->hback_porch = ovt->hbp; 261 vm->hback_porch = ovt->hbp;
262 vm->hfront_porch = ovt->hfp; 262 vm->hfront_porch = ovt->hfp;
263 vm->hsync_len = ovt->hsw; 263 vm->hsync_len = ovt->hsync_len;
264 vm->vactive = ovt->vactive; 264 vm->vactive = ovt->vactive;
265 vm->vback_porch = ovt->vbp; 265 vm->vback_porch = ovt->vbp;
266 vm->vfront_porch = ovt->vfp; 266 vm->vfront_porch = ovt->vfp;
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 06b15091d62f..002b450b0649 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -4362,7 +4362,7 @@ static void print_dispc_vm(const char *str, const struct omap_video_timings *t)
4362 int hact, bl, tot; 4362 int hact, bl, tot;
4363 4363
4364 hact = t->hactive; 4364 hact = t->hactive;
4365 bl = t->hsw + t->hbp + t->hfp; 4365 bl = t->hsync_len + t->hbp + t->hfp;
4366 tot = hact + bl; 4366 tot = hact + bl;
4367 4367
4368#define TO_DISPC_T(x) ((u32)div64_u64((u64)x * 1000000000llu, pck)) 4368#define TO_DISPC_T(x) ((u32)div64_u64((u64)x * 1000000000llu, pck))
@@ -4371,9 +4371,9 @@ static void print_dispc_vm(const char *str, const struct omap_video_timings *t)
4371 "%u/%u/%u/%u = %u + %u = %u\n", 4371 "%u/%u/%u/%u = %u + %u = %u\n",
4372 str, 4372 str,
4373 pck, 4373 pck,
4374 t->hsw, t->hbp, hact, t->hfp, 4374 t->hsync_len, t->hbp, hact, t->hfp,
4375 bl, hact, tot, 4375 bl, hact, tot,
4376 TO_DISPC_T(t->hsw), 4376 TO_DISPC_T(t->hsync_len),
4377 TO_DISPC_T(t->hbp), 4377 TO_DISPC_T(t->hbp),
4378 TO_DISPC_T(hact), 4378 TO_DISPC_T(hact),
4379 TO_DISPC_T(t->hfp), 4379 TO_DISPC_T(t->hfp),
@@ -4399,7 +4399,7 @@ static void print_dsi_dispc_vm(const char *str,
4399 dsi_htot = t->hss + t->hsa + t->hse + t->hbp + dsi_hact + t->hfp; 4399 dsi_htot = t->hss + t->hsa + t->hse + t->hbp + dsi_hact + t->hfp;
4400 4400
4401 vm.pixelclock = pck; 4401 vm.pixelclock = pck;
4402 vm.hsw = div64_u64((u64)(t->hsa + t->hse) * pck, byteclk); 4402 vm.hsync_len = div64_u64((u64)(t->hsa + t->hse) * pck, byteclk);
4403 vm.hbp = div64_u64((u64)t->hbp * pck, byteclk); 4403 vm.hbp = div64_u64((u64)t->hbp * pck, byteclk);
4404 vm.hfp = div64_u64((u64)t->hfp * pck, byteclk); 4404 vm.hfp = div64_u64((u64)t->hfp * pck, byteclk);
4405 vm.hactive = t->hact; 4405 vm.hactive = t->hact;
@@ -4423,7 +4423,7 @@ static bool dsi_cm_calc_dispc_cb(int lckd, int pckd, unsigned long lck,
4423 t->pixelclock = pck; 4423 t->pixelclock = pck;
4424 t->hactive = ctx->config->timings->hactive; 4424 t->hactive = ctx->config->timings->hactive;
4425 t->vactive = ctx->config->timings->vactive; 4425 t->vactive = ctx->config->timings->vactive;
4426 t->hsw = t->hfp = t->hbp = t->vsw = 1; 4426 t->hsync_len = t->hfp = t->hbp = t->vsw = 1;
4427 t->vfp = t->vbp = 0; 4427 t->vfp = t->vbp = 0;
4428 4428
4429 return true; 4429 return true;
@@ -4527,7 +4527,7 @@ static bool dsi_vm_calc_blanking(struct dsi_clk_calc_ctx *ctx)
4527 4527
4528 xres = req_vm->hactive; 4528 xres = req_vm->hactive;
4529 4529
4530 panel_hbl = req_vm->hfp + req_vm->hbp + req_vm->hsw; 4530 panel_hbl = req_vm->hfp + req_vm->hbp + req_vm->hsync_len;
4531 panel_htot = xres + panel_hbl; 4531 panel_htot = xres + panel_hbl;
4532 4532
4533 dsi_hact = DIV_ROUND_UP(DIV_ROUND_UP(xres * bitspp, 8) + 6, ndl); 4533 dsi_hact = DIV_ROUND_UP(DIV_ROUND_UP(xres * bitspp, 8) + 6, ndl);
@@ -4557,7 +4557,7 @@ static bool dsi_vm_calc_blanking(struct dsi_clk_calc_ctx *ctx)
4557 hss = DIV_ROUND_UP(4, ndl); 4557 hss = DIV_ROUND_UP(4, ndl);
4558 4558
4559 if (cfg->trans_mode == OMAP_DSS_DSI_PULSE_MODE) { 4559 if (cfg->trans_mode == OMAP_DSS_DSI_PULSE_MODE) {
4560 if (ndl == 3 && req_vm->hsw == 0) 4560 if (ndl == 3 && req_vm->hsync_len == 0)
4561 hse = 1; 4561 hse = 1;
4562 else 4562 else
4563 hse = DIV_ROUND_UP(4, ndl); 4563 hse = DIV_ROUND_UP(4, ndl);
@@ -4596,10 +4596,10 @@ static bool dsi_vm_calc_blanking(struct dsi_clk_calc_ctx *ctx)
4596 4596
4597 if (cfg->trans_mode != OMAP_DSS_DSI_PULSE_MODE) { 4597 if (cfg->trans_mode != OMAP_DSS_DSI_PULSE_MODE) {
4598 hsa = 0; 4598 hsa = 0;
4599 } else if (ndl == 3 && req_vm->hsw == 0) { 4599 } else if (ndl == 3 && req_vm->hsync_len == 0) {
4600 hsa = 0; 4600 hsa = 0;
4601 } else { 4601 } else {
4602 hsa = div64_u64((u64)req_vm->hsw * byteclk, req_pck_nom); 4602 hsa = div64_u64((u64)req_vm->hsync_len * byteclk, req_pck_nom);
4603 hsa = max(hsa - hse, 1); 4603 hsa = max(hsa - hse, 1);
4604 } 4604 }
4605 4605
@@ -4655,7 +4655,7 @@ static bool dsi_vm_calc_blanking(struct dsi_clk_calc_ctx *ctx)
4655 dispc_vm->pixelclock = dispc_pck; 4655 dispc_vm->pixelclock = dispc_pck;
4656 4656
4657 if (cfg->trans_mode == OMAP_DSS_DSI_PULSE_MODE) { 4657 if (cfg->trans_mode == OMAP_DSS_DSI_PULSE_MODE) {
4658 hsa = div64_u64((u64)req_vm->hsw * dispc_pck, 4658 hsa = div64_u64((u64)req_vm->hsync_len * dispc_pck,
4659 req_pck_nom); 4659 req_pck_nom);
4660 hsa = max(hsa, 1); 4660 hsa = max(hsa, 1);
4661 } else { 4661 } else {
@@ -4686,7 +4686,7 @@ static bool dsi_vm_calc_blanking(struct dsi_clk_calc_ctx *ctx)
4686 return false; 4686 return false;
4687 4687
4688 dispc_vm->hfp = hfp; 4688 dispc_vm->hfp = hfp;
4689 dispc_vm->hsw = hsa; 4689 dispc_vm->hsync_len = hsa;
4690 dispc_vm->hbp = hbp; 4690 dispc_vm->hbp = hbp;
4691 4691
4692 return true; 4692 return true;
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
index 3f76976b0e38..dd4c989c44ce 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
@@ -297,7 +297,7 @@ static void hdmi_core_init(struct hdmi_core_vid_config *video_cfg,
297 /* video core */ 297 /* video core */
298 video_cfg->data_enable_pol = 1; /* It is always 1*/ 298 video_cfg->data_enable_pol = 1; /* It is always 1*/
299 video_cfg->hblank = cfg->timings.hfp + 299 video_cfg->hblank = cfg->timings.hfp +
300 cfg->timings.hbp + cfg->timings.hsw; 300 cfg->timings.hbp + cfg->timings.hsync_len;
301 video_cfg->vblank_osc = 0; 301 video_cfg->vblank_osc = 0;
302 video_cfg->vblank = cfg->timings.vsw + 302 video_cfg->vblank = cfg->timings.vsw +
303 cfg->timings.vfp + cfg->timings.vbp; 303 cfg->timings.vfp + cfg->timings.vbp;
@@ -319,7 +319,7 @@ static void hdmi_core_init(struct hdmi_core_vid_config *video_cfg,
319 video_cfg->v_fc_config.timings.hactive *= 2; 319 video_cfg->v_fc_config.timings.hactive *= 2;
320 video_cfg->hblank *= 2; 320 video_cfg->hblank *= 2;
321 video_cfg->v_fc_config.timings.hfp *= 2; 321 video_cfg->v_fc_config.timings.hfp *= 2;
322 video_cfg->v_fc_config.timings.hsw *= 2; 322 video_cfg->v_fc_config.timings.hsync_len *= 2;
323 video_cfg->v_fc_config.timings.hbp *= 2; 323 video_cfg->v_fc_config.timings.hbp *= 2;
324 } 324 }
325} 325}
@@ -377,9 +377,9 @@ static void hdmi_core_video_config(struct hdmi_core_data *core,
377 377
378 /* set horizontal sync pulse width */ 378 /* set horizontal sync pulse width */
379 REG_FLD_MOD(base, HDMI_CORE_FC_HSYNCINWIDTH1, 379 REG_FLD_MOD(base, HDMI_CORE_FC_HSYNCINWIDTH1,
380 (cfg->v_fc_config.timings.hsw >> 8), 1, 0); 380 (cfg->v_fc_config.timings.hsync_len >> 8), 1, 0);
381 REG_FLD_MOD(base, HDMI_CORE_FC_HSYNCINWIDTH0, 381 REG_FLD_MOD(base, HDMI_CORE_FC_HSYNCINWIDTH0,
382 cfg->v_fc_config.timings.hsw & 0xFF, 7, 0); 382 cfg->v_fc_config.timings.hsync_len & 0xFF, 7, 0);
383 383
384 /* set vertical sync pulse width */ 384 /* set vertical sync pulse width */
385 REG_FLD_MOD(base, HDMI_CORE_FC_VSYNCINWIDTH, 385 REG_FLD_MOD(base, HDMI_CORE_FC_VSYNCINWIDTH,
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c b/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c
index 05462cfe5af8..89914a7a2bf9 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi_wp.c
@@ -166,24 +166,24 @@ void hdmi_wp_video_config_timing(struct hdmi_wp_data *wp,
166{ 166{
167 u32 timing_h = 0; 167 u32 timing_h = 0;
168 u32 timing_v = 0; 168 u32 timing_v = 0;
169 unsigned hsw_offset = 1; 169 unsigned hsync_len_offset = 1;
170 170
171 DSSDBG("Enter hdmi_wp_video_config_timing\n"); 171 DSSDBG("Enter hdmi_wp_video_config_timing\n");
172 172
173 /* 173 /*
174 * On OMAP4 and OMAP5 ES1 the HSW field is programmed as is. On OMAP5 174 * On OMAP4 and OMAP5 ES1 the HSW field is programmed as is. On OMAP5
175 * ES2+ (including DRA7/AM5 SoCs) HSW field is programmed to hsw-1. 175 * ES2+ (including DRA7/AM5 SoCs) HSW field is programmed to hsync_len-1.
176 * However, we don't support OMAP5 ES1 at all, so we can just check for 176 * However, we don't support OMAP5 ES1 at all, so we can just check for
177 * OMAP4 here. 177 * OMAP4 here.
178 */ 178 */
179 if (omapdss_get_version() == OMAPDSS_VER_OMAP4430_ES1 || 179 if (omapdss_get_version() == OMAPDSS_VER_OMAP4430_ES1 ||
180 omapdss_get_version() == OMAPDSS_VER_OMAP4430_ES2 || 180 omapdss_get_version() == OMAPDSS_VER_OMAP4430_ES2 ||
181 omapdss_get_version() == OMAPDSS_VER_OMAP4) 181 omapdss_get_version() == OMAPDSS_VER_OMAP4)
182 hsw_offset = 0; 182 hsync_len_offset = 0;
183 183
184 timing_h |= FLD_VAL(timings->hbp, 31, 20); 184 timing_h |= FLD_VAL(timings->hbp, 31, 20);
185 timing_h |= FLD_VAL(timings->hfp, 19, 8); 185 timing_h |= FLD_VAL(timings->hfp, 19, 8);
186 timing_h |= FLD_VAL(timings->hsw - hsw_offset, 7, 0); 186 timing_h |= FLD_VAL(timings->hsync_len - hsync_len_offset, 7, 0);
187 hdmi_write_reg(wp->base, HDMI_WP_VIDEO_TIMING_H, timing_h); 187 hdmi_write_reg(wp->base, HDMI_WP_VIDEO_TIMING_H, timing_h);
188 188
189 timing_v |= FLD_VAL(timings->vbp, 31, 20); 189 timing_v |= FLD_VAL(timings->vbp, 31, 20);
@@ -203,7 +203,7 @@ void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt,
203 203
204 timings->hbp = param->timings.hbp; 204 timings->hbp = param->timings.hbp;
205 timings->hfp = param->timings.hfp; 205 timings->hfp = param->timings.hfp;
206 timings->hsw = param->timings.hsw; 206 timings->hsync_len = param->timings.hsync_len;
207 timings->vbp = param->timings.vbp; 207 timings->vbp = param->timings.vbp;
208 timings->vfp = param->timings.vfp; 208 timings->vfp = param->timings.vfp;
209 timings->vsw = param->timings.vsw; 209 timings->vsw = param->timings.vsw;
@@ -223,7 +223,7 @@ void hdmi_wp_init_vid_fmt_timings(struct hdmi_video_format *video_fmt,
223 if (param->timings.double_pixel) { 223 if (param->timings.double_pixel) {
224 video_fmt->x_res *= 2; 224 video_fmt->x_res *= 2;
225 timings->hfp *= 2; 225 timings->hfp *= 2;
226 timings->hsw *= 2; 226 timings->hsync_len *= 2;
227 timings->hbp *= 2; 227 timings->hbp *= 2;
228 } 228 }
229} 229}
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index 0b969f6f5701..6468afa2a85b 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -307,7 +307,7 @@ struct omap_video_timings {
307 /* Unit: Hz */ 307 /* Unit: Hz */
308 u32 pixelclock; 308 u32 pixelclock;
309 /* Unit: pixel clocks */ 309 /* Unit: pixel clocks */
310 u16 hsw; /* Horizontal synchronization pulse width */ 310 u16 hsync_len; /* Horizontal synchronization pulse width */
311 /* Unit: pixel clocks */ 311 /* Unit: pixel clocks */
312 u16 hfp; /* Horizontal front porch */ 312 u16 hfp; /* Horizontal front porch */
313 /* Unit: pixel clocks */ 313 /* Unit: pixel clocks */
diff --git a/drivers/gpu/drm/omapdrm/dss/rfbi.c b/drivers/gpu/drm/omapdrm/dss/rfbi.c
index ef9984c3d906..11d70691c4b1 100644
--- a/drivers/gpu/drm/omapdrm/dss/rfbi.c
+++ b/drivers/gpu/drm/omapdrm/dss/rfbi.c
@@ -858,7 +858,7 @@ static void rfbi_config_lcd_manager(struct omap_dss_device *dssdev)
858 * are expected to be already configured by the panel driver via 858 * are expected to be already configured by the panel driver via
859 * omapdss_rfbi_set_size() 859 * omapdss_rfbi_set_size()
860 */ 860 */
861 rfbi.timings.hsw = 1; 861 rfbi.timings.hsync_len = 1;
862 rfbi.timings.hfp = 1; 862 rfbi.timings.hfp = 1;
863 rfbi.timings.hbp = 1; 863 rfbi.timings.hbp = 1;
864 rfbi.timings.vsw = 1; 864 rfbi.timings.vsw = 1;
diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c
index 463dc4e27f7a..9f53e9a21706 100644
--- a/drivers/gpu/drm/omapdrm/dss/venc.c
+++ b/drivers/gpu/drm/omapdrm/dss/venc.c
@@ -266,7 +266,7 @@ const struct omap_video_timings omap_dss_pal_timings = {
266 .hactive = 720, 266 .hactive = 720,
267 .vactive = 574, 267 .vactive = 574,
268 .pixelclock = 13500000, 268 .pixelclock = 13500000,
269 .hsw = 64, 269 .hsync_len = 64,
270 .hfp = 12, 270 .hfp = 12,
271 .hbp = 68, 271 .hbp = 68,
272 .vsw = 5, 272 .vsw = 5,
@@ -287,7 +287,7 @@ const struct omap_video_timings omap_dss_ntsc_timings = {
287 .hactive = 720, 287 .hactive = 720,
288 .vactive = 482, 288 .vactive = 482,
289 .pixelclock = 13500000, 289 .pixelclock = 13500000,
290 .hsw = 64, 290 .hsync_len = 64,
291 .hfp = 16, 291 .hfp = 16,
292 .hbp = 58, 292 .hbp = 58,
293 .vsw = 6, 293 .vsw = 6,