From: "Govindapillai, Vinod" <vinod.govindapillai@intel.com>
To: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Deak, Imre" <imre.deak@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 08/12] drm/i915/dp: Convert link training error to debug message on disconnected sink
Date: Fri, 5 May 2023 08:22:36 +0000 [thread overview]
Message-ID: <058076d9802657c59f846856e1fb5f692cb8692a.camel@intel.com> (raw)
In-Reply-To: <20230503231048.432368-9-imre.deak@intel.com>
On Thu, 2023-05-04 at 02:10 +0300, Imre Deak wrote:
> If a sink is disconnected it's expected that link training actions will
> fail on it, so downgrade the error messages about such actions to be a
> debug message. Such - expected - link training failures are more
> frequent after a follow up patch, after which an active TypeC link is
> reset after the sink is disconnected which also involves a link
> training.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
> drivers/gpu/drm/i915/display/intel_dp.h | 1 +
> drivers/gpu/drm/i915/display/intel_dp_link_training.c | 11 +++++++++--
> 3 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 4361c1ac65c3a..1942a05719776 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -4179,7 +4179,7 @@ static int intel_dp_prep_link_retrain(struct intel_dp *intel_dp,
> return ret;
> }
>
> -static bool intel_dp_is_connected(struct intel_dp *intel_dp)
> +bool intel_dp_is_connected(struct intel_dp *intel_dp)
> {
> struct intel_connector *connector = intel_dp->attached_connector;
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
> index ef39e4f7a329e..488da392fafe5 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> @@ -42,6 +42,7 @@ void intel_dp_set_link_params(struct intel_dp *intel_dp,
> int link_rate, int lane_count);
> int intel_dp_get_link_train_fallback_values(struct intel_dp *intel_dp,
> int link_rate, u8 lane_count);
> +bool intel_dp_is_connected(struct intel_dp *intel_dp);
> int intel_dp_retrain_link(struct intel_encoder *encoder,
> struct drm_modeset_acquire_ctx *ctx);
> void intel_dp_set_power(struct intel_dp *intel_dp, u8 mode);
> 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 f83944eaac128..2fe076e2d64b3 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> @@ -33,6 +33,7 @@ static void lt_msg(struct intel_dp *intel_dp, enum drm_dp_phy dp_phy,
> struct drm_i915_private *i915 = dp_to_i915(intel_dp);
> struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base;
> struct intel_connector *connector = intel_dp->attached_connector;
> + const char *discon_str = "";
> struct va_format vaf;
> va_list args;
>
> @@ -43,6 +44,11 @@ static void lt_msg(struct intel_dp *intel_dp, enum drm_dp_phy dp_phy,
> vaf.fmt = format;
> vaf.va = &args;
>
> + if (is_error && !intel_dp_is_connected(intel_dp)) {
> + discon_str = " (sink disconnected)";
> + is_error = false;
> + }
> +
Hi imre,
If the ignore long HPD env variable is set, in case of spurious HPDs we will ignore the long HPDs
and the connector status remains unchanged. So don't we need to downgrade the error messages to
debug messages if dev_priv->display.hotplug.ignore_long_hpd is set?
BR
vinod
> if (is_error)
> drm_err(&i915->drm, "[CONNECTOR:%d:%s][ENCODER:%d:%s][%s] %pV\n",
> connector->base.base.id, connector->base.name,
> @@ -50,11 +56,12 @@ static void lt_msg(struct intel_dp *intel_dp, enum drm_dp_phy dp_phy,
> drm_dp_phy_name(dp_phy),
> &vaf);
> else
> - drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s][ENCODER:%d:%s][%s] %pV\n",
> + drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s][ENCODER:%d:%s][%s] %pV%s\n",
> connector->base.base.id, connector->base.name,
> encoder->base.base.id, encoder->base.name,
> drm_dp_phy_name(dp_phy),
> - &vaf);
> + &vaf,
> + discon_str);
> }
>
> #define lt_err(intel_dp, dp_phy, format, ...) \
next prev parent reply other threads:[~2023-05-05 8:22 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 23:10 [Intel-gfx] [PATCH v2 00/12] drm/i915/tc: Add a workaround for an IOM/TCSS firmware hang issue Imre Deak
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 01/12] drm/i915: Fix PIPEDMC disabling for a bigjoiner configuration Imre Deak
2023-05-04 14:39 ` Ville Syrjälä
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 02/12] drm/i915: Make the CRTC state consistent during sanitize-disabling Imre Deak
2023-05-04 14:38 ` Ville Syrjälä
2023-05-04 17:08 ` Imre Deak
2023-05-05 20:46 ` [Intel-gfx] [PATCH v3 " Imre Deak
2023-05-09 14:45 ` Ville Syrjälä
2023-05-09 18:28 ` Imre Deak
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 03/12] drm/i915: Update connector atomic state before crtc sanitize-disabling Imre Deak
2023-05-04 14:42 ` Ville Syrjälä
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 04/12] drm/i915: Separate intel_crtc_disable_noatomic_begin/complete() Imre Deak
2023-05-04 17:15 ` Ville Syrjälä
2023-05-05 20:46 ` [Intel-gfx] [PATCH v3 " Imre Deak
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 05/12] drm/i915: Factor out set_encoder_for_connector() Imre Deak
2023-05-04 14:48 ` Ville Syrjälä
2023-05-05 20:46 ` [Intel-gfx] [PATCH v3 " Imre Deak
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 06/12] drm/i915: Add support for disabling any CRTCs during HW readout/sanitization Imre Deak
2023-05-04 17:15 ` Ville Syrjälä
2023-05-04 20:29 ` Imre Deak
2023-05-05 20:46 ` [Intel-gfx] [PATCH v3 " Imre Deak
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 07/12] drm/i915/dp: Add link training debug and error printing helpers Imre Deak
2023-05-04 14:53 ` Ville Syrjälä
2023-05-05 8:51 ` Jani Nikula
2023-05-05 12:07 ` Imre Deak
2023-05-05 20:46 ` [Intel-gfx] [PATCH v3 " Imre Deak
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 08/12] drm/i915/dp: Convert link training error to debug message on disconnected sink Imre Deak
2023-05-04 14:54 ` Ville Syrjälä
2023-05-05 8:22 ` Govindapillai, Vinod [this message]
2023-05-05 12:12 ` Imre Deak
2023-05-05 20:46 ` [Intel-gfx] [PATCH v3 " Imre Deak
2023-05-09 12:26 ` Govindapillai, Vinod
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 09/12] drm/i915/dp: Prevent link training fallback on disconnected port Imre Deak
2023-05-04 14:54 ` Ville Syrjälä
2023-05-05 20:46 ` [Intel-gfx] [PATCH v3 " Imre Deak
2023-05-09 12:26 ` Govindapillai, Vinod
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 10/12] drm/i915/dp: Factor out intel_dp_get_active_pipes() Imre Deak
2023-05-04 14:55 ` Ville Syrjälä
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 11/12] drm/i915: Factor out a helper for handling atomic modeset locks/state Imre Deak
2023-05-04 15:00 ` Ville Syrjälä
2023-05-03 23:10 ` [Intel-gfx] [PATCH v2 12/12] drm/i915/tc: Reset TypeC PHYs left enabled in DP-alt mode after the sink disconnects Imre Deak
2023-05-04 17:41 ` Ville Syrjälä
2023-05-04 20:12 ` Imre Deak
2023-05-05 20:46 ` [Intel-gfx] [PATCH v3 " Imre Deak
2023-05-05 22:12 ` Imre Deak
2023-05-04 0:21 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tc: Add a workaround for an IOM/TCSS firmware hang issue (rev2) Patchwork
2023-05-04 0:21 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-05-04 0:32 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-05-04 2:54 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-05-05 21:59 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/tc: Add a workaround for an IOM/TCSS firmware hang issue (rev10) Patchwork
2023-05-05 21:59 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-05-05 22:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-05-06 16:34 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=058076d9802657c59f846856e1fb5f692cb8692a.camel@intel.com \
--to=vinod.govindapillai@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox