From: Ville Syrj?l? <ville.syrjala at linux.intel.com> Don't unpin the old fb after flips, unless a new fb was pinned, or we're disabling the plane/crtc. Signed-off-by: Ville Syrj?l? <ville.syrjala at linux.intel.com> --- drivers/gpu/drm/i915/intel_atomic.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index a119896..b795cb2 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -2133,8 +2133,10 @@ static void atomic_pipe_commit(struct drm_device *dev, intel_flip->old_cursor_bo = st->old.cursor_bo; } - if (st->old.fb) { + if (st->old.fb) intel_flip->old_fb_id = st->old.fb->base.id; + + if (st->fb_dirty && st->old.fb) { intel_flip->old_bo = to_intel_framebuffer(st->old.fb)->obj; mutex_lock(&dev->struct_mutex); @@ -2177,8 +2179,10 @@ static void atomic_pipe_commit(struct drm_device *dev, intel_plane->calc(plane, plane->fb, &st->coords); - if (st->old.fb) { + if (st->old.fb) intel_flip->old_fb_id = st->old.fb->base.id; + + if (st->dirty && st->old.fb) { intel_flip->old_bo = to_intel_framebuffer(st->old.fb)->obj; mutex_lock(&dev->struct_mutex); -- 1.7.8.6