diff mbox

[4/4] drm/i915/dp: Don't log the DPCD if we are disconnected

Message ID 1355341841-4595-4-git-send-email-damien.lespiau@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Damien Lespiau Dec. 12, 2012, 7:50 p.m. UTC
From: Damien Lespiau <damien.lespiau@intel.com>

It's a bit useless to print out an all null DPCD when we are
disconnected and just clutter the debug logs.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jani Nikula Dec. 13, 2012, 8:33 a.m. UTC | #1
On Wed, 12 Dec 2012, Damien Lespiau <damien.lespiau@gmail.com> wrote:
> From: Damien Lespiau <damien.lespiau@intel.com>
>
> It's a bit useless to print out an all null DPCD when we are
> disconnected and just clutter the debug logs.

NAK.

Please have a look at intel_dp_detect_dpcd(). There are a number of ways
to get a non-zero DPCD that lead to something other than
connector_status_connected. The comment says, "XXX this is probably
wrong for multiple downstream ports", so there's also some work to do in
the area. IMO we need the debugs.

Even intel_dp_get_dpcd() has one branch that returns false when we have
non-zero DPCD. But if we ignored that part (it's an aux channel error
anyway), we could move the debug dump to intel_dp_detect_dpcd() right
after the intel_dp_get_dpcd() call. I think that would get maximum debug
coverage with minimum zero DPCD noise.

What do you think?


BR,
Jani.



>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index fe3c22f..42058fa 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2362,13 +2362,13 @@ intel_dp_detect(struct drm_connector *connector, bool force)
>  	else
>  		status = g4x_dp_detect(intel_dp);
>  
> +	if (status != connector_status_connected)
> +		return status;
> +
>  	hex_dump_to_buffer(intel_dp->dpcd, sizeof(intel_dp->dpcd),
>  			   32, 1, dpcd_hex_dump, sizeof(dpcd_hex_dump), false);
>  	DRM_DEBUG_KMS("DPCD: %s\n", dpcd_hex_dump);
>  
> -	if (status != connector_status_connected)
> -		return status;
> -
>  	intel_dp_probe_oui(intel_dp);
>  
>  	if (intel_dp->force_audio != HDMI_AUDIO_AUTO) {
> -- 
> 1.7.11.7
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index fe3c22f..42058fa 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2362,13 +2362,13 @@  intel_dp_detect(struct drm_connector *connector, bool force)
 	else
 		status = g4x_dp_detect(intel_dp);
 
+	if (status != connector_status_connected)
+		return status;
+
 	hex_dump_to_buffer(intel_dp->dpcd, sizeof(intel_dp->dpcd),
 			   32, 1, dpcd_hex_dump, sizeof(dpcd_hex_dump), false);
 	DRM_DEBUG_KMS("DPCD: %s\n", dpcd_hex_dump);
 
-	if (status != connector_status_connected)
-		return status;
-
 	intel_dp_probe_oui(intel_dp);
 
 	if (intel_dp->force_audio != HDMI_AUDIO_AUTO) {