@@ -4039,6 +4039,9 @@ void intel_finish_page_flip(struct drm_device *dev, int pipe)
atomic_dec_and_test(&obj_priv->pending_flip))
DRM_WAKEUP(&dev_priv->pending_flip_queue);
schedule_work(&work->work);
+
+ /* Drop the flip ref we took when the ioctl was called */
+ drm_gem_object_unreference(work->pending_flip_obj);
}
void intel_prepare_page_flip(struct drm_device *dev, int plane)
@@ -4109,8 +4112,9 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
return ret;
}
- /* Reference the old fb object for the scheduled work. */
+ /* Reference the objects for the scheduled work. */
drm_gem_object_reference(work->old_fb_obj);
+ drm_gem_object_reference(obj);
crtc->fb = fb;
i915_gem_object_flush_write_domain(obj);