All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shankar, Uma" <uma.shankar@intel.com>
To: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/dp: For PCON TMDS mode set only the relavant bits in config DPCD
Date: Wed, 3 Nov 2021 11:24:17 +0000	[thread overview]
Message-ID: <0d1a3a2ae9b04722baa81f05be5f55d7@intel.com> (raw)
In-Reply-To: <20211029060154.110038-3-ankit.k.nautiyal@intel.com>



> -----Original Message-----
> From: Nautiyal, Ankit K <ankit.k.nautiyal@intel.com>
> Sent: Friday, October 29, 2021 11:32 AM
> To: intel-gfx@lists.freedesktop.org
> Cc: Sharma, Swati2 <swati2.sharma@intel.com>; Shankar, Uma
> <uma.shankar@intel.com>
> Subject: [PATCH 2/2] drm/i915/dp: For PCON TMDS mode set only the relavant bits
> in config DPCD
> 
> Currently we reset the whole PCON linkConfig DPCD to set the TMDS mode.
> This also resets the Source control bit and HDMI link enable bit and goes to
> autonomous mode of operation, which is seen to spoil the PCONs internal state.
> 
> This patch avoids resetting the PCON link config register and sets only TMDS mode
> bit, Source control bit in the configuration DPCD.
> It then enables the HDMI Link Enable bit.
> 
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 25 ++++++++++++++++++++++++-
>  1 file changed, 24 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> b/drivers/gpu/drm/i915/display/intel_dp.c
> index f5fd106e555c..3df35079580a 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2287,6 +2287,29 @@ static bool intel_dp_is_hdmi_2_1_sink(struct intel_dp
> *intel_dp)
>  	return false;
>  }
> 
> +static
> +int intel_dp_pcon_set_tmds_mode(struct intel_dp *intel_dp) {
> +	int ret;
> +	u8 buf = 0;
> +
> +	/* Set PCON source control mode and TMDS */
> +	buf |= DP_PCON_ENABLE_SOURCE_CTL_MODE;
> +	buf &= ~DP_PCON_ENABLE_MAX_FRL_BW;
> +

I don't see setting this to TMDS, we should be still in FRL mode as bit5 is not being reset here.
Am I missing something ?

Regards,
Uma Shankar
> +	ret = drm_dp_dpcd_writeb(&intel_dp->aux,
> DP_PCON_HDMI_LINK_CONFIG_1, buf);
> +	if (ret < 0)
> +		return ret;
> +
> +	/* Set HDMI LINK ENABLE */
> +	buf |= DP_PCON_ENABLE_HDMI_LINK;
> +	ret = drm_dp_dpcd_writeb(&intel_dp->aux,
> DP_PCON_HDMI_LINK_CONFIG_1, buf);
> +	if (ret < 0)
> +		return ret;
> +
> +	return 0;
> +}
> +
>  void intel_dp_check_frl_training(struct intel_dp *intel_dp)  {
>  	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); @@ -2305,7
> +2328,7 @@ void intel_dp_check_frl_training(struct intel_dp *intel_dp)
>  		int ret, mode;
> 
>  		drm_dbg(&dev_priv->drm, "Couldn't set FRL mode, continuing with
> TMDS mode\n");
> -		ret = drm_dp_pcon_reset_frl_config(&intel_dp->aux);
> +		ret = intel_dp_pcon_set_tmds_mode(intel_dp);
>  		mode = drm_dp_pcon_hdmi_link_mode(&intel_dp->aux, NULL);
> 
>  		if (ret < 0 || mode != DP_PCON_HDMI_MODE_TMDS)
> --
> 2.25.1


  reply	other threads:[~2021-11-03 11:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  6:01 [Intel-gfx] [PATCH 0/2] Some fixes in HDMI2.1 PCON FRL configuration Ankit Nautiyal
2021-10-29  6:01 ` [Intel-gfx] [PATCH 1/2] drm/i915/dp: Optimize the FRL configuration for HDMI2.1 PCON Ankit Nautiyal
2021-11-03 11:11   ` Shankar, Uma
2021-10-29  6:01 ` [Intel-gfx] [PATCH 2/2] drm/i915/dp: For PCON TMDS mode set only the relavant bits in config DPCD Ankit Nautiyal
2021-11-03 11:24   ` Shankar, Uma [this message]
2021-11-08  6:20     ` Nautiyal, Ankit K
2021-11-08  6:24   ` [Intel-gfx] [PATCH v2 " Ankit Nautiyal
2021-11-08  6:51     ` Shankar, Uma
2021-10-29  7:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success for Some fixes in HDMI2.1 PCON FRL configuration Patchwork
2021-10-29 12:29 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-11-08  7:22 ` [Intel-gfx] ✓ Fi.CI.BAT: success for Some fixes in HDMI2.1 PCON FRL configuration (rev2) Patchwork
2021-11-08  8:55 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-11-09 12:56   ` Nautiyal, Ankit K
2021-11-09 15:46     ` Vudum, Lakshminarayana
2021-11-09 15:41 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork

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=0d1a3a2ae9b04722baa81f05be5f55d7@intel.com \
    --to=uma.shankar@intel.com \
    --cc=ankit.k.nautiyal@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.