artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f48098
)
drm/i915/pmu: Check if pmu is closed before stopping event
author
jsg
<jsg@openbsd.org>
Fri, 3 Nov 2023 03:24:23 +0000
(
03:24
+0000)
committer
jsg
<jsg@openbsd.org>
Fri, 3 Nov 2023 03:24:23 +0000
(
03:24
+0000)
From Umesh Nerlige Ramappa
eded5f5261b8ff14417f9441934a1865b379b7db
in linux-6.1.y/6.1.61
4cbed7702eb775cca22fff6827a549092cb59f61
in mainline linux
sys/dev/pci/drm/i915/i915_pmu.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/i915/i915_pmu.c
b/sys/dev/pci/drm/i915/i915_pmu.c
index
41264e0
..
5b55f6a
100644
(file)
--- a/
sys/dev/pci/drm/i915/i915_pmu.c
+++ b/
sys/dev/pci/drm/i915/i915_pmu.c
@@
-760,9
+760,18
@@
static void i915_pmu_event_start(struct perf_event *event, int flags)
static void i915_pmu_event_stop(struct perf_event *event, int flags)
{
+ struct drm_i915_private *i915 =
+ container_of(event->pmu, typeof(*i915), pmu.base);
+ struct i915_pmu *pmu = &i915->pmu;
+
+ if (pmu->closed)
+ goto out;
+
if (flags & PERF_EF_UPDATE)
i915_pmu_event_read(event);
i915_pmu_disable(event);
+
+out:
event->hw.state = PERF_HES_STOPPED;
}