All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 3/3] drm/915/lspcon: Reduce dmesg errors during lspcon_init failure
Date: Wed, 10 Apr 2024 08:35:55 +0530	[thread overview]
Message-ID: <20240410030555.1135615-1-ankit.k.nautiyal@intel.com> (raw)
In-Reply-To: <20240408050558.865396-4-ankit.k.nautiyal@intel.com>

Currently lspcon_resume calls lspcon_init and in case of failure we get
error messages from lspcon_init and then again from lspcon_resume.

Just have a single error message in lspcon_init.

v2: Add the relavant info with each error, and avoid mix of dbg and
error messages. (Jani)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_lspcon.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
index 16ee0dc179f7..84d953496098 100644
--- a/drivers/gpu/drm/i915/display/intel_lspcon.c
+++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
@@ -680,23 +680,27 @@ bool lspcon_init(struct intel_digital_port *dig_port)
 		return false;
 
 	if (!lspcon_set_pcon_mode(lspcon)) {
-		drm_err(&i915->drm, "LSPCON mode change to PCON failed\n");
+		drm_err(&i915->drm, "Failure: LSPCON init on port %c, mode change to PCON failed\n",
+			port_name(dig_port->base.port));
 		return false;
 	}
 
 	if (drm_dp_read_dpcd_caps(&intel_dp->aux, intel_dp->dpcd) != 0) {
-		drm_err(&i915->drm, "LSPCON DPCD read failed\n");
+		drm_err(&i915->drm, "Failure: LSPCON init on port %c, DPCD caps read failed\n",
+			port_name(dig_port->base.port));
 		return false;
 	}
 
 	if (!lspcon_detect_vendor(lspcon)) {
-		drm_err(&i915->drm, "LSPCON vendor detection failed\n");
+		drm_err(&i915->drm, "Failure: LSPCON init on port %c, vendor detection failed\n",
+			port_name(dig_port->base.port));
 		return false;
 	}
 
 	connector->ycbcr_420_allowed = true;
 	lspcon->active = true;
 	drm_dbg_kms(&i915->drm, "Success: LSPCON init\n");
+
 	return true;
 }
 
@@ -718,13 +722,8 @@ void lspcon_resume(struct intel_digital_port *dig_port)
 	if (!intel_bios_encoder_is_lspcon(dig_port->base.devdata))
 		return;
 
-	if (!lspcon->active) {
-		if (!lspcon_init(dig_port)) {
-			drm_err(&i915->drm, "LSPCON init failed on port %c\n",
-				port_name(dig_port->base.port));
-			return;
-		}
-	}
+	if (!lspcon->active && !lspcon_init(dig_port))
+		return;
 
 	expected_mode = lspcon_get_expected_mode(lspcon);
 	if (expected_mode == DRM_LSPCON_MODE_PCON)
-- 
2.40.1


  parent reply	other threads:[~2024-04-10  3:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  5:05 [PATCH 0/3] Avoid unwanted lspcon init and probe warnings Ankit Nautiyal
2024-04-08  5:05 ` [PATCH 1/3] drm/i915/lspcon: Separate out function to get expected mode Ankit Nautiyal
2024-04-08  9:46   ` Jani Nikula
2024-04-08  5:05 ` [PATCH 2/3] drm/i915/lspcon: Separate out function to set pcon mode Ankit Nautiyal
2024-04-08  9:50   ` Jani Nikula
2024-04-08  5:05 ` [PATCH 3/3] drm/915/lspcon: Reduce dmesg errors during lspcon_init failure Ankit Nautiyal
2024-04-08  9:52   ` Jani Nikula
2024-04-10  3:05   ` Ankit Nautiyal [this message]
2024-04-08  5:47 ` ✓ Fi.CI.BAT: success for Avoid unwanted lspcon init and probe warnings (rev2) Patchwork
2024-04-08  7:08 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-04-10  3:59 ` ✓ Fi.CI.BAT: success for Avoid unwanted lspcon init and probe warnings (rev3) Patchwork
2024-04-10 20:45 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-04-08 12:59 [PATCH v2 3/3] drm/915/lspcon: Reduce dmesg errors during lspcon_init failure Ankit Nautiyal

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=20240410030555.1135615-1-ankit.k.nautiyal@intel.com \
    --to=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.