[Intel-gfx] [PATCH 1/2] drm/i915: Check if PSR is globally enabled before change PSR variables
Souza, Jose
jose.souza at intel.com
Tue Dec 4 01:09:08 UTC 2018
On Mon, 2018-12-03 at 16:58 -0800, Dhinakaran Pandiyan wrote:
> On Thu, 2018-11-29 at 18:31 -0800, José Roberto de Souza wrote:
> > There is no issues changing the PSR variables even if PSR will be
> > not
> > enabled but it avoid having misleading values like have
> > psr2_enabled
> > set but enabled unset.
> >
> > Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> > Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_psr.c | 11 ++++++-----
> > 1 file changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_psr.c
> > b/drivers/gpu/drm/i915/intel_psr.c
> > index 2084784f320d..827b8c31783d 100644
> > --- a/drivers/gpu/drm/i915/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/intel_psr.c
> > @@ -716,14 +716,15 @@ void intel_psr_enable(struct intel_dp
> > *intel_dp,
> > goto unlock;
> > }
> >
> > + if (!psr_global_enabled(dev_priv->psr.debug)) {
> > + DRM_DEBUG_KMS("PSR disabled by flag\n");
> > + goto unlock;
> > + }
> > +
> > dev_priv->psr.psr2_enabled = intel_psr2_enabled(dev_priv,
> > crtc_state);
> > dev_priv->psr.busy_frontbuffer_bits = 0;
> > dev_priv->psr.prepared = true;
> .prepared needs to be set even when psr_global_enabled() returns
> false.
> This is so that we can enable PSR via debugfs later.
Oh that is right =/
Well so we can squash this patch with the next one.
>
> > -
> > - if (psr_global_enabled(dev_priv->psr.debug))
> > - intel_psr_enable_locked(dev_priv, crtc_state);
> > - else
> > - DRM_DEBUG_KMS("PSR disabled by flag\n");
> > + intel_psr_enable_locked(dev_priv, crtc_state);
> >
> > unlock:
> > mutex_unlock(&dev_priv->psr.lock);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20181204/1aa40f18/attachment.sig>
More information about the Intel-gfx
mailing list