Message ID | 20210204064842.11595-2-ankit.k.nautiyal@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | HDMI2.1 PCON Misc Fixes | expand |
On Thu, Feb 04, 2021 at 12:18:40PM +0530, Ankit Nautiyal wrote: > DP-HDMI2.1 PCON has DSC encoder caps defined in registers 0x92-0x9E. > Do not read the registers if DPCD rev < 1.4. > > Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/2868 > Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> > --- > drivers/gpu/drm/i915/display/intel_dp.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c > index 8c12d5375607..2b83f0f433a2 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.c > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > @@ -2489,9 +2489,11 @@ static void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp) > struct drm_i915_private *i915 = dp_to_i915(intel_dp); > > /* Clear the cached register set to avoid using stale values */ > - > memset(intel_dp->pcon_dsc_dpcd, 0, sizeof(intel_dp->pcon_dsc_dpcd)); > > + if (intel_dp->dpcd[DP_DPCD_REV] < 0x14) > + return; > + Can't check the spec, but makes sense that this stuff is only valid for recent DCPD revisions. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > if (drm_dp_dpcd_read(&intel_dp->aux, DP_PCON_DSC_ENCODER, > intel_dp->pcon_dsc_dpcd, > sizeof(intel_dp->pcon_dsc_dpcd)) < 0) > -- > 2.29.2
On Fri, Feb 05, 2021 at 12:07:41PM -0800, Navare, Manasi wrote: > On Fri, Feb 05, 2021 at 09:58:07PM +0200, Ville Syrjälä wrote: > > On Thu, Feb 04, 2021 at 12:18:40PM +0530, Ankit Nautiyal wrote: > > > DP-HDMI2.1 PCON has DSC encoder caps defined in registers 0x92-0x9E. > > > Do not read the registers if DPCD rev < 1.4. > > > > > > Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/2868 > > > Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> > > > --- > > > drivers/gpu/drm/i915/display/intel_dp.c | 4 +++- > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c > > > index 8c12d5375607..2b83f0f433a2 100644 > > > --- a/drivers/gpu/drm/i915/display/intel_dp.c > > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > > > @@ -2489,9 +2489,11 @@ static void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp) > > > struct drm_i915_private *i915 = dp_to_i915(intel_dp); > > > > > > /* Clear the cached register set to avoid using stale values */ > > > - > > > memset(intel_dp->pcon_dsc_dpcd, 0, sizeof(intel_dp->pcon_dsc_dpcd)); > > > > > > + if (intel_dp->dpcd[DP_DPCD_REV] < 0x14) > > > + return; > > > + > > > > Can't check the spec, but makes sense that this stuff is only valid > > for recent DCPD revisions. > > > > Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Yes checked the DP 1.4 spec and this is correct I didn't think this is in the DP spec, but rather some special extra spec which I do not have. > > Reviewed-by: Manasi Navare <manasi.d.navare@intel.com> > > Manasi > > > > > > if (drm_dp_dpcd_read(&intel_dp->aux, DP_PCON_DSC_ENCODER, > > > intel_dp->pcon_dsc_dpcd, > > > sizeof(intel_dp->pcon_dsc_dpcd)) < 0) > > > -- > > > 2.29.2 > > > > -- > > Ville Syrjälä > > Intel > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Fri, Feb 05, 2021 at 09:58:07PM +0200, Ville Syrjälä wrote: > On Thu, Feb 04, 2021 at 12:18:40PM +0530, Ankit Nautiyal wrote: > > DP-HDMI2.1 PCON has DSC encoder caps defined in registers 0x92-0x9E. > > Do not read the registers if DPCD rev < 1.4. > > > > Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/2868 > > Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> > > --- > > drivers/gpu/drm/i915/display/intel_dp.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c > > index 8c12d5375607..2b83f0f433a2 100644 > > --- a/drivers/gpu/drm/i915/display/intel_dp.c > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > > @@ -2489,9 +2489,11 @@ static void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp) > > struct drm_i915_private *i915 = dp_to_i915(intel_dp); > > > > /* Clear the cached register set to avoid using stale values */ > > - > > memset(intel_dp->pcon_dsc_dpcd, 0, sizeof(intel_dp->pcon_dsc_dpcd)); > > > > + if (intel_dp->dpcd[DP_DPCD_REV] < 0x14) > > + return; > > + > > Can't check the spec, but makes sense that this stuff is only valid > for recent DCPD revisions. > > Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Yes checked the DP 1.4 spec and this is correct Reviewed-by: Manasi Navare <manasi.d.navare@intel.com> Manasi > > > if (drm_dp_dpcd_read(&intel_dp->aux, DP_PCON_DSC_ENCODER, > > intel_dp->pcon_dsc_dpcd, > > sizeof(intel_dp->pcon_dsc_dpcd)) < 0) > > -- > > 2.29.2 > > -- > Ville Syrjälä > Intel > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Fri, Feb 05, 2021 at 10:06:48PM +0200, Ville Syrjälä wrote: > On Fri, Feb 05, 2021 at 12:07:41PM -0800, Navare, Manasi wrote: > > On Fri, Feb 05, 2021 at 09:58:07PM +0200, Ville Syrjälä wrote: > > > On Thu, Feb 04, 2021 at 12:18:40PM +0530, Ankit Nautiyal wrote: > > > > DP-HDMI2.1 PCON has DSC encoder caps defined in registers 0x92-0x9E. > > > > Do not read the registers if DPCD rev < 1.4. > > > > > > > > Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/2868 > > > > Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> > > > > --- > > > > drivers/gpu/drm/i915/display/intel_dp.c | 4 +++- > > > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c > > > > index 8c12d5375607..2b83f0f433a2 100644 > > > > --- a/drivers/gpu/drm/i915/display/intel_dp.c > > > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > > > > @@ -2489,9 +2489,11 @@ static void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp) > > > > struct drm_i915_private *i915 = dp_to_i915(intel_dp); > > > > > > > > /* Clear the cached register set to avoid using stale values */ > > > > - > > > > memset(intel_dp->pcon_dsc_dpcd, 0, sizeof(intel_dp->pcon_dsc_dpcd)); > > > > > > > > + if (intel_dp->dpcd[DP_DPCD_REV] < 0x14) > > > > + return; > > > > + > > > > > > Can't check the spec, but makes sense that this stuff is only valid > > > for recent DCPD revisions. > > > > > > Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > Yes checked the DP 1.4 spec and this is correct > > I didn't think this is in the DP spec, but rather some special extra > spec which I do not have. Yes I meant just double checked that the DSC support itself from DP 1.4 and hence makes sense that the PCON DSC regs also from >= 1.4 Manasi > > > > > Reviewed-by: Manasi Navare <manasi.d.navare@intel.com> > > > > Manasi > > > > > > > > > if (drm_dp_dpcd_read(&intel_dp->aux, DP_PCON_DSC_ENCODER, > > > > intel_dp->pcon_dsc_dpcd, > > > > sizeof(intel_dp->pcon_dsc_dpcd)) < 0) > > > > -- > > > > 2.29.2 > > > > > > -- > > > Ville Syrjälä > > > Intel > > > _______________________________________________ > > > Intel-gfx mailing list > > > Intel-gfx@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- > Ville Syrjälä > Intel
On Thu, 04 Feb 2021, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote: > DP-HDMI2.1 PCON has DSC encoder caps defined in registers 0x92-0x9E. > Do not read the registers if DPCD rev < 1.4. > > Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/2868 Please use Fixes: to reference commits that this patch fixes. Please use Closes: to reference issues that this patch fixes. No need to resend for this, can be fixed while applying, but please tell me the commit that introduced the problem. BR, Jani. > Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> > --- > drivers/gpu/drm/i915/display/intel_dp.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c > index 8c12d5375607..2b83f0f433a2 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.c > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > @@ -2489,9 +2489,11 @@ static void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp) > struct drm_i915_private *i915 = dp_to_i915(intel_dp); > > /* Clear the cached register set to avoid using stale values */ > - > memset(intel_dp->pcon_dsc_dpcd, 0, sizeof(intel_dp->pcon_dsc_dpcd)); > > + if (intel_dp->dpcd[DP_DPCD_REV] < 0x14) > + return; > + > if (drm_dp_dpcd_read(&intel_dp->aux, DP_PCON_DSC_ENCODER, > intel_dp->pcon_dsc_dpcd, > sizeof(intel_dp->pcon_dsc_dpcd)) < 0)
On 2/8/2021 4:45 PM, Jani Nikula wrote: > On Thu, 04 Feb 2021, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote: >> DP-HDMI2.1 PCON has DSC encoder caps defined in registers 0x92-0x9E. >> Do not read the registers if DPCD rev < 1.4. >> >> Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/2868 > Please use Fixes: to reference commits that this patch fixes. > > Please use Closes: to reference issues that this patch fixes. > > No need to resend for this, can be fixed while applying, but please tell > me the commit that introduced the problem. > > BR, > Jani. > Alright will take care. Please find below the commit that introduced this: b9d96dacdc3d983eae234b52401edb56dbceb764 Patch : drm/i915: Read DSC capabilities of the HDMI2.1 PCON encoder https://patchwork.freedesktop.org/patch/408779/ Thanks & Regards, Ankit >> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> >> --- >> drivers/gpu/drm/i915/display/intel_dp.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c >> index 8c12d5375607..2b83f0f433a2 100644 >> --- a/drivers/gpu/drm/i915/display/intel_dp.c >> +++ b/drivers/gpu/drm/i915/display/intel_dp.c >> @@ -2489,9 +2489,11 @@ static void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp) >> struct drm_i915_private *i915 = dp_to_i915(intel_dp); >> >> /* Clear the cached register set to avoid using stale values */ >> - >> memset(intel_dp->pcon_dsc_dpcd, 0, sizeof(intel_dp->pcon_dsc_dpcd)); >> >> + if (intel_dp->dpcd[DP_DPCD_REV] < 0x14) >> + return; >> + >> if (drm_dp_dpcd_read(&intel_dp->aux, DP_PCON_DSC_ENCODER, >> intel_dp->pcon_dsc_dpcd, >> sizeof(intel_dp->pcon_dsc_dpcd)) < 0)
As I realized, this patch is mixing DPCD rev and DP version, need an appropriate check instead. As for the gitlab issue https://gitlab.freedesktop.org/drm/intel/-/issues/2868 this seems to be not due to a DPCD register not defined for an older sink. The DPCD read in that case should have been 0, instead of timeout. I will drop this patch for now, from the series and revisit it later. Thanks & Regards, Ankit On 2/8/2021 5:14 PM, Nautiyal, Ankit K wrote: > > On 2/8/2021 4:45 PM, Jani Nikula wrote: >> On Thu, 04 Feb 2021, Ankit Nautiyal <ankit.k.nautiyal@intel.com> wrote: >>> DP-HDMI2.1 PCON has DSC encoder caps defined in registers 0x92-0x9E. >>> Do not read the registers if DPCD rev < 1.4. >>> >>> Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/2868 >> Please use Fixes: to reference commits that this patch fixes. >> >> Please use Closes: to reference issues that this patch fixes. >> >> No need to resend for this, can be fixed while applying, but please tell >> me the commit that introduced the problem. >> >> BR, >> Jani. >> > Alright will take care. Please find below the commit that introduced > this: > > b9d96dacdc3d983eae234b52401edb56dbceb764 > > Patch : drm/i915: Read DSC capabilities of the HDMI2.1 PCON encoder > https://patchwork.freedesktop.org/patch/408779/ > > > Thanks & Regards, > > Ankit > >>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> >>> --- >>> drivers/gpu/drm/i915/display/intel_dp.c | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c >>> b/drivers/gpu/drm/i915/display/intel_dp.c >>> index 8c12d5375607..2b83f0f433a2 100644 >>> --- a/drivers/gpu/drm/i915/display/intel_dp.c >>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c >>> @@ -2489,9 +2489,11 @@ static void intel_dp_get_pcon_dsc_cap(struct >>> intel_dp *intel_dp) >>> struct drm_i915_private *i915 = dp_to_i915(intel_dp); >>> /* Clear the cached register set to avoid using stale values */ >>> - >>> memset(intel_dp->pcon_dsc_dpcd, 0, >>> sizeof(intel_dp->pcon_dsc_dpcd)); >>> + if (intel_dp->dpcd[DP_DPCD_REV] < 0x14) >>> + return; >>> + >>> if (drm_dp_dpcd_read(&intel_dp->aux, DP_PCON_DSC_ENCODER, >>> intel_dp->pcon_dsc_dpcd, >>> sizeof(intel_dp->pcon_dsc_dpcd)) < 0)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 8c12d5375607..2b83f0f433a2 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -2489,9 +2489,11 @@ static void intel_dp_get_pcon_dsc_cap(struct intel_dp *intel_dp) struct drm_i915_private *i915 = dp_to_i915(intel_dp); /* Clear the cached register set to avoid using stale values */ - memset(intel_dp->pcon_dsc_dpcd, 0, sizeof(intel_dp->pcon_dsc_dpcd)); + if (intel_dp->dpcd[DP_DPCD_REV] < 0x14) + return; + if (drm_dp_dpcd_read(&intel_dp->aux, DP_PCON_DSC_ENCODER, intel_dp->pcon_dsc_dpcd, sizeof(intel_dp->pcon_dsc_dpcd)) < 0)
DP-HDMI2.1 PCON has DSC encoder caps defined in registers 0x92-0x9E. Do not read the registers if DPCD rev < 1.4. Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/2868 Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> --- drivers/gpu/drm/i915/display/intel_dp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)