@@ -2449,3 +2449,18 @@ void intel_atomic_handle_vblank(struct drm_device *dev, int pipe)
drm_flip_helper_vblank(&intel_plane->flip_helper);
}
}
+
+void intel_atomic_clear_flips(struct drm_crtc *crtc)
+{
+ struct drm_device *dev = crtc->dev;
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+ struct intel_plane *intel_plane;
+ int pipe = intel_crtc->pipe;
+
+ drm_flip_helper_clear(&intel_crtc->flip_helper);
+
+ list_for_each_entry(intel_plane, &dev->mode_config.plane_list, base.head) {
+ if (intel_plane->pipe == pipe)
+ drm_flip_helper_clear(&intel_plane->flip_helper);
+ }
+}
@@ -3566,7 +3566,7 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)
encoder->disable(encoder);
intel_crtc_wait_for_pending_flips(crtc);
- drm_flip_helper_clear(&intel_crtc->flip_helper);
+ intel_atomic_clear_flips(crtc);
drm_vblank_off(dev, pipe);
intel_crtc_update_cursor(crtc, false);
@@ -3688,7 +3688,7 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
/* Give the overlay scaler a chance to disable if it's on this pipe */
intel_crtc_wait_for_pending_flips(crtc);
- drm_flip_helper_clear(&intel_crtc->flip_helper);
+ intel_atomic_clear_flips(crtc);
drm_vblank_off(dev, pipe);
intel_crtc_dpms_overlay(intel_crtc, false);
intel_crtc_update_cursor(crtc, false);
@@ -729,6 +729,7 @@ extern int intel_atomic_init(struct drm_device *dev);
extern void intel_atomic_fini(struct drm_device *dev);
extern void intel_atomic_free_events(struct drm_device *dev, struct drm_file *file);
extern void intel_atomic_handle_vblank(struct drm_device *dev, int pipe);
+extern void intel_atomic_clear_flips(struct drm_crtc *crtc);
extern void intel_enable_primary(struct drm_crtc *crtc);
extern void intel_disable_primary(struct drm_crtc *crtc);