diff options
| author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-01-13 11:41:39 -0500 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-03-03 10:36:43 -0500 |
| commit | 14ac59349c04caedb53a75c85d19cf7d68992748 (patch) | |
| tree | c0d219659a75aadf7ec3359401987d8bfa53cffb /drivers | |
| parent | 711445cfe4be8b3b7203f7634452787f48165aff (diff) | |
drm/omap: HDMI5: Add interlace support
Add the missing bits for interlace:
* Set VBLANK_OSC if the videomode's vblank is fractional
* Halve the vertical timings for interlace
* Double the horizontal timings for double-pixel mode
* Set FC_PRCONF properly for double-pixel mode
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c index 947edb9d4275..6a397520cae5 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | |||
| @@ -298,10 +298,30 @@ static void hdmi_core_init(struct hdmi_core_vid_config *video_cfg, | |||
| 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.hsw; |
| 301 | video_cfg->vblank_osc = 0; /* Always 0 - need to confirm */ | 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; |
| 304 | video_cfg->v_fc_config.hdmi_dvi_mode = cfg->hdmi_dvi_mode; | 304 | video_cfg->v_fc_config.hdmi_dvi_mode = cfg->hdmi_dvi_mode; |
| 305 | |||
| 306 | if (cfg->timings.interlace) { | ||
| 307 | /* set vblank_osc if vblank is fractional */ | ||
| 308 | if (video_cfg->vblank % 2 != 0) | ||
| 309 | video_cfg->vblank_osc = 1; | ||
| 310 | |||
| 311 | video_cfg->v_fc_config.timings.y_res /= 2; | ||
| 312 | video_cfg->vblank /= 2; | ||
| 313 | video_cfg->v_fc_config.timings.vfp /= 2; | ||
| 314 | video_cfg->v_fc_config.timings.vsw /= 2; | ||
| 315 | video_cfg->v_fc_config.timings.vbp /= 2; | ||
| 316 | } | ||
| 317 | |||
| 318 | if (cfg->timings.double_pixel) { | ||
| 319 | video_cfg->v_fc_config.timings.x_res *= 2; | ||
| 320 | video_cfg->hblank *= 2; | ||
| 321 | video_cfg->v_fc_config.timings.hfp *= 2; | ||
| 322 | video_cfg->v_fc_config.timings.hsw *= 2; | ||
| 323 | video_cfg->v_fc_config.timings.hbp *= 2; | ||
| 324 | } | ||
| 305 | } | 325 | } |
| 306 | 326 | ||
| 307 | /* DSS_HDMI_CORE_VIDEO_CONFIG */ | 327 | /* DSS_HDMI_CORE_VIDEO_CONFIG */ |
| @@ -368,6 +388,11 @@ static void hdmi_core_video_config(struct hdmi_core_data *core, | |||
| 368 | /* select DVI mode */ | 388 | /* select DVI mode */ |
| 369 | REG_FLD_MOD(base, HDMI_CORE_FC_INVIDCONF, | 389 | REG_FLD_MOD(base, HDMI_CORE_FC_INVIDCONF, |
| 370 | cfg->v_fc_config.hdmi_dvi_mode, 3, 3); | 390 | cfg->v_fc_config.hdmi_dvi_mode, 3, 3); |
| 391 | |||
| 392 | if (cfg->v_fc_config.timings.double_pixel) | ||
| 393 | REG_FLD_MOD(base, HDMI_CORE_FC_PRCONF, 2, 7, 4); | ||
| 394 | else | ||
| 395 | REG_FLD_MOD(base, HDMI_CORE_FC_PRCONF, 1, 7, 4); | ||
| 371 | } | 396 | } |
| 372 | 397 | ||
| 373 | static void hdmi_core_config_video_packetizer(struct hdmi_core_data *core) | 398 | static void hdmi_core_config_video_packetizer(struct hdmi_core_data *core) |
