diff options
author | Rodrigo Vivi <[email protected]> | 2022-09-02 05:51:25 -0400 |
---|---|---|
committer | Rodrigo Vivi <[email protected]> | 2022-09-06 16:34:40 -0400 |
commit | 68eb42b3f3b30df1a335b3139b21c32187c0efaa (patch) | |
tree | a0569ef34c849ce349c71fb16d83d5da0cbb320b | |
parent | 873fef8833ea794526b7f4179088e565078fe0e8 (diff) |
drm/i915: Don't try to disable host RPS when this was never enabled.
Specially in GT reset case this could be triggered and try
to disable things that had never been enabled. Let's add
some protection here.
Cc: Ashutosh Dixit <[email protected]>
Signed-off-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Ashutosh Dixit <[email protected]>
Acked-by: Nirmoy Das <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_rps.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c index 579ae9ac089c..6fadde4ee7bf 100644 --- a/drivers/gpu/drm/i915/gt/intel_rps.c +++ b/drivers/gpu/drm/i915/gt/intel_rps.c @@ -1551,6 +1551,9 @@ void intel_rps_disable(struct intel_rps *rps) { struct drm_i915_private *i915 = rps_to_i915(rps); + if (!intel_rps_is_enabled(rps)) + return; + intel_rps_clear_enabled(rps); intel_rps_clear_interrupts(rps); intel_rps_clear_timer(rps); |