aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_irq.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2013-10-26 10:57:31 -0400
committerVille Syrjälä <ville.syrjala@linux.intel.com>2014-01-20 04:05:08 -0500
commit7da903ef04851aba81e4ddabf65c15fb71b7ce47 (patch)
tree391586f05bee51b1874ebadcbdcb465646d6e03d /drivers/gpu/drm/drm_irq.c
parent545cdd5510205f01cd9604e23385bac468d45c63 (diff)
drm: Pass the display mode to drm_calc_vbltimestamp_from_scanoutpos()
Rather than using crtc->hwmode, just pass the relevant mode to drm_calc_vbltimestamp_from_scanoutpos(). This removes the last hwmode usage from core drm. Reviewed-by: mario.kleiner.de@gmail.com Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
-rw-r--r--drivers/gpu/drm/drm_irq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 3837132086f0..db93b07723dd 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -522,6 +522,7 @@ EXPORT_SYMBOL(drm_calc_timestamping_constants);
522 * 0 = Default. 522 * 0 = Default.
523 * DRM_CALLED_FROM_VBLIRQ = If function is called from vbl irq handler. 523 * DRM_CALLED_FROM_VBLIRQ = If function is called from vbl irq handler.
524 * @refcrtc: drm_crtc* of crtc which defines scanout timing. 524 * @refcrtc: drm_crtc* of crtc which defines scanout timing.
525 * @mode: mode which defines the scanout timings
525 * 526 *
526 * Returns negative value on error, failure or if not supported in current 527 * Returns negative value on error, failure or if not supported in current
527 * video mode: 528 * video mode:
@@ -541,11 +542,11 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, int crtc,
541 int *max_error, 542 int *max_error,
542 struct timeval *vblank_time, 543 struct timeval *vblank_time,
543 unsigned flags, 544 unsigned flags,
544 struct drm_crtc *refcrtc) 545 const struct drm_crtc *refcrtc,
546 const struct drm_display_mode *mode)
545{ 547{
546 ktime_t stime, etime, mono_time_offset; 548 ktime_t stime, etime, mono_time_offset;
547 struct timeval tv_etime; 549 struct timeval tv_etime;
548 struct drm_display_mode *mode;
549 int vbl_status, vtotal, vdisplay; 550 int vbl_status, vtotal, vdisplay;
550 int vpos, hpos, i; 551 int vpos, hpos, i;
551 s64 framedur_ns, linedur_ns, pixeldur_ns, delta_ns, duration_ns; 552 s64 framedur_ns, linedur_ns, pixeldur_ns, delta_ns, duration_ns;
@@ -562,7 +563,6 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev, int crtc,
562 return -EIO; 563 return -EIO;
563 } 564 }
564 565
565 mode = &refcrtc->hwmode;
566 vtotal = mode->crtc_vtotal; 566 vtotal = mode->crtc_vtotal;
567 vdisplay = mode->crtc_vdisplay; 567 vdisplay = mode->crtc_vdisplay;
568 568