[PATCH 2/2] wakeref-active
Chris Wilson
chris at chris-wilson.co.uk
Sat Apr 27 21:01:46 UTC 2019
---
drivers/gpu/drm/i915/intel_wakeref.c | 1 +
drivers/gpu/drm/i915/intel_wakeref.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_wakeref.c b/drivers/gpu/drm/i915/intel_wakeref.c
index 1f94bc4ff9e4..ec57086f44b8 100644
--- a/drivers/gpu/drm/i915/intel_wakeref.c
+++ b/drivers/gpu/drm/i915/intel_wakeref.c
@@ -58,4 +58,5 @@ void __intel_wakeref_init(struct intel_wakeref *wf, struct lock_class_key *key)
{
__mutex_init(&wf->mutex, "wakeref", key);
atomic_set(&wf->count, 0);
+ wf->wakeref = 0;
}
diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
index a979d638344b..db742291211c 100644
--- a/drivers/gpu/drm/i915/intel_wakeref.h
+++ b/drivers/gpu/drm/i915/intel_wakeref.h
@@ -127,7 +127,7 @@ intel_wakeref_unlock(struct intel_wakeref *wf)
static inline bool
intel_wakeref_active(struct intel_wakeref *wf)
{
- return atomic_read(&wf->count);
+ return READ_ONCE(wf->wakeref);
}
#endif /* INTEL_WAKEREF_H */
--
2.20.1
More information about the Intel-gfx-trybot
mailing list