drm/i915/guc/slpc: Add waitboost functionality for SLPC
authorVinay Belgaumkar <vinay.belgaumkar@intel.com>
Tue, 2 Nov 2021 01:26:07 +0000 (18:26 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Thu, 4 Nov 2021 00:44:13 +0000 (17:44 -0700)
commit493043feed006f75f43a1990ae2ae1178f277628
treec172029d6ccd591887dbf7e5fc74627a919a36a5
parent292e4fb05f14d54c90cb165335c6d4dfaf1cfb32
drm/i915/guc/slpc: Add waitboost functionality for SLPC

Add helper in RPS code for handling SLPC and non-SLPC paths.
When boost is requested in the SLPC path, we can ask GuC to ramp
up the frequency req by setting the minimum frequency to boost freq.
Reset freq back to the min softlimit when there are no more waiters.

v2: Schedule a worker thread which can boost freq from within
an interrupt context as well.

v3: No need to check against requested freq before scheduling boost
work (Ashutosh)

Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211102012608.8609-3-vinay.belgaumkar@intel.com
drivers/gpu/drm/i915/gt/intel_rps.c
drivers/gpu/drm/i915/gt/intel_rps.h
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
drivers/gpu/drm/i915/i915_request.c