[Intel-gfx] [PATCH 19/19] drm/i915: Allow async update of pageflips.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Apr 20 07:39:07 UTC 2016


Op 19-04-16 om 09:52 schreef Maarten Lankhorst:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
>
Uh oh, kbuild found a missing drm_crtc_vblank_get, no idea why I didn't notice this myself.

Appended delta for readability.
---
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 34b8937ede88..14f8dd39d835 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11066,7 +11066,7 @@ static void intel_mmio_flip_work_func(struct work_struct *w)
 	struct drm_device *dev = crtc->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct drm_i915_gem_request *req;
-	int i;
+	int i, ret;
 
 	if (!needs_modeset(&crtc_state->base) && crtc_state->update_pipe) {
 		work->put_power_domains =
@@ -11088,6 +11088,9 @@ static void intel_mmio_flip_work_func(struct work_struct *w)
 					    &dev_priv->rps.mmioflips));
 	}
 
+	ret = drm_crtc_vblank_get(crtc);
+	I915_STATE_WARN(ret < 0, "enabling vblank failed with %i\n", ret);
+
 	if (work->num_planes &&
 	    work->old_plane_state[0]->base.plane == crtc->primary)
 		intel_fbc_enable(intel_crtc, work->new_crtc_state, work->new_plane_state[0]);
@@ -13034,6 +13037,11 @@ static void intel_schedule_flip(struct drm_crtc *crtc,
 		else
 			intel_mmio_flip_work_func(&work->mmio_work);
 	} else {
+		int ret;
+
+		ret = drm_crtc_vblank_get(crtc);
+		I915_STATE_WARN(ret < 0, "enabling vblank failed with %i\n", ret);
+
 		work->flip_queued_vblank = intel_crtc_get_vblank_counter(to_intel_crtc(crtc));
 		smp_mb__before_atomic();
 		atomic_set(&work->pending, INTEL_FLIP_PENDING);



More information about the Intel-gfx mailing list