OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50b38bc
)
drm/i915: Pull assert_forcewake_active() underneath the lock
author
Chris Wilson
<chris@chris-wilson.co.uk>
Sun, 7 Jul 2019 15:11:35 +0000
(16:11 +0100)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Sun, 7 Jul 2019 15:43:32 +0000
(16:43 +0100)
Make no assumption that something in the background is not acquiring the
fw_domain -- but we still do not track owner so assume that any active
domain is intended by the caller.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20190707151135.11700-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_uncore.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/intel_uncore.c
b/drivers/gpu/drm/i915/intel_uncore.c
index
bb9e0da
..
5f0367f
100644
(file)
--- a/
drivers/gpu/drm/i915/intel_uncore.c
+++ b/
drivers/gpu/drm/i915/intel_uncore.c
@@
-747,6
+747,8
@@
void assert_forcewakes_active(struct intel_uncore *uncore,
if (!uncore->funcs.force_wake_get)
return;
+ spin_lock_irq(&uncore->lock);
+
assert_rpm_wakelock_held(uncore->rpm);
fw_domains &= uncore->fw_domains;
@@
-770,6
+772,8
@@
void assert_forcewakes_active(struct intel_uncore *uncore,
domain->id, actual))
break;
}
+
+ spin_unlock_irq(&uncore->lock);
}
/* We give fast paths for the really cool registers */