diff mbox

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

Message ID 1431684561-21078-1-git-send-email-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jani Nikula May 15, 2015, 10:09 a.m. UTC
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>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Shuang He May 18, 2015, 6:28 a.m. UTC | #1
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6416
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                                  276/276              276/276
ILK                                  302/302              302/302
SNB                 -1              314/314              313/314
IVB                                  338/338              338/338
BYT                                  286/286              286/286
BDW                                  320/320              320/320
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 SNB  igt@pm_rpm@dpms-mode-unset-non-lpsp      DMESG_WARN(15)PASS(1)      DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_uncore.c:#assert_device_not_suspended[i915]()@WARNING:.* at .* assert_device_not_suspended+0x
Note: You need to pay more attention to line start with '*'
Daniel Vetter May 18, 2015, 7 a.m. UTC | #2
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
diff mbox

Patch

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);