summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_pmu.h
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2020-10-20 11:08:21 +0100
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2020-10-22 10:06:29 +0100
commitb00bccb3f0bb7e99052791eeffb3e2cfcfa1ae8e (patch)
tree7b4fec62bde163f4662a3e6b433fdad2dac3260e /drivers/gpu/drm/i915/i915_pmu.h
parent44c2200afcd59f441b43f27829b4003397cc495d (diff)
drm/i915/pmu: Handle PCI unbind
Mark the device as closed and keep references to driver data alive to allow for safe driver unbind with active PMU clients. Perf core does not otherwise handle this case so we have to do it manually like this. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20201020100822.543332-1-tvrtko.ursulin@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_pmu.h')
-rw-r--r--drivers/gpu/drm/i915/i915_pmu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_pmu.h b/drivers/gpu/drm/i915/i915_pmu.h
index 941f0c14037c..59a0d19afb67 100644
--- a/drivers/gpu/drm/i915/i915_pmu.h
+++ b/drivers/gpu/drm/i915/i915_pmu.h
@@ -50,6 +50,10 @@ struct i915_pmu {
*/
struct pmu base;
/**
+ * @closed: i915 is unregistering.
+ */
+ bool closed;
+ /**
* @name: Name as registered with perf core.
*/
const char *name;