[Intel-gfx] [PATCH v2] drm/i915: Don't read dpcd for disconnected ports

Daniel Vetter daniel at ffwll.ch
Mon May 18 00:00:18 PDT 2015


On Fri, May 15, 2015 at 01:09:21PM +0300, Jani Nikula wrote:
> From: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> 
> Reading from disconnected ports will spit out timeout error
> on the dmesg. Skip the attempted read if the port is not
> connected and avoid confusing users/testcases about
> expected timeouts.
> 
> This new dpcd debugfs entry was introduced by commit aa7471d228eb
> ("drm/i915: add i915 specific connector debugfs file for DPCD")
> 
> v2 by Jani: move the check at the top, out of the loop.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90060
> Tested-by: yex.tian at intel.com
> Cc: Jani Nikula <jani.nikula at intel.com>
> Cc: Bob Paauwe <bob.j.paauwe at intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index adbbddab42c6..a32b669bab89 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -5154,6 +5154,9 @@ static int i915_dpcd_show(struct seq_file *m, void *data)
>  	ssize_t err;
>  	int i;
>  
> +	if (connector->status != connector_status_connected)
> +		return -ENODEV;
> +
>  	for (i = 0; i < ARRAY_SIZE(i915_dpcd_debug); i++) {
>  		const struct dpcd_block *b = &i915_dpcd_debug[i];
>  		size_t size = b->end ? b->end - b->offset + 1 : (b->size ?: 1);
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list