Skip to content

Commit

Permalink
drm/omap: add more new timings fields
Browse files Browse the repository at this point in the history
Without these, DVI is broken.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Rob Clark authored and Greg Kroah-Hartman committed Sep 10, 2012
1 parent 0b0d7b6 commit 94254ed
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions drivers/staging/omapdrm/omap_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ static inline void copy_timings_omap_to_drm(struct drm_display_mode *mode,

if (timings->interlace)
mode->flags |= DRM_MODE_FLAG_INTERLACE;

if (timings->hsync_level == OMAPDSS_SIG_ACTIVE_HIGH)
mode->flags |= DRM_MODE_FLAG_PHSYNC;
else
mode->flags |= DRM_MODE_FLAG_NHSYNC;

if (timings->vsync_level == OMAPDSS_SIG_ACTIVE_HIGH)
mode->flags |= DRM_MODE_FLAG_PVSYNC;
else
mode->flags |= DRM_MODE_FLAG_NVSYNC;
}

static inline void copy_timings_drm_to_omap(struct omap_video_timings *timings,
Expand All @@ -70,6 +80,20 @@ static inline void copy_timings_drm_to_omap(struct omap_video_timings *timings,
timings->vbp = mode->vtotal - mode->vsync_end;

timings->interlace = !!(mode->flags & DRM_MODE_FLAG_INTERLACE);

if (mode->flags & DRM_MODE_FLAG_PHSYNC)
timings->hsync_level = OMAPDSS_SIG_ACTIVE_HIGH;
else
timings->hsync_level = OMAPDSS_SIG_ACTIVE_LOW;

if (mode->flags & DRM_MODE_FLAG_PVSYNC)
timings->vsync_level = OMAPDSS_SIG_ACTIVE_HIGH;
else
timings->vsync_level = OMAPDSS_SIG_ACTIVE_LOW;

timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
timings->de_level = OMAPDSS_SIG_ACTIVE_HIGH;
timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES;
}

static void omap_connector_dpms(struct drm_connector *connector, int mode)
Expand Down

0 comments on commit 94254ed

Please sign in to comment.