]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/pmu: Don't grab wakeref when enabling events
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 14 Dec 2020 09:43:47 +0000 (09:43 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 14 Dec 2020 12:55:43 +0000 (12:55 +0000)
commitad0b98fc22730de80ce5af97a9fcfd00ae17445a
tree9a33eb841fb7d6c0b8c21b73ebbe5f1188c7fa39
parentd585c69a14c829b023d5c15623c8fcc02bc08c76
drm/i915/pmu: Don't grab wakeref when enabling events

Chris found a CI report which points out calling intel_runtime_pm_get from
inside i915_pmu_enable hook is not allowed since it can be invoked from
hard irq context. This is something we knew but forgot, so lets fix it
once again.

We do this by syncing the internal book keeping with hardware rc6 counter
on driver load.

v2:
 * Always sync on parking and fully sync on init.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: 4b07cbb42d99 ("drm/i915/pmu: Correct the rc6 offset upon enabling")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20201214094349.3563876-1-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_pmu.c