From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Manasi Navare <manasi.d.navare@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/dp: Reset link params on connector disconnect
Date: Thu, 4 Jun 2020 18:25:43 +0300 [thread overview]
Message-ID: <20200604152543.GU6112@intel.com> (raw)
In-Reply-To: <20200604002359.17128-1-manasi.d.navare@intel.com>
On Wed, Jun 03, 2020 at 05:23:59PM -0700, Manasi Navare wrote:
> We have noticed that when link training fails the panel
> sends a long pulse indicating connector disconnect. In this case
> we need to reset the link parameters instead of continuing
> to use the fallback parameters since else this long pulse
> by the panel followed by a modeset request which was triggered by the userspace
> before getting the connector status as disconnected, will
> result into a modeset now using lower link rate/lane count values.
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1385
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 28 +++++++++++++++++--------
> 1 file changed, 19 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 55fda074c0ad..f7af372647dd 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -6111,6 +6111,18 @@ intel_dp_unset_edid(struct intel_dp *intel_dp)
> intel_dp->edid_quirks = 0;
> }
>
> +static void
> +intel_dp_reset_link_params(struct intel_dp *intel_dp)
> +{
> + /* Initial max link lane count */
> + intel_dp->max_link_lane_count = intel_dp_max_common_lane_count(intel_dp);
> +
> + /* Initial max link rate */
> + intel_dp->max_link_rate = intel_dp_max_common_rate(intel_dp);
> +
> + intel_dp->reset_link_params = false;
> +}
> +
> static int
> intel_dp_detect(struct drm_connector *connector,
> struct drm_modeset_acquire_ctx *ctx,
> @@ -6139,6 +6151,11 @@ intel_dp_detect(struct drm_connector *connector,
> memset(&intel_dp->compliance, 0, sizeof(intel_dp->compliance));
> memset(intel_dp->dsc_dpcd, 0, sizeof(intel_dp->dsc_dpcd));
>
> + /*Reset the immutable VRR Capable property */
> + drm_connector_set_vrr_capable_property(connector,
> + false);
> + intel_dp_reset_link_params(intel_dp);
> +
Why would we care what those are when the sink is disconnected?
> if (intel_dp->is_mst) {
> drm_dbg_kms(&dev_priv->drm,
> "MST device may have disappeared %d vs %d\n",
> @@ -6152,15 +6169,8 @@ intel_dp_detect(struct drm_connector *connector,
> goto out;
> }
>
> - if (intel_dp->reset_link_params) {
> - /* Initial max link lane count */
> - intel_dp->max_link_lane_count = intel_dp_max_common_lane_count(intel_dp);
> -
> - /* Initial max link rate */
> - intel_dp->max_link_rate = intel_dp_max_common_rate(intel_dp);
> -
> - intel_dp->reset_link_params = false;
> - }
> + if (intel_dp->reset_link_params)
> + intel_dp_reset_link_params(intel_dp);
>
> intel_dp_print_rates(intel_dp);
>
> --
> 2.19.1
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-06-04 15:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 0:23 [Intel-gfx] [PATCH] drm/i915/dp: Reset link params on connector disconnect Manasi Navare
2020-06-04 0:49 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-06-04 1:19 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2020-06-04 15:25 ` Ville Syrjälä [this message]
2020-06-04 18:35 ` [Intel-gfx] [PATCH] " Manasi Navare
2020-06-04 18:38 ` Ville Syrjälä
2020-06-04 18:52 ` Manasi Navare
2020-06-04 18:58 ` Ville Syrjälä
2020-06-04 19:01 ` Ville Syrjälä
2020-06-04 19:08 ` Imre Deak
2020-06-04 19:20 ` Manasi Navare
2020-06-04 19:23 ` Imre Deak
2020-06-04 19:40 ` Manasi Navare
2020-06-04 19:49 ` Imre Deak
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=20200604152543.GU6112@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=manasi.d.navare@intel.com \
/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.