diff options
author | José Roberto de Souza <jose.souza@intel.com> | 2019-03-07 16:00:48 -0800 |
---|---|---|
committer | José Roberto de Souza <jose.souza@intel.com> | 2019-03-08 10:31:45 -0800 |
commit | 9f952664e38cb5261f38089527cab6ea53651f02 (patch) | |
tree | 8c91c1577ef91cd25c3d314e05506490549a2468 /drivers | |
parent | 618cf883becd756d519488db6b21ab7a60ce7f7c (diff) |
drm/i915: Drop redundant checks to update PSR state
All of this checks are redudant and can be removed as the if bellow
already takes care when there is no changes in the state.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190308000050.6226-7-jose.souza@intel.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/intel_psr.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index 25a0a77268a9..9847f6b0cd9a 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -880,15 +880,11 @@ void intel_psr_update(struct intel_dp *intel_dp, if (enable == psr->enabled && psr2_enable == psr->psr2_enabled) goto unlock; - if (psr->enabled) { - if (!enable || psr2_enable != psr->psr2_enabled) - intel_psr_disable_locked(intel_dp); - } + if (psr->enabled) + intel_psr_disable_locked(intel_dp); - if (enable) { - if (!psr->enabled || psr2_enable != psr->psr2_enabled) - intel_psr_enable_locked(dev_priv, crtc_state); - } + if (enable) + intel_psr_enable_locked(dev_priv, crtc_state); unlock: mutex_unlock(&dev_priv->psr.lock); |