public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [CI 01/25] drm/i915/fbdev: Call intel_unpin_fb_obj() on release
@ 2016-04-28  8:56 Chris Wilson
  2016-04-28  8:56 ` [CI 02/25] drm/i915/overlay: Replace i915_gem_obj_ggtt_offset() with the known flip_addr Chris Wilson
                   ` (24 more replies)
  0 siblings, 25 replies; 39+ messages in thread
From: Chris Wilson @ 2016-04-28  8:56 UTC (permalink / raw)
  To: intel-gfx

When releasing the intel_fbdev, we should unpin the framebuffer that we
pinned during construction.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 drivers/gpu/drm/i915/intel_drv.h     | 1 +
 drivers/gpu/drm/i915/intel_fbdev.c   | 7 ++++++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index eb7cb9431209..51e8fe9b1372 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2310,7 +2310,7 @@ err_pm:
 	return ret;
 }
 
-static void intel_unpin_fb_obj(struct drm_framebuffer *fb, unsigned int rotation)
+void intel_unpin_fb_obj(struct drm_framebuffer *fb, unsigned int rotation)
 {
 	struct drm_i915_gem_object *obj = intel_fb_obj(fb);
 	struct i915_ggtt_view view;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index ce78afefe3cd..e23eed797ffa 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1163,6 +1163,7 @@ void intel_release_load_detect_pipe(struct drm_connector *connector,
 				    struct drm_modeset_acquire_ctx *ctx);
 int intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
 			       unsigned int rotation);
+void intel_unpin_fb_obj(struct drm_framebuffer *fb, unsigned int rotation);
 struct drm_framebuffer *
 __intel_framebuffer_create(struct drm_device *dev,
 			   struct drm_mode_fb_cmd2 *mode_cmd,
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index af561542a5a1..1c3ad121f1b9 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -287,7 +287,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
 out_destroy_fbi:
 	drm_fb_helper_release_fbi(helper);
 out_unpin:
-	i915_gem_object_ggtt_unpin(obj);
+	intel_unpin_fb_obj(&ifbdev->fb->base, BIT(DRM_ROTATE_0));
 out_unlock:
 	mutex_unlock(&dev->struct_mutex);
 	return ret;
@@ -551,6 +551,11 @@ static void intel_fbdev_destroy(struct drm_device *dev,
 
 	if (ifbdev->fb) {
 		drm_framebuffer_unregister_private(&ifbdev->fb->base);
+
+		mutex_lock(&dev->struct_mutex);
+		intel_unpin_fb_obj(&ifbdev->fb->base, BIT(DRM_ROTATE_0));
+		mutex_unlock(&dev->struct_mutex);
+
 		drm_framebuffer_remove(&ifbdev->fb->base);
 	}
 }
-- 
2.8.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2016-04-28 18:35 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-28  8:56 [CI 01/25] drm/i915/fbdev: Call intel_unpin_fb_obj() on release Chris Wilson
2016-04-28  8:56 ` [CI 02/25] drm/i915/overlay: Replace i915_gem_obj_ggtt_offset() with the known flip_addr Chris Wilson
2016-04-28  8:56 ` [CI 03/25] io-mapping: Specify mapping size for io_mapping_map_wc() Chris Wilson
2016-04-28  8:56 ` [CI 04/25] drm/i915: Introduce i915_vm_to_ggtt() Chris Wilson
2016-04-28  8:56 ` [CI 05/25] drm/i915: Move ioremap_wc tracking onto VMA Chris Wilson
2016-04-28  8:56 ` [CI 06/25] drm/i915: Use i915_vma_pin_iomap on the ringbuffer object Chris Wilson
2016-04-28  8:56 ` [CI 07/25] drm/i915: Mark the current context as lost on suspend Chris Wilson
2016-04-28  8:56 ` [CI 08/25] drm/i915: L3 cache remapping is part of context switching Chris Wilson
2016-04-28  8:56 ` [CI 09/25] drm/i915: Consolidate L3 remapping LRI Chris Wilson
2016-04-28  8:56 ` [CI 10/25] drm/i915: Remove early l3-remap Chris Wilson
2016-04-28  8:56 ` [CI 11/25] drm/i915: Rearrange switch_context to load the aliasing ppgtt on first use Chris Wilson
2016-04-28  8:56 ` [CI 12/25] drm/i915: Unify intel_ring_begin() Chris Wilson
2016-04-28  8:56 ` [CI 13/25] drm/i915: Remove the identical implementations of request space reservation Chris Wilson
2016-04-28 14:02   ` Dave Gordon
2016-04-28 14:31     ` Chris Wilson
2016-04-28 14:51       ` Daniel Vetter
2016-04-28  8:56 ` [CI 14/25] drm/i915: Manually unwind after a failed request allocation Chris Wilson
2016-04-28 14:43   ` Dave Gordon
2016-04-28 14:55     ` Chris Wilson
2016-04-28  8:56 ` [CI 15/25] drm/i915: Preallocate enough space for the average request Chris Wilson
2016-04-28  8:56 ` [CI 16/25] drm/i915: Update execlists context descriptor format commentary Chris Wilson
2016-04-28  8:56 ` [CI 17/25] drm/i915: Assign every HW context a unique ID Chris Wilson
2016-04-28 14:55   ` Dave Gordon
2016-04-28 15:32     ` Chris Wilson
2016-04-28 18:08       ` Dave Gordon
2016-04-28 18:35         ` Chris Wilson
2016-04-28  8:56 ` [CI 18/25] drm/i915: Replace the pinned context address with its " Chris Wilson
2016-04-28 15:23   ` Dave Gordon
2016-04-28  8:56 ` [CI 19/25] drm/i915: Refactor execlists default context pinning Chris Wilson
2016-04-28  8:56 ` [CI 20/25] drm/i915: Move the magical deferred context allocation into the request Chris Wilson
2016-04-28  8:56 ` [CI 21/25] drm/i915: Move releasing of the GEM request from free to retire/cancel Chris Wilson
2016-04-28  8:56 ` [CI 22/25] drm/i915: Track the previous pinned context inside the request Chris Wilson
2016-04-28 18:15   ` Dave Gordon
2016-04-28 18:33     ` Chris Wilson
2016-04-28  8:56 ` [CI 23/25] drm/i915: Store LRC hardware id in " Chris Wilson
2016-04-28  8:56 ` [CI 24/25] drm/i915: Stop tracking execlists retired requests Chris Wilson
2016-04-28  8:56 ` [CI 25/25] drm/i915: Unify GPU resets upon shutdown Chris Wilson
2016-04-28 10:58 ` ✗ Fi.CI.BAT: failure for series starting with [CI,01/25] drm/i915/fbdev: Call intel_unpin_fb_obj() on release Patchwork
2016-04-28 11:21   ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox