]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/pmu: Don't grab wakeref when enabling events
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 18 Jan 2021 10:07:24 +0000 (10:07 +0000)
committerJani Nikula <jani.nikula@intel.com>
Mon, 18 Jan 2021 10:25:05 +0000 (12:25 +0200)
commit2d7bd5d1cb5fb0a3f674d07f2e2992cc46543d11
tree55151fff663a2dfee2ec19c9f6fa6fd0f2caeafe
parentdae2c55e9c01503cdf28dbdabcf540ad0a93c83f
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: a1ba95c9c70e ("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
(cherry picked from commit dbe13ae1d6abaab417edf3c37601c6a56594a4cd)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210118100724.465555-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_pmu.c