[Intel-gfx] [PATCH] drm/i915: Unpin vma iomapping when fbdev is destroyed

Tvrtko Ursulin tursulin at ursulin.net
Tue Jul 4 09:46:40 UTC 2017


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

If we don't release the iomapping we are not able to unpin the
vma which then gets leaked.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
Some time last year we talked about a pending patch to get rid
of the fbdev VMA leak. I lost track of what happened with that.

Compile tested only.
---
 drivers/gpu/drm/i915/intel_fbdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index 03347c6ae599..46831021236f 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -537,6 +537,7 @@ static void intel_fbdev_destroy(struct intel_fbdev *ifbdev)
 
 	if (ifbdev->fb) {
 		mutex_lock(&ifbdev->helper.dev->struct_mutex);
+		i915_vma_unpin_iomap(ifbdev->vma);
 		intel_unpin_fb_vma(ifbdev->vma);
 		mutex_unlock(&ifbdev->helper.dev->struct_mutex);
 
-- 
2.9.4



More information about the Intel-gfx mailing list