[PATCH 3/3] drm/i915: Use drm_crtc_vblank_get_accurate() in intel_atomic_wait_for_vblanks()
ville.syrjala at linux.intel.com
ville.syrjala at linux.intel.com
Fri Jun 30 14:18:43 UTC 2017
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
To make sure intel_atomic_wait_for_vblanks() really waits for at least
one vblank let's switch to using drm_crtc_vblank_get_accurate().
Also toss in a FIXME that we should really be sampling the vblank
counter when we did the plane/wm update instead of resampling it
potentially much later when we call intel_atomic_wait_for_vblanks().
Cc: Daniel Vetter <daniel at ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4e03ca6c946f..12fc4fcf78c5 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12826,12 +12826,16 @@ static void intel_atomic_wait_for_vblanks(struct drm_device *dev,
if (!((1 << pipe) & crtc_mask))
continue;
- ret = drm_crtc_vblank_get(&crtc->base);
+ ret = drm_crtc_vblank_get_accurate(&crtc->base);
if (WARN_ON(ret != 0)) {
crtc_mask &= ~(1 << pipe);
continue;
}
+ /*
+ * FIXME we should have sampled this
+ * when we did the actual update.
+ */
last_vblank_count[pipe] = drm_crtc_vblank_count(&crtc->base);
}
--
2.13.0
More information about the dri-devel
mailing list