drm/xe/eustall: Store forcewake reference in stream structure
authorMatt Roper <matthew.d.roper@intel.com>
Mon, 10 Nov 2025 23:20:20 +0000 (15:20 -0800)
committerMatt Roper <matthew.d.roper@intel.com>
Thu, 13 Nov 2025 22:05:32 +0000 (14:05 -0800)
commit9de2606f4a795ac7d62c1d0877e65caf32fb67cd
tree67aa0e8eb41dd6c9505ed33be793ee25d8950619
parentdefdf272844639649a0bdc1729d164eb8c9ca812
drm/xe/eustall: Store forcewake reference in stream structure

Calls to xe_force_wake_put() should generally pass the exact reference
returned by xe_force_wake_get().  Since EU stall grabs and releases
forcewake in different functions, xe_eu_stall_disable_locked() is
currently calling put with a hardcoded RENDER domain.  Although this
works for now, it's somewhat fragile in case the power domain(s)
required by stall sampling change in the future, or if workarounds show
up that require us to obtain additional domains.

Stash the original reference obtained during stream enable inside the
stream structure so that we can use it directly when the stream is
disabled.

Cc: Harish Chegondi <harish.chegondi@intel.com>
Reviewed-by: Harish Chegondi <harish.chegondi@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20251110232017.1475869-34-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/xe/xe_eu_stall.c