On Wed, Jul 20, 2016 at 12:38:24PM +0100, Dave Gordon wrote: > On 20/07/16 09:59, Chris Wilson wrote: > >diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > >index 77d320584478..84904a2d3fcd 100644 > >--- a/drivers/gpu/drm/i915/intel_display.c > >+++ b/drivers/gpu/drm/i915/intel_display.c > >@@ -11649,7 +11649,6 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, > > > > /* Reference the objects for the scheduled work. */ > > drm_framebuffer_reference(work->old_fb); > >- drm_gem_object_reference(&obj->base); > > > > crtc->primary->fb = fb; > > update_state_fb(crtc->primary); > >@@ -11657,7 +11656,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, > > intel_fbc_pre_update(intel_crtc, intel_crtc->config, > > to_intel_plane_state(primary->state)); > > > >- work->pending_flip_obj = obj; > >+ work->pending_flip_obj = i915_gem_object_get(obj); > > > > ret = i915_mutex_lock_interruptible(dev); > > if (ret) > > This last one moves the point at which the reference is taken past > several function calls; is that intentional, or at least harmless? It is harmless. The function owns a reference to the framebuffer (which owns the obj), what is required is an extra reference for the deferred work item. -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx