drm/i915/mtl: Wake GT before sending H2G message
authorVinay Belgaumkar <vinay.belgaumkar@intel.com>
Fri, 19 Jan 2024 19:35:13 +0000 (11:35 -0800)
committerJohn Harrison <John.C.Harrison@Intel.com>
Wed, 24 Jan 2024 00:57:47 +0000 (16:57 -0800)
commit6d46d09a0d7dd412c5b76f74f89fe4448ba2117e
tree359bd07a260f00ac1eee4bb1e90bd52efbba4209
parentc44d4ef47fdad0a33966de89f9064e19736bb52f
drm/i915/mtl: Wake GT before sending H2G message

Instead of waiting until the interrupt reaches GuC, we can grab a
forcewake while triggering the H2G interrupt. GEN11_GUC_HOST_INTERRUPT
is inside sgunit and is not affected by forcewakes. However, there
could be some delays when platform is entering/exiting some higher
level platform sleep states and a H2G is triggered. A forcewake
ensures those sleep states have been fully exited and further
processing occurs as expected. The hysteresis timers for C6 and
higher sleep states will ensure there is no unwanted race between the
wake and processing of the interrupts by GuC.

This will have an official WA soon so adding a FIXME in the comments.

v2: Make the new ranges watertight to address BAT failures and update
commit message (Matt R).

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240119193513.221730-1-vinay.belgaumkar@intel.com
drivers/gpu/drm/i915/intel_uncore.c