[PATCH 60/81] drm/i915: Unpin old fbs only when appropriate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux