drm/i915: Calculate vblank timestamping constants before enabling vblank.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 14 Jul 2015 11:46:40 +0000 (13:46 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 14 Jul 2015 15:18:38 +0000 (17:18 +0200)
This is required to properly initialize vblanks on the active crtc.
Without it drm_calc_vbltimestamp_from_scanoutpos can fail with
crtc 0: Noop due to uninitialized mode.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 5254a3a5a268506f29b8123cd90f8f8feda6ef76..1b8a17c67ff5de7560e50b592b892700c33de57e 100644 (file)
@@ -15239,6 +15239,7 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc)
        /* restore vblank interrupts to correct state */
        drm_crtc_vblank_reset(&crtc->base);
        if (crtc->active) {
+               drm_calc_timestamping_constants(&crtc->base, &crtc->base.hwmode);
                update_scanline_offset(crtc);
                drm_crtc_vblank_on(&crtc->base);
        }