Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH] drm/i915: Unbind display fb immediately
Date: Tue, 20 Jun 2023 15:03:29 +0200	[thread overview]
Message-ID: <20230620130329.133473-1-maarten.lankhorst@linux.intel.com> (raw)

Share the pain with xe to test if it hits the same bugs..

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_fb_pin.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_fb_pin.c b/drivers/gpu/drm/i915/display/intel_fb_pin.c
index fffd568070d41..d89f3d243c7be 100644
--- a/drivers/gpu/drm/i915/display/intel_fb_pin.c
+++ b/drivers/gpu/drm/i915/display/intel_fb_pin.c
@@ -232,6 +232,11 @@ void intel_unpin_fb_vma(struct i915_vma *vma, unsigned long flags)
 	if (flags & PLANE_HAS_FENCE)
 		i915_vma_unpin_fence(vma);
 	i915_vma_unpin(vma);
+	if (!i915_vma_is_pinned(vma)) {
+		int err = i915_vma_unbind(vma);
+		if (err)
+			drm_info(vma->obj->base.dev, "Unpin failed with %i", err);
+	}
 	i915_vma_put(vma);
 }
 
-- 
2.39.2


             reply	other threads:[~2023-06-20 13:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 13:03 Maarten Lankhorst [this message]
2023-06-20 16:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Unbind display fb immediately Patchwork
2023-06-20 16:54 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230620130329.133473-1-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox