public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Skip shrinking of fenced objects if Gfx is suspended
@ 2015-12-17  5:29 Praveen Paneri
  2015-12-17  7:25 ` Chris Wilson
  0 siblings, 1 reply; 18+ messages in thread
From: Praveen Paneri @ 2015-12-17  5:29 UTC (permalink / raw)
  To: intel-gfx; +Cc: Akash Goel, Praveen Paneri

When the system is running low on memory, gem shrinker is invoked.
In this process objects will be unbinded from GTT.
For tiled objects, access to fence registers could be required while
unbinding them. That requires a resume of gfx device, if suspended,
in the shrinker path. This intermediate resume could cause power
leakage.
To avoid this intermediate resume of gfx device, don't consider
tiled(fenced) objects for purge in the shrinker path.

Signed-off-by: Akash Goel <akash.goel@intel.com>
Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_shrinker.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c
index f7df54a..443432a 100644
--- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
@@ -129,6 +129,17 @@ i915_gem_shrink(struct drm_i915_private *dev_priv,
 			if ((flags & I915_SHRINK_ACTIVE) == 0 && obj->active)
 				continue;
 
+			/*
+			 * Skip the unbinding of objects, possessing a fence
+			 * register, if the device in the suspended state.
+			 * Otherwise device has to be resumed before an access
+			 * is made to the fence register on unbinding.
+			 */
+			if (HAS_RUNTIME_PM(dev_priv->dev) &&
+				dev_priv->pm.suspended &&
+				(obj->fence_reg != I915_FENCE_REG_NONE))
+				continue;
+
 			drm_gem_object_reference(&obj->base);
 
 			/* For the unbound phase, this should be a no-op! */
-- 
1.9.1

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

^ permalink raw reply related	[flat|nested] 18+ messages in thread
* [CI-RUN PATCH 0/2] ci-run of shrinker rpm fixes
@ 2016-04-13 13:54 Mika Kuoppala
  2016-04-13 13:54 ` [PATCH 2/2] drm/i915: Add rpm get/put in i915_shrinker_oom Mika Kuoppala
  0 siblings, 1 reply; 18+ messages in thread
From: Mika Kuoppala @ 2016-04-13 13:54 UTC (permalink / raw)
  To: intel-gfx



Praveen Paneri (2):
  drm/i915: Unbind objects in shrinker only if device is runtime active
  drm/i915: Add rpm get/put in i915_shrinker_oom

 drivers/gpu/drm/i915/i915_gem_shrinker.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

-- 
2.5.0

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

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

end of thread, other threads:[~2016-04-13 14:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-17  5:29 [PATCH] drm/i915: Skip shrinking of fenced objects if Gfx is suspended Praveen Paneri
2015-12-17  7:25 ` Chris Wilson
2015-12-24 10:46   ` [PATCH] drm/i915: Unbind objects in shrinker only if device is runtime active Praveen Paneri
2015-12-24 11:08     ` kbuild test robot
2015-12-24 12:22     ` Chris Wilson
2015-12-24 14:24       ` Goel, Akash
2015-12-24 14:32         ` Chris Wilson
2015-12-24 14:42           ` Goel, Akash
2015-12-24 14:48             ` Chris Wilson
2015-12-29  7:05               ` [PATCH 1/2] " Praveen Paneri
2015-12-29  7:05                 ` [PATCH 2/2] drm/i915: Add rpm get/put in i915_shrinker_oom Praveen Paneri
2015-12-29 11:58                   ` Chris Wilson
2016-01-05 10:16                     ` Daniel Vetter
2016-01-05 10:32                       ` Daniel Vetter
2015-12-29  8:19                 ` [PATCH 1/2] drm/i915: Unbind objects in shrinker only if device is runtime active kbuild test robot
2016-03-29  4:50                 ` [PATCH v2 " Praveen Paneri
  -- strict thread matches above, loose matches on Subject: below --
2016-04-13 13:54 [CI-RUN PATCH 0/2] ci-run of shrinker rpm fixes Mika Kuoppala
2016-04-13 13:54 ` [PATCH 2/2] drm/i915: Add rpm get/put in i915_shrinker_oom Mika Kuoppala
2016-04-13 14:01   ` Chris Wilson

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