All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: [Intel-gfx] [PATCH] drm/i915/gem: Lazily acquire the device wakeref for freeing objects
Date: Sun,  3 May 2020 18:15:13 +0100	[thread overview]
Message-ID: <20200503171513.18704-1-chris@chris-wilson.co.uk> (raw)

We only need the device wakeref on freeing the objects if we have to
unbind the object from the global GTT, or otherwise update device
information. If the objects are clean, we never need the wakeref, so
avoid taking until required.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_object.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915/gem/i915_gem_object.c
index 9d1d0131f7c2..99356c00c19e 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c
@@ -162,9 +162,7 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
 				    struct llist_node *freed)
 {
 	struct drm_i915_gem_object *obj, *on;
-	intel_wakeref_t wakeref;
 
-	wakeref = intel_runtime_pm_get(&i915->runtime_pm);
 	llist_for_each_entry_safe(obj, on, freed, freed) {
 		struct i915_mmap_offset *mmo, *mn;
 
@@ -224,7 +222,6 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
 		call_rcu(&obj->rcu, __i915_gem_free_object_rcu);
 		cond_resched();
 	}
-	intel_runtime_pm_put(&i915->runtime_pm, wakeref);
 }
 
 void i915_gem_flush_free_objects(struct drm_i915_private *i915)
-- 
2.20.1

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

             reply	other threads:[~2020-05-03 17:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03 17:15 Chris Wilson [this message]
2020-05-03 18:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gem: Lazily acquire the device wakeref for freeing objects (rev2) Patchwork
2020-05-04  7:44 ` [Intel-gfx] [PATCH] drm/i915/gem: Lazily acquire the device wakeref for freeing objects Janusz Krzysztofik
2020-05-04 10:40 ` [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/gem: Lazily acquire the device wakeref for freeing objects (rev2) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-04-24 15:24 [Intel-gfx] [PATCH] drm/i915/gem: Lazily acquire the device wakeref for freeing objects Chris Wilson
2020-04-24 16:01 ` Janusz Krzysztofik
2020-04-28  9:53 ` Janusz Krzysztofik
2020-04-28  9:55   ` Chris Wilson
2020-04-28 12:45 ` Janusz Krzysztofik
2020-04-28 12:59   ` Chris Wilson
2020-04-28 14:35     ` Janusz Krzysztofik
2020-04-28 14:48       ` Chris Wilson
2020-04-28 15:30         ` Janusz Krzysztofik

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=20200503171513.18704-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.