aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_drv.h
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2015-02-02 10:44:15 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-02-13 17:27:59 -0500
commitab8d66752a9c28cd6c94fa173feacdfc1554aa03 (patch)
tree5b10a80a6d0b84283e2689de61e2cc3925cee7de /drivers/gpu/drm/i915/intel_drv.h
parent3f678c96abb43a977d2ea41aefccdc49e8a3e896 (diff)
drm/i915: Track old framebuffer instead of object
Daniel Vetter spotted a bug while reviewing some of my refactoring in this are of the code. I'll quote: """ > @@ -9764,6 +9768,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, > work->event = event; > work->crtc = crtc; > work->old_fb_obj = intel_fb_obj(old_fb); > + work->old_tiling_mode = to_intel_framebuffer(old_fb)->tiling_mode; Hm, that's actually an interesting bugfix - currently userspace could be sneaky and destroy the old fb immediately after the flip completes and the change the tiling of the underlying object before the unpin work had a chance to run (needs some fudgin with rt prios to starve workers to make this work though). Imo the right fix is to hold a reference onto the fb and not the underlying gem object. With that tiling is guaranteed not to change. """ This patch tries to implement the above proposed change. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index eef79ccd0b7c..f048f8bb8beb 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -710,7 +710,7 @@ intel_get_crtc_for_plane(struct drm_device *dev, int plane)
710struct intel_unpin_work { 710struct intel_unpin_work {
711 struct work_struct work; 711 struct work_struct work;
712 struct drm_crtc *crtc; 712 struct drm_crtc *crtc;
713 struct drm_i915_gem_object *old_fb_obj; 713 struct drm_framebuffer *old_fb;
714 struct drm_i915_gem_object *pending_flip_obj; 714 struct drm_i915_gem_object *pending_flip_obj;
715 struct drm_pending_vblank_event *event; 715 struct drm_pending_vblank_event *event;
716 atomic_t pending; 716 atomic_t pending;