drm/i915/guc/slpc: Add get max/min freq hooks
authorVinay Belgaumkar <vinay.belgaumkar@intel.com>
Fri, 30 Jul 2021 20:21:13 +0000 (13:21 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Tue, 3 Aug 2021 23:05:34 +0000 (16:05 -0700)
commitc279bec18e97735aeb4ab2c931da778bb31f4f02
treef474f973c75f0b44a160c5587acdcd3db9b81fc1
parentd41f6f82d319ca0effae840553cac74425328ddf
drm/i915/guc/slpc: Add get max/min freq hooks

Add helpers to read the min/max frequency being used
by SLPC. This is done by send a H2G command which forces
SLPC to update the shared data struct which can then be
read. These helpers will be used in a sysfs patch later
on.

v2: Address review comments (Michal W)
v3: Return err in case of query failure (Michal W)
v4: Move decode_min/max_freq to this patch

Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Signed-off-by: Sundaresan Sujaritha <sujaritha.sundaresan@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210730202119.23810-9-vinay.belgaumkar@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h