diff options
author | Tvrtko Ursulin <[email protected]> | 2023-07-17 17:40:11 +0100 |
---|---|---|
committer | Tvrtko Ursulin <[email protected]> | 2023-07-19 11:28:25 +0100 |
commit | c188622225cec3cecfb276305e68a524578f4c9e (patch) | |
tree | da69657a0fd73d3d560d168009f8bb82aef823d1 | |
parent | c2307b7fc1c4dfff7c5e0d3b9ae8a403d1e7f370 (diff) |
drm/i915: Record default rps threshold values
Record the default values as preparation for exposing the sysfs controls.
Signed-off-by: Tvrtko Ursulin <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Reviewed-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_gt_types.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_rps.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_types.h b/drivers/gpu/drm/i915/gt/intel_gt_types.h index f08c2556aa25..1b22d7a50665 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_types.h +++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h @@ -83,6 +83,9 @@ enum intel_submission_method { struct gt_defaults { u32 min_freq; u32 max_freq; + + u8 rps_up_threshold; + u8 rps_down_threshold; }; enum intel_gt_type { diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c index 5c9a24aab38e..f33d44ad0876 100644 --- a/drivers/gpu/drm/i915/gt/intel_rps.c +++ b/drivers/gpu/drm/i915/gt/intel_rps.c @@ -2014,7 +2014,9 @@ void intel_rps_init(struct intel_rps *rps) /* Set default thresholds in % */ rps->power.up_threshold = 95; + rps_to_gt(rps)->defaults.rps_up_threshold = rps->power.up_threshold; rps->power.down_threshold = 85; + rps_to_gt(rps)->defaults.rps_down_threshold = rps->power.down_threshold; /* Finally allow us to boost to max by default */ rps->boost_freq = rps->max_freq; |