diff options
author | Ville Syrjälä <[email protected]> | 2022-02-14 11:18:09 +0200 |
---|---|---|
committer | Ville Syrjälä <[email protected]> | 2022-02-16 15:05:36 +0200 |
commit | a19c1d00b0d350fb7b75c6c4da91887f66114a7d (patch) | |
tree | 3a2ee5d2e52d885ccaac44b1da5ffc1340f1c9ae | |
parent | c0299cc9840b3805205173cc77782f317b78ea0e (diff) |
drm/i915: Unconfuse pre-icl vs. icl+ intel_sagv_{pre,post}_plane_update()
intel_sagv_{pre,post}_plane_update() can accidentally forget
to bail out early on pre-icl and proceed down the icl+ codepath
at the end of the function. Fortunately it'll bail out before
it gets too far due to old_qgv_mask==new_qgv_mask==0 so no real
bug here. But lets make the code less confusing anyway.
Cc: Stanislav Lisovskiy <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Stanislav Lisovskiy <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 191bb3966505..9f5e3c399f8d 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -3802,8 +3802,9 @@ void intel_sagv_pre_plane_update(struct intel_atomic_state *state) if (!new_bw_state) return; - if (DISPLAY_VER(dev_priv) < 11 && !intel_can_enable_sagv(dev_priv, new_bw_state)) { - intel_disable_sagv(dev_priv); + if (DISPLAY_VER(dev_priv) < 11) { + if (!intel_can_enable_sagv(dev_priv, new_bw_state)) + intel_disable_sagv(dev_priv); return; } @@ -3853,8 +3854,9 @@ void intel_sagv_post_plane_update(struct intel_atomic_state *state) if (!new_bw_state) return; - if (DISPLAY_VER(dev_priv) < 11 && intel_can_enable_sagv(dev_priv, new_bw_state)) { - intel_enable_sagv(dev_priv); + if (DISPLAY_VER(dev_priv) < 11) { + if (intel_can_enable_sagv(dev_priv, new_bw_state)) + intel_enable_sagv(dev_priv); return; } |