diff mbox series

drm/i915/dg2: Print PHY name properly on calibration error

Message ID 20220215163545.2175730-1-matthew.d.roper@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/dg2: Print PHY name properly on calibration error | expand

Commit Message

Matt Roper Feb. 15, 2022, 4:35 p.m. UTC
We need to use phy_name() to convert the PHY value into a human-readable
character in the error message.

Fixes: a6a128116e55 ("drm/i915/dg2: Wait for SNPS PHY calibration during display init")
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_snps_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dhanavanthri, Swathi Feb. 15, 2022, 10:56 p.m. UTC | #1
Acked-by: Swathi Dhanavanthri <swathi.dhanavanthri@intel.com>
 
-----Original Message-----
From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Matt Roper
Sent: Tuesday, February 15, 2022 8:36 AM
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH] drm/i915/dg2: Print PHY name properly on calibration error

We need to use phy_name() to convert the PHY value into a human-readable character in the error message.

Fixes: a6a128116e55 ("drm/i915/dg2: Wait for SNPS PHY calibration during display init")
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_snps_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_snps_phy.c b/drivers/gpu/drm/i915/display/intel_snps_phy.c
index 8573a458811a..8fd00de981fc 100644
--- a/drivers/gpu/drm/i915/display/intel_snps_phy.c
+++ b/drivers/gpu/drm/i915/display/intel_snps_phy.c
@@ -35,7 +35,7 @@ void intel_snps_phy_wait_for_calibration(struct drm_i915_private *i915)
 		if (intel_de_wait_for_clear(i915, ICL_PHY_MISC(phy),
 					    DG2_PHY_DP_TX_ACK_MASK, 25))
 			drm_err(&i915->drm, "SNPS PHY %c failed to calibrate after 25ms.\n",
-				phy);
+				phy_name(phy));
 	}
 }
 
--
2.34.1
Dhanavanthri, Swathi Feb. 16, 2022, 8:52 p.m. UTC | #2
Reviewed-by: Swathi Dhanavanthri <swathi.dhanavanthri@intel.com>

-----Original Message-----
From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Matt Roper
Sent: Tuesday, February 15, 2022 8:36 AM
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH] drm/i915/dg2: Print PHY name properly on calibration error

We need to use phy_name() to convert the PHY value into a human-readable character in the error message.

Fixes: a6a128116e55 ("drm/i915/dg2: Wait for SNPS PHY calibration during display init")
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/display/intel_snps_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_snps_phy.c b/drivers/gpu/drm/i915/display/intel_snps_phy.c
index 8573a458811a..8fd00de981fc 100644
--- a/drivers/gpu/drm/i915/display/intel_snps_phy.c
+++ b/drivers/gpu/drm/i915/display/intel_snps_phy.c
@@ -35,7 +35,7 @@ void intel_snps_phy_wait_for_calibration(struct drm_i915_private *i915)
 		if (intel_de_wait_for_clear(i915, ICL_PHY_MISC(phy),
 					    DG2_PHY_DP_TX_ACK_MASK, 25))
 			drm_err(&i915->drm, "SNPS PHY %c failed to calibrate after 25ms.\n",
-				phy);
+				phy_name(phy));
 	}
 }
 
--
2.34.1
Tvrtko Ursulin Feb. 21, 2022, 9:42 a.m. UTC | #3
On 15/02/2022 16:35, Matt Roper wrote:
> We need to use phy_name() to convert the PHY value into a human-readable
> character in the error message.
> 
> Fixes: a6a128116e55 ("drm/i915/dg2: Wait for SNPS PHY calibration during display init")

I picked this for drm-intel-fixes, and as it did not apply cleanly, 
noticed in the process that a6a128116e55 is all the way back in 5.15. I 
reckon you didn't want to copy stable because it is just a log message 
tweak?

Regards,

Tvrtko

> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_snps_phy.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_snps_phy.c b/drivers/gpu/drm/i915/display/intel_snps_phy.c
> index 8573a458811a..8fd00de981fc 100644
> --- a/drivers/gpu/drm/i915/display/intel_snps_phy.c
> +++ b/drivers/gpu/drm/i915/display/intel_snps_phy.c
> @@ -35,7 +35,7 @@ void intel_snps_phy_wait_for_calibration(struct drm_i915_private *i915)
>   		if (intel_de_wait_for_clear(i915, ICL_PHY_MISC(phy),
>   					    DG2_PHY_DP_TX_ACK_MASK, 25))
>   			drm_err(&i915->drm, "SNPS PHY %c failed to calibrate after 25ms.\n",
> -				phy);
> +				phy_name(phy));
>   	}
>   }
>
Matt Roper Feb. 22, 2022, 4 p.m. UTC | #4
On Mon, Feb 21, 2022 at 09:42:21AM +0000, Tvrtko Ursulin wrote:
> 
> On 15/02/2022 16:35, Matt Roper wrote:
> > We need to use phy_name() to convert the PHY value into a human-readable
> > character in the error message.
> > 
> > Fixes: a6a128116e55 ("drm/i915/dg2: Wait for SNPS PHY calibration during display init")
> 
> I picked this for drm-intel-fixes, and as it did not apply cleanly, noticed
> in the process that a6a128116e55 is all the way back in 5.15. I reckon you
> didn't want to copy stable because it is just a log message tweak?

Correct; not needed for stable since this is only relevant to DG2 and
DG2 still isn't enabled for actual use (the PCI IDs are still in a
CI-only branch while we wait for the final bits of enabling work to be
hammered out).


Matt

> 
> Regards,
> 
> Tvrtko
> 
> > Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> > ---
> >   drivers/gpu/drm/i915/display/intel_snps_phy.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_snps_phy.c b/drivers/gpu/drm/i915/display/intel_snps_phy.c
> > index 8573a458811a..8fd00de981fc 100644
> > --- a/drivers/gpu/drm/i915/display/intel_snps_phy.c
> > +++ b/drivers/gpu/drm/i915/display/intel_snps_phy.c
> > @@ -35,7 +35,7 @@ void intel_snps_phy_wait_for_calibration(struct drm_i915_private *i915)
> >   		if (intel_de_wait_for_clear(i915, ICL_PHY_MISC(phy),
> >   					    DG2_PHY_DP_TX_ACK_MASK, 25))
> >   			drm_err(&i915->drm, "SNPS PHY %c failed to calibrate after 25ms.\n",
> > -				phy);
> > +				phy_name(phy));
> >   	}
> >   }
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_snps_phy.c b/drivers/gpu/drm/i915/display/intel_snps_phy.c
index 8573a458811a..8fd00de981fc 100644
--- a/drivers/gpu/drm/i915/display/intel_snps_phy.c
+++ b/drivers/gpu/drm/i915/display/intel_snps_phy.c
@@ -35,7 +35,7 @@  void intel_snps_phy_wait_for_calibration(struct drm_i915_private *i915)
 		if (intel_de_wait_for_clear(i915, ICL_PHY_MISC(phy),
 					    DG2_PHY_DP_TX_ACK_MASK, 25))
 			drm_err(&i915->drm, "SNPS PHY %c failed to calibrate after 25ms.\n",
-				phy);
+				phy_name(phy));
 	}
 }