All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Don't read dpcd for disconnected ports
Date: Mon, 04 May 2015 11:46:20 +0300	[thread overview]
Message-ID: <87d22g91cz.fsf@intel.com> (raw)
In-Reply-To: <1429600829-2958-1-git-send-email-mika.kuoppala@intel.com>

On Tue, 21 Apr 2015, Mika Kuoppala <mika.kuoppala@linux.intel.com> wrote:
> 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")
>
> 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>
> ---
>  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 9c2b9e4..fbc1f39 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4938,6 +4938,9 @@ static int i915_dpcd_show(struct seq_file *m, void *data)
>  		    connector->connector_type != DRM_MODE_CONNECTOR_eDP)
>  			continue;
>  
> +		if (connector->status != connector_status_connected)
> +			continue;

The loop isn't iterating over connectors, so this check should be at the
top of the function.

BR,
Jani.


> +
>  		/* low tech for now */
>  		if (WARN_ON(size > sizeof(buf)))
>  			continue;
> -- 
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-05-04  8:44 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 [this message]
2015-05-15 10:09   ` [PATCH v2] " Jani Nikula
2015-05-18  6:28     ` shuang.he
2015-05-18  7:00     ` Daniel Vetter

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=87d22g91cz.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@linux.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.