drm/i915: Don't read dpcd for disconnected ports

Submitted by Mika Kuoppala on April 21, 2015, 7:20 a.m.

Details

Message ID 1429600829-2958-1-git-send-email-mika.kuoppala@intel.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Mika Kuoppala April 21, 2015, 7:20 a.m.
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(+)

Patch hide | download patch | download mbox

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;
+
 		/* low tech for now */
 		if (WARN_ON(size > sizeof(buf)))
 			continue;

Comments

Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6243
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                                  276/276              276/276
ILK                                  302/302              302/302
SNB                                  318/318              318/318
IVB                                  341/341              341/341
BYT                                  287/287              287/287
BDW                                  318/318              318/318
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
Note: You need to pay more attention to line start with '*'
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