public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Don't read dpcd for disconnected ports
@ 2015-04-21  7:20 Mika Kuoppala
  2015-04-21 12:24 ` shuang.he
  2015-05-04  8:46 ` Jani Nikula
  0 siblings, 2 replies; 6+ messages in thread
From: Mika Kuoppala @ 2015-04-21  7:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula

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;
+
 		/* 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Don't read dpcd for disconnected ports
  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
  1 sibling, 0 replies; 6+ messages in thread
From: shuang.he @ 2015-04-21 12:24 UTC (permalink / raw)
  To: shuang.he, ethan.gao, intel-gfx, mika.kuoppala

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 '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: Don't read dpcd for disconnected ports
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2015-05-04  8:46 UTC (permalink / raw)
  To: Mika Kuoppala, intel-gfx

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] drm/i915: Don't read dpcd for disconnected ports
  2015-05-04  8:46 ` Jani Nikula
@ 2015-05-15 10:09   ` Jani Nikula
  2015-05-18  6:28     ` shuang.he
  2015-05-18  7:00     ` Daniel Vetter
  0 siblings, 2 replies; 6+ messages in thread
From: Jani Nikula @ 2015-05-15 10:09 UTC (permalink / raw)
  To: Jani Nikula, Mika Kuoppala, intel-gfx

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(+)

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/i915: Don't read dpcd for disconnected ports
  2015-05-15 10:09   ` [PATCH v2] " Jani Nikula
@ 2015-05-18  6:28     ` shuang.he
  2015-05-18  7:00     ` Daniel Vetter
  1 sibling, 0 replies; 6+ messages in thread
From: shuang.he @ 2015-05-18  6:28 UTC (permalink / raw)
  To: shuang.he, lei.a.liu, intel-gfx, jani.nikula

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 '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/i915: Don't read dpcd for disconnected ports
  2015-05-15 10:09   ` [PATCH v2] " Jani Nikula
  2015-05-18  6:28     ` shuang.he
@ 2015-05-18  7:00     ` Daniel Vetter
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2015-05-18  7:00 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-18  6:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox