All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: Don't read dpcd for disconnected ports
Date: Mon, 18 May 2015 09:00:18 +0200	[thread overview]
Message-ID: <20150518070018.GA15256@phenom.ffwll.local> (raw)
In-Reply-To: <1431684561-21078-1-git-send-email-jani.nikula@intel.com>

On Fri, May 15, 2015 at 01:09:21PM +0300, Jani Nikula wrote:
> From: Mika Kuoppala <mika.kuoppala@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@intel.com
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Bob Paauwe <bob.j.paauwe@intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2015-05-18  6:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21  7:20 [PATCH] drm/i915: Don't read dpcd for disconnected ports Mika Kuoppala
2015-04-21 12:24 ` shuang.he
2015-05-04  8:46 ` Jani Nikula
2015-05-15 10:09   ` [PATCH v2] " Jani Nikula
2015-05-18  6:28     ` shuang.he
2015-05-18  7:00     ` Daniel Vetter [this message]

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=20150518070018.GA15256@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /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.