All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>,
	"Murthy, Arun R" <arun.r.murthy@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/dp: Fix LT debug print in SDP CRC enable
Date: Mon, 31 Jul 2023 14:35:46 +0300	[thread overview]
Message-ID: <871qgoxqi5.fsf@intel.com> (raw)
In-Reply-To: <SJ1PR11MB6129F386F8578FF3CA08ACDEB905A@SJ1PR11MB6129.namprd11.prod.outlook.com>

On Mon, 31 Jul 2023, "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com> wrote:
> Hello Arun,
>
>> -----Original Message-----
>> From: Murthy, Arun R <arun.r.murthy@intel.com>
>> Sent: Monday, July 31, 2023 11:25 AM
>> To: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>
>> Cc: intel-gfx@lists.freedesktop.org
>> Subject: RE: [Intel-gfx] [PATCH] drm/i915/dp: Fix LT debug print in SDP CRC
>> enable
>> 
>> > -----Original Message-----
>> > From: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>
>> > Sent: Friday, July 28, 2023 2:48 PM
>> > To: Murthy, Arun R <arun.r.murthy@intel.com>
>> > Cc: intel-gfx@lists.freedesktop.org
>> > Subject: RE: [Intel-gfx] [PATCH] drm/i915/dp: Fix LT debug print in
>> > SDP CRC enable
>> >
>> > Hello Arun,
>> >
>> > > -----Original Message-----
>> > > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf
>> > > Of Arun R Murthy
>> > > Sent: Friday, July 14, 2023 11:08 AM
>> > > To: intel-gfx@lists.freedesktop.org
>> > > Subject: [Intel-gfx] [PATCH] drm/i915/dp: Fix LT debug print in SDP
>> > > CRC enable
>> > >
>> > > The debug print for enabling SDP CRC16 is applicable only for DP2.0,
>> >
>> > DP2.0 and UHBR?
>> 
>> This is a DP2.0 feature that can be enabled on UHBR rates.
>> 
>> >
>> > >but this
>> > > debug print was not within the uhbr check and was always printed.
>> > > Fis this by adding proper checks and returning.
>> >
>> > Typo.
>> >
>> > >
>> > > Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
>> > > ---
>> > >  .../gpu/drm/i915/display/intel_dp_link_training.c    | 12 +++++++-----
>> > >  1 file changed, 7 insertions(+), 5 deletions(-)
>> > >
>> > > diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
>> > > b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
>> > > index a263773f4d68..4485ef4f8ec6 100644
>> > > --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
>> > > +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
>> > > @@ -1390,11 +1390,13 @@ void intel_dp_128b132b_sdp_crc16(struct
>> > > intel_dp *intel_dp,
>> > >  	 * Default value of bit 31 is '0' hence discarding the write
>> > >  	 * TODO: Corrective actions on SDP corruption yet to be defined
>> > >  	 */
>> > > -	if (intel_dp_is_uhbr(crtc_state))
>> > > -		/* DP v2.0 SCR on SDP CRC16 for 128b/132b Link Layer */
>> > > -		drm_dp_dpcd_writeb(&intel_dp->aux,
>> > > -
>> > > DP_SDP_ERROR_DETECTION_CONFIGURATION,
>> > > -				   DP_SDP_CRC16_128B132B_EN);
>> > > +	if (!intel_dp_is_uhbr(crtc_state))
>> > > +		return;
>> >
>> > I see that while calling this function in intel_ddi_pre_enable_dp(),
>> > we do have a check for for DP2.0
>> >
>> > if (HAS_DP20(dev_priv))
>> > 		intel_dp_128b132b_sdp_crc16(enc_to_intel_dp(encoder),
>> > 					    crtc_state);
>> >
>> > Should this check be added within the function too for the sake of
>> > completion?
>> >
>> 
>> HAS DP20 just checked for the display version number and not UHBR rates.
>> We need to check for UHBR rates and then enable this CRC.
>> 
>
> I was alluding more to the fact that there are two conditions for enabling the CRC.
>
> 	if (!HAS_DP20(dev_priv) || !intel_dp_is_uhbr(crtc_state))
> 		return;
>
> But if it is implicit that UHBR will only be supported on DP2.0 or/and this function is not
> expected to be used anywhere else (and hence without any possibility of this function being
> called without the HAS_DP20() check), the change looks good to me.

HAS_DP20() should be used as little as possible, basically for platform
DP 2.0 support only. In most cases it's UHBR we want to check, and that
implies DP 2.0 and 128b/132b.

This function is also fine to be called *without* the HAS_DP20() check,
and IMO that should just be removed. The crtc state simply can't have a
UHBR rate unless HAS_DP20() is true.


BR,
Jani.


>
> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
>
> Regards
>
> Chaitanya
>
>
>> Thanks and Regards,
>> Arun R Murthy
>> -------------------
>> 
>> > Regards
>> >
>> > Chaitanya
>> >
>> > > +
>> > > +	/* DP v2.0 SCR on SDP CRC16 for 128b/132b Link Layer */
>> > > +	drm_dp_dpcd_writeb(&intel_dp->aux,
>> > > +			   DP_SDP_ERROR_DETECTION_CONFIGURATION,
>> > > +			   DP_SDP_CRC16_128B132B_EN);
>> > >
>> > >  	lt_dbg(intel_dp, DP_PHY_DPRX, "DP2.0 SDP CRC16 for 128b/132b
>> > > enabled\n");  }
>> > > --
>> > > 2.25.1
>

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-07-31 11:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14  5:37 [Intel-gfx] [PATCH] drm/i915/dp: Fix LT debug print in SDP CRC enable Arun R Murthy
2023-07-14  6:35 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-07-14  9:26 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-07-26  5:38 ` [Intel-gfx] [PATCH] " Murthy, Arun R
2023-07-28  9:18 ` Borah, Chaitanya Kumar
2023-07-31  5:55   ` Murthy, Arun R
2023-07-31  9:46     ` Borah, Chaitanya Kumar
2023-07-31 11:35       ` Jani Nikula [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-08-08  4:20 Arun R Murthy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qgoxqi5.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.