drm/xe/xe_pmu: Acquire forcewake on event init for engine events
authorRiana Tauro <riana.tauro@intel.com>
Mon, 24 Feb 2025 05:39:02 +0000 (11:09 +0530)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 24 Feb 2025 21:24:32 +0000 (13:24 -0800)
commitc7f2b8bfca78be8880af3ae4b6719767d4832d92
tree73259222e8f675ac5c3393b80840291a3a3691fd
parent6978c5f5a64d4bdd6b00214368d5fe59f56e9890
drm/xe/xe_pmu: Acquire forcewake on event init for engine events

When the engine events are created, acquire GT forcewake to read gpm
timestamp required for the events and release on event destroy. This
cannot be done during read due to the raw spinlock held my pmu.

v2: remove forcewake counting (Umesh)
v3: remove extra space (Umesh)
v4: use event pmu private data (Lucas)
    free local copy (Umesh)

Signed-off-by: Riana Tauro <riana.tauro@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250224053903.2253539-6-riana.tauro@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_pmu.c