[Intel-gfx] [PATCH v4 7/9] drm/i915: Drop redundant checks to update PSR state
Rodrigo Vivi
rodrigo.vivi at intel.com
Mon Mar 4 18:42:35 UTC 2019
On Fri, Mar 01, 2019 at 05:34:54PM -0800, José Roberto de Souza wrote:
> 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.
is it just redundant or does it really change the behaviour for PSR2
as needed?
code seems right, explanation here not so sure...
but if this is really right and I am missing something feel
free to use:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
otherwise please change the msg.
Thanks,
Rodrigo.
>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> ---
> drivers/gpu/drm/i915/intel_psr.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
> index 73453d89a841..d3e3996551c6 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -878,15 +878,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);
> --
> 2.21.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list