Message ID | 20180511195145.3829-1-dhinakaran.pandiyan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, May 11, 2018 at 12:51:40PM -0700, Dhinakaran Pandiyan wrote: > Ville noticed that we are unncessarily reading DPCD's after knowing > panel did not support PSR. Looks like this check that was present > earlier got removed unintentionally, let's put it back. > > While we do this, add the PSR version number in the debug print. > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> > --- > drivers/gpu/drm/i915/intel_psr.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c > index db27f2faa1de..8fe6d2f9ab2b 100644 > --- a/drivers/gpu/drm/i915/intel_psr.c > +++ b/drivers/gpu/drm/i915/intel_psr.c > @@ -250,10 +250,12 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) > drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT, intel_dp->psr_dpcd, > sizeof(intel_dp->psr_dpcd)); > > - if (intel_dp->psr_dpcd[0]) { > - dev_priv->psr.sink_support = true; > - DRM_DEBUG_KMS("Detected EDP PSR Panel.\n"); > - } > + if (!intel_dp->psr_dpcd[0]) > + return; > + > + DRM_DEBUG_KMS("eDP panel supports PSR version %x\n", > + intel_dp->psr_dpcd[0]); > + dev_priv->psr.sink_support = true; > > if (INTEL_GEN(dev_priv) >= 9 && > (intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_IS_SUPPORTED)) { > @@ -270,8 +272,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) > */ > dev_priv->psr.sink_psr2_support = > intel_dp_get_y_coord_required(intel_dp); > - DRM_DEBUG_KMS("PSR2 %s on sink", dev_priv->psr.sink_psr2_support > - ? "supported" : "not supported"); > + DRM_DEBUG_KMS("PSR2 %ssupported\n", > + dev_priv->psr.sink_psr2_support ? "" : "not "); Would it make sense to make it clearer that PSR2 is not supported b/c of lack of y-coordinate support on the sink ? Reviewed-by: Tarun Vyas <tarun.vyas@intel.com> > > if (dev_priv->psr.sink_psr2_support) { > dev_priv->psr.colorimetry_support = > -- > 2.14.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Thu, 2018-05-17 at 17:27 -0700, Tarun Vyas wrote: > On Fri, May 11, 2018 at 12:51:40PM -0700, Dhinakaran Pandiyan wrote: > > > > Ville noticed that we are unncessarily reading DPCD's after knowing > > panel did not support PSR. Looks like this check that was present > > earlier got removed unintentionally, let's put it back. > > > > While we do this, add the PSR version number in the debug print. > > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> > > --- > > drivers/gpu/drm/i915/intel_psr.c | 14 ++++++++------ > > 1 file changed, 8 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > b/drivers/gpu/drm/i915/intel_psr.c > > index db27f2faa1de..8fe6d2f9ab2b 100644 > > --- a/drivers/gpu/drm/i915/intel_psr.c > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > @@ -250,10 +250,12 @@ void intel_psr_init_dpcd(struct intel_dp > > *intel_dp) > > drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT, intel_dp- > > >psr_dpcd, > > sizeof(intel_dp->psr_dpcd)); > > > > - if (intel_dp->psr_dpcd[0]) { > > - dev_priv->psr.sink_support = true; > > - DRM_DEBUG_KMS("Detected EDP PSR Panel.\n"); > > - } > > + if (!intel_dp->psr_dpcd[0]) > > + return; > > + > > + DRM_DEBUG_KMS("eDP panel supports PSR version %x\n", > > + intel_dp->psr_dpcd[0]); > > + dev_priv->psr.sink_support = true; > > > > if (INTEL_GEN(dev_priv) >= 9 && > > (intel_dp->psr_dpcd[0] == > > DP_PSR2_WITH_Y_COORD_IS_SUPPORTED)) { > > @@ -270,8 +272,8 @@ void intel_psr_init_dpcd(struct intel_dp > > *intel_dp) > > */ > > dev_priv->psr.sink_psr2_support = > > intel_dp_get_y_coord_required(inte > > l_dp); > > - DRM_DEBUG_KMS("PSR2 %s on sink", dev_priv- > > >psr.sink_psr2_support > > - ? "supported" : "not supported"); > > + DRM_DEBUG_KMS("PSR2 %ssupported\n", > > + dev_priv->psr.sink_psr2_support ? "" > > : "not "); > Would it make sense to make it clearer that PSR2 is not supported b/c > of lack of y-coordinate support on the sink ? We could do something like dev_priv->psr.sink_psr2_support = y_req && alpm; DRM_DEBUG_KMS("PSR2 %ssupported ALPM %d Y-req %d\n", dev_priv->psr.sink_psr2_support ? "" : "not ", alpm, y_req); But this would need the code movement done in patch 6/6. > > Reviewed-by: Tarun Vyas <tarun.vyas@intel.com> > > > > > > if (dev_priv->psr.sink_psr2_support) { > > dev_priv->psr.colorimetry_support =
On 5/12/2018 1:21 AM, Dhinakaran Pandiyan wrote: > Ville noticed that we are unncessarily reading DPCD's after knowing > panel did not support PSR. Looks like this check that was present > earlier got removed unintentionally, let's put it back. > > While we do this, add the PSR version number in the debug print. > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> > --- > drivers/gpu/drm/i915/intel_psr.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) Reviewed-by: Vathsala Nagaraju <vathsala.nagaraju@intel.com> > > diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c > index db27f2faa1de..8fe6d2f9ab2b 100644 > --- a/drivers/gpu/drm/i915/intel_psr.c > +++ b/drivers/gpu/drm/i915/intel_psr.c > @@ -250,10 +250,12 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) > drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT, intel_dp->psr_dpcd, > sizeof(intel_dp->psr_dpcd)); > > - if (intel_dp->psr_dpcd[0]) { > - dev_priv->psr.sink_support = true; > - DRM_DEBUG_KMS("Detected EDP PSR Panel.\n"); > - } > + if (!intel_dp->psr_dpcd[0]) > + return; > + > + DRM_DEBUG_KMS("eDP panel supports PSR version %x\n", > + intel_dp->psr_dpcd[0]); > + dev_priv->psr.sink_support = true; > > if (INTEL_GEN(dev_priv) >= 9 && > (intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_IS_SUPPORTED)) { > @@ -270,8 +272,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) > */ > dev_priv->psr.sink_psr2_support = > intel_dp_get_y_coord_required(intel_dp); > - DRM_DEBUG_KMS("PSR2 %s on sink", dev_priv->psr.sink_psr2_support > - ? "supported" : "not supported"); > + DRM_DEBUG_KMS("PSR2 %ssupported\n", > + dev_priv->psr.sink_psr2_support ? "" : "not "); > > if (dev_priv->psr.sink_psr2_support) { > dev_priv->psr.colorimetry_support =
On Thu, 17 May 2018, Tarun Vyas <tarun.vyas@intel.com> wrote: > On Fri, May 11, 2018 at 12:51:40PM -0700, Dhinakaran Pandiyan wrote: >> Ville noticed that we are unncessarily reading DPCD's after knowing >> panel did not support PSR. Looks like this check that was present >> earlier got removed unintentionally, let's put it back. >> >> While we do this, add the PSR version number in the debug print. >> >> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> >> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> >> --- >> drivers/gpu/drm/i915/intel_psr.c | 14 ++++++++------ >> 1 file changed, 8 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c >> index db27f2faa1de..8fe6d2f9ab2b 100644 >> --- a/drivers/gpu/drm/i915/intel_psr.c >> +++ b/drivers/gpu/drm/i915/intel_psr.c >> @@ -250,10 +250,12 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) >> drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT, intel_dp->psr_dpcd, >> sizeof(intel_dp->psr_dpcd)); >> >> - if (intel_dp->psr_dpcd[0]) { >> - dev_priv->psr.sink_support = true; >> - DRM_DEBUG_KMS("Detected EDP PSR Panel.\n"); >> - } >> + if (!intel_dp->psr_dpcd[0]) >> + return; >> + >> + DRM_DEBUG_KMS("eDP panel supports PSR version %x\n", >> + intel_dp->psr_dpcd[0]); >> + dev_priv->psr.sink_support = true; >> >> if (INTEL_GEN(dev_priv) >= 9 && >> (intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_IS_SUPPORTED)) { >> @@ -270,8 +272,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) >> */ >> dev_priv->psr.sink_psr2_support = >> intel_dp_get_y_coord_required(intel_dp); >> - DRM_DEBUG_KMS("PSR2 %s on sink", dev_priv->psr.sink_psr2_support >> - ? "supported" : "not supported"); >> + DRM_DEBUG_KMS("PSR2 %ssupported\n", >> + dev_priv->psr.sink_psr2_support ? "" : "not "); > Would it make sense to make it clearer that PSR2 is not supported b/c of lack of y-coordinate support on the sink ? > > Reviewed-by: Tarun Vyas <tarun.vyas@intel.com> Pushed to dinq, thanks for the patch and review. BR, Jani. >> >> if (dev_priv->psr.sink_psr2_support) { >> dev_priv->psr.colorimetry_support = >> -- >> 2.14.1 >> >> _______________________________________________ >> Intel-gfx mailing list >> Intel-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index db27f2faa1de..8fe6d2f9ab2b 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -250,10 +250,12 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) drm_dp_dpcd_read(&intel_dp->aux, DP_PSR_SUPPORT, intel_dp->psr_dpcd, sizeof(intel_dp->psr_dpcd)); - if (intel_dp->psr_dpcd[0]) { - dev_priv->psr.sink_support = true; - DRM_DEBUG_KMS("Detected EDP PSR Panel.\n"); - } + if (!intel_dp->psr_dpcd[0]) + return; + + DRM_DEBUG_KMS("eDP panel supports PSR version %x\n", + intel_dp->psr_dpcd[0]); + dev_priv->psr.sink_support = true; if (INTEL_GEN(dev_priv) >= 9 && (intel_dp->psr_dpcd[0] == DP_PSR2_WITH_Y_COORD_IS_SUPPORTED)) { @@ -270,8 +272,8 @@ void intel_psr_init_dpcd(struct intel_dp *intel_dp) */ dev_priv->psr.sink_psr2_support = intel_dp_get_y_coord_required(intel_dp); - DRM_DEBUG_KMS("PSR2 %s on sink", dev_priv->psr.sink_psr2_support - ? "supported" : "not supported"); + DRM_DEBUG_KMS("PSR2 %ssupported\n", + dev_priv->psr.sink_psr2_support ? "" : "not "); if (dev_priv->psr.sink_psr2_support) { dev_priv->psr.colorimetry_support =
Ville noticed that we are unncessarily reading DPCD's after knowing panel did not support PSR. Looks like this check that was present earlier got removed unintentionally, let's put it back. While we do this, add the PSR version number in the debug print. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> --- drivers/gpu/drm/i915/intel_psr.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)