drm/i915/guc/slpc: Add a new SLPC selftest
authorVinay Belgaumkar <vinay.belgaumkar@intel.com>
Mon, 27 Jun 2022 23:03:46 +0000 (16:03 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Wed, 29 Jun 2022 20:50:23 +0000 (13:50 -0700)
commit79398d24da4c9294285bdedf67018ff09fe97bdc
tree435ced71cd5d11b8e654dcbfec9d7ee85d773c56
parenta06968563775181690125091f470a8655742dcbf
drm/i915/guc/slpc: Add a new SLPC selftest

This test will validate we can achieve actual frequency of RP0. Pcode
grants frequencies based on what GuC is requesting. However, thermal
throttling can limit what is being granted. Add a test to request for
max, but don't fail the test if RP0 is not granted due to throttle
reasons.

Also optimize the selftest by using a common run_test function to avoid
code duplication. Rename the "clamp" tests to vary_max_freq and
vary_min_freq.

v2: Fix compile warning
v3: Review comments (Ashutosh). Added a FIXME for the media RP0 case.
v4: Checkpatch (strict) fixes, remove FIXME and other comments (Ashutosh)

Fixes commit 8ee2c227822e ("drm/i915/guc/slpc: Add SLPC selftest")

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/20220627230346.27720-1-vinay.belgaumkar@intel.com
drivers/gpu/drm/i915/gt/selftest_slpc.c