drm/i915/guc/slpc: Update boost sysfs hooks for SLPC
authorVinay Belgaumkar <vinay.belgaumkar@intel.com>
Tue, 2 Nov 2021 01:26:08 +0000 (18:26 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Thu, 4 Nov 2021 00:44:13 +0000 (17:44 -0700)
commit1448d5c47e6a26150d885bb4a5764a8d75b9c707
treef73b20d102cf90a713cfcf763d26b8f2b3d2008e
parent493043feed006f75f43a1990ae2ae1178f277628
drm/i915/guc/slpc: Update boost sysfs hooks for SLPC

Add a helper to sort through the SLPC/RPS paths of get/set methods.
Boost frequency will be modified as long as it is within the constraints
of RP0 and if it is different from the existing one. We will set min
freq to boost only if there is at least one active waiter.

v2: Add num_boosts to guc_slpc_info and changes for worker function
v3: Review comments (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-4-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_sysfs.c