Skip to content

Commit

Permalink
drm/i915: Record default rps threshold values
Browse files Browse the repository at this point in the history
Record the default values as preparation for exposing the sysfs controls.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@kernel.org>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230717164013.826614-2-tvrtko.ursulin@linux.intel.com
  • Loading branch information
Tvrtko Ursulin committed Jul 19, 2023
1 parent c2307b7 commit c188622
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/gt/intel_gt_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/gt/intel_rps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c188622

Please sign in to comment.