[Intel-gfx] [PATCH] drm/i915: Add some debug breadcrumbs to connector detection

Daniel Vetter daniel at ffwll.ch
Sun Jul 21 13:52:04 CEST 2013


On Sat, Jul 20, 2013 at 08:27:08PM +0100, Chris Wilson wrote:
> Try to decypher detection failures is a little tricker at the moment as
> the only indicator of progress is when output_poll_execute() tells us
> the result after the connector->detect() has run. This patch adds a
> telltale to the start of each detect function so that we can track
> progress and associate activity more clearly with each connector.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Dunno whether this shouldn't be in the drm core, otoh there's a bunch of
callsites all over the place. So queued for -next, thanks for the patch.
-Daniel
> ---
>  drivers/gpu/drm/i915/intel_crt.c  | 4 ++++
>  drivers/gpu/drm/i915/intel_dp.c   | 3 +++
>  drivers/gpu/drm/i915/intel_dvo.c  | 2 ++
>  drivers/gpu/drm/i915/intel_hdmi.c | 3 +++
>  drivers/gpu/drm/i915/intel_lvds.c | 3 +++
>  drivers/gpu/drm/i915/intel_sdvo.c | 3 +++
>  drivers/gpu/drm/i915/intel_tv.c   | 4 ++++
>  7 files changed, 22 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> index 3acec8c..0c0d4e8 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -613,6 +613,10 @@ intel_crt_detect(struct drm_connector *connector, bool force)
>  	enum drm_connector_status status;
>  	struct intel_load_detect_pipe tmp;
>  
> +	DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force=%d\n",
> +		      connector->base.id, drm_get_connector_name(connector),
> +		      force);
> +
>  	if (I915_HAS_HOTPLUG(dev)) {
>  		/* We can not rely on the HPD pin always being correctly wired
>  		 * up, for example many KVM do not pass it through, and so
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index f474adb..c6996ce 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2820,6 +2820,9 @@ intel_dp_detect(struct drm_connector *connector, bool force)
>  	enum drm_connector_status status;
>  	struct edid *edid = NULL;
>  
> +	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
> +		      connector->base.id, drm_get_connector_name(connector));
> +
>  	intel_dp->has_audio = false;
>  
>  	if (HAS_PCH_SPLIT(dev))
> diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
> index cbbc49d..8b4ad27 100644
> --- a/drivers/gpu/drm/i915/intel_dvo.c
> +++ b/drivers/gpu/drm/i915/intel_dvo.c
> @@ -332,6 +332,8 @@ static enum drm_connector_status
>  intel_dvo_detect(struct drm_connector *connector, bool force)
>  {
>  	struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
> +	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
> +		      connector->base.id, drm_get_connector_name(connector));
>  	return intel_dvo->dev.dev_ops->detect(&intel_dvo->dev);
>  }
>  
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 98df2a0..af18da7 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -866,6 +866,9 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
>  	struct edid *edid;
>  	enum drm_connector_status status = connector_status_disconnected;
>  
> +	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
> +		      connector->base.id, drm_get_connector_name(connector));
> +
>  	intel_hdmi->has_hdmi_sink = false;
>  	intel_hdmi->has_audio = false;
>  	intel_hdmi->rgb_quant_range_selectable = false;
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index 2adc024..dd17198 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -343,6 +343,9 @@ intel_lvds_detect(struct drm_connector *connector, bool force)
>  	struct drm_device *dev = connector->dev;
>  	enum drm_connector_status status;
>  
> +	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
> +		      connector->base.id, drm_get_connector_name(connector));
> +
>  	status = intel_panel_detect(dev);
>  	if (status != connector_status_unknown)
>  		return status;
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> index 798df11..c3b59b8 100644
> --- a/drivers/gpu/drm/i915/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> @@ -1696,6 +1696,9 @@ intel_sdvo_detect(struct drm_connector *connector, bool force)
>  	struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector);
>  	enum drm_connector_status ret;
>  
> +	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
> +		      connector->base.id, drm_get_connector_name(connector));
> +
>  	if (!intel_sdvo_get_value(intel_sdvo,
>  				  SDVO_CMD_GET_ATTACHED_DISPLAYS,
>  				  &response, 2))
> diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
> index 39debd8..b0b446f 100644
> --- a/drivers/gpu/drm/i915/intel_tv.c
> +++ b/drivers/gpu/drm/i915/intel_tv.c
> @@ -1305,6 +1305,10 @@ intel_tv_detect(struct drm_connector *connector, bool force)
>  	struct intel_tv *intel_tv = intel_attached_tv(connector);
>  	int type;
>  
> +	DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force=%d\n",
> +		      connector->base.id, drm_get_connector_name(connector),
> +		      force);
> +
>  	mode = reported_modes[0];
>  
>  	if (force) {
> -- 
> 1.8.3.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list