All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshuman Gupta <anshuman.gupta@intel.com>
To: Imre Deak <imre.deak@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: Extend hotplug detect retry on TypeC connectors to 5 seconds
Date: Wed, 1 Apr 2020 16:50:23 +0530	[thread overview]
Message-ID: <20200401112022.GF11633@intel.com> (raw)
In-Reply-To: <20200330095425.29113-2-imre.deak@intel.com>

On 2020-03-30 at 15:24:25 +0530, Imre Deak wrote:
> On TypeC ports if a sink deasserts/reasserts its HPD signal, generating
> a hotplug interrupt without the sink getting unplugged/replugged from
> the connector, there can be an up to 3 seconds delay until the AUX
> channel gets functional. To avoid detection failures this delay causes
> retry the detection for 5 seconds.
> 
> I noticed this on ICL/TGL RVPs and a DELL XPS 13 7390 ICL laptop.
> 
> References: https://gitlab.freedesktop.org/drm/intel/issues/1067
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 4f508bf70f3b..2d947ff83488 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -4371,7 +4371,10 @@ static enum intel_hotplug_state
>  intel_ddi_hotplug(struct intel_encoder *encoder,
>  		  struct intel_connector *connector)
>  {
> +	struct drm_i915_private *i915 = to_i915(encoder->base.dev);
>  	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
> +	enum phy phy = intel_port_to_phy(i915, encoder->port);
> +	bool is_tc = intel_phy_is_tc(i915, phy);
>  	struct drm_modeset_acquire_ctx ctx;
>  	enum intel_hotplug_state state;
>  	int ret;
> @@ -4414,8 +4417,15 @@ intel_ddi_hotplug(struct intel_encoder *encoder,
>  	 * valid EDID. To solve this schedule another detection cycle if this
>  	 * time around we didn't detect any change in the sink's connection
>  	 * status.
> +	 *
> +	 * Type-c connectors which get their HPD signal deasserted then
> +	 * reasserted, without unplugging/replugging the sink from the
> +	 * connector, introduce a delay until the AUX channel communication
> +	 * becomes functional. Retry the detection for 5 seconds on type-c
> +	 * connectors to account for this delay.
>  	 */
> -	if (state == INTEL_HOTPLUG_UNCHANGED && !connector->hotplug_retries &&
> +	if (state == INTEL_HOTPLUG_UNCHANGED &&
> +	    connector->hotplug_retries < (is_tc ? 5 : 1) &&
I had observed that intel_dp_detect may race between user spece invoked
get connector call and intel_encoder_hotplug(), that may leave connector status
to be UNCHANGED in actual hotplug flow as intel_dp_detect() already called from 
drm_helper_probe_single_connector_modes(), this may results in 5 retries for 
type-C ports for normal HPD assertion.
Please correct me if i am wrong.
Thanks,
Anshuman Gupta.
>  	    !dig_port->dp.is_mst)
>  		state = INTEL_HOTPLUG_RETRY;
>  
> -- 
> 2.23.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

  parent reply	other threads:[~2020-04-01 11:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30  9:54 [Intel-gfx] [PATCH 1/2] drm/i915: Add a retry counter for hotplug detect retries Imre Deak
2020-03-30  9:54 ` [Intel-gfx] [PATCH 2/2] drm/i915: Extend hotplug detect retry on TypeC connectors to 5 seconds Imre Deak
2020-03-30 19:13   ` Souza, Jose
2020-04-06 15:02     ` Imre Deak
2020-04-01 11:20   ` Anshuman Gupta [this message]
2020-04-01 11:54     ` Imre Deak
2020-03-30 12:33 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Add a retry counter for hotplug detect retries Patchwork
2020-03-31  3:02 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=20200401112022.GF11633@intel.com \
    --to=anshuman.gupta@intel.com \
    --cc=imre.deak@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.