* [PATCH] drm/i915: avoid unclaimed registers when capturing the error state
@ 2013-12-20 17:09 Paulo Zanoni
2014-01-07 14:07 ` Imre Deak
2014-06-02 13:35 ` Chris Wilson
0 siblings, 2 replies; 6+ messages in thread
From: Paulo Zanoni @ 2013-12-20 17:09 UTC (permalink / raw)
To: intel-gfx; +Cc: Paulo Zanoni
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
We're iterating over the CPU transcoders, so check for the correct
power domain.
This fixes many "unclaimed register" error messages.
This can be reproduced by the IGT test mentioned below, but we still
get a FAIL when we run it.
Testcase: igt/kms_lip/flip-vs-panning-vs-hang
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
I didn't bisect to check, but it really really looks like a regression from
"drm/i915: add intel_display_power_enabled_sw() for use in atomic ctx".
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4d1357a..4d4b4bc 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11459,7 +11459,8 @@ intel_display_capture_error_state(struct drm_device *dev)
enum transcoder cpu_transcoder = transcoders[i];
error->transcoder[i].power_domain_on =
- intel_display_power_enabled_sw(dev, POWER_DOMAIN_PIPE(i));
+ intel_display_power_enabled_sw(dev,
+ POWER_DOMAIN_TRANSCODER(cpu_transcoder));
if (!error->transcoder[i].power_domain_on)
continue;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: avoid unclaimed registers when capturing the error state
2013-12-20 17:09 [PATCH] drm/i915: avoid unclaimed registers when capturing the error state Paulo Zanoni
@ 2014-01-07 14:07 ` Imre Deak
2014-06-02 13:35 ` Chris Wilson
1 sibling, 0 replies; 6+ messages in thread
From: Imre Deak @ 2014-01-07 14:07 UTC (permalink / raw)
To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni
[-- Attachment #1.1: Type: text/plain, Size: 1501 bytes --]
On Fri, 2013-12-20 at 15:09 -0200, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> We're iterating over the CPU transcoders, so check for the correct
> power domain.
>
> This fixes many "unclaimed register" error messages.
>
> This can be reproduced by the IGT test mentioned below, but we still
> get a FAIL when we run it.
>
> Testcase: igt/kms_lip/flip-vs-panning-vs-hang
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>
> I didn't bisect to check, but it really really looks like a regression from
> "drm/i915: add intel_display_power_enabled_sw() for use in atomic ctx".
Yep, that was an overlook on my part:/ The fix looks ok:
Reviewed-by: Imre Deak <imre.deak@intel.com>
>
>
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4d1357a..4d4b4bc 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11459,7 +11459,8 @@ intel_display_capture_error_state(struct drm_device *dev)
> enum transcoder cpu_transcoder = transcoders[i];
>
> error->transcoder[i].power_domain_on =
> - intel_display_power_enabled_sw(dev, POWER_DOMAIN_PIPE(i));
> + intel_display_power_enabled_sw(dev,
> + POWER_DOMAIN_TRANSCODER(cpu_transcoder));
> if (!error->transcoder[i].power_domain_on)
> continue;
>
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
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: avoid unclaimed registers when capturing the error state
2013-12-20 17:09 [PATCH] drm/i915: avoid unclaimed registers when capturing the error state Paulo Zanoni
2014-01-07 14:07 ` Imre Deak
@ 2014-06-02 13:35 ` Chris Wilson
2014-06-02 14:02 ` Imre Deak
1 sibling, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2014-06-02 13:35 UTC (permalink / raw)
To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni
On Fri, Dec 20, 2013 at 03:09:41PM -0200, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> We're iterating over the CPU transcoders, so check for the correct
> power domain.
>
> This fixes many "unclaimed register" error messages.
>
> This can be reproduced by the IGT test mentioned below, but we still
> get a FAIL when we run it.
>
> Testcase: igt/kms_lip/flip-vs-panning-vs-hang
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
This of course breaks error capture on every platform that doesn't use
rpm, and even then is spectacularly useless on those that do.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/i915: avoid unclaimed registers when capturing the error state
2014-06-02 13:35 ` Chris Wilson
@ 2014-06-02 14:02 ` Imre Deak
0 siblings, 0 replies; 6+ messages in thread
From: Imre Deak @ 2014-06-02 14:02 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 909 bytes --]
On Mon, 2014-06-02 at 14:35 +0100, Chris Wilson wrote:
> On Fri, Dec 20, 2013 at 03:09:41PM -0200, Paulo Zanoni wrote:
> > From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >
> > We're iterating over the CPU transcoders, so check for the correct
> > power domain.
> >
> > This fixes many "unclaimed register" error messages.
> >
> > This can be reproduced by the IGT test mentioned below, but we still
> > get a FAIL when we run it.
> >
> > Testcase: igt/kms_lip/flip-vs-panning-vs-hang
> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> This of course breaks error capture on every platform that doesn't use
> rpm, and even then is spectacularly useless on those that do.
It is broken atm, because of the bug in
intel_display_power_enabled_sw(). With that fixed these checks should
work everywhere, since POWER_DOMAIN_INIT is always held on platforms w/o
RPM.
--Imre
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
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] drm/i915: avoid unclaimed registers when capturing the error state
@ 2013-11-01 15:32 Paulo Zanoni
2013-11-01 18:28 ` Daniel Vetter
0 siblings, 1 reply; 6+ messages in thread
From: Paulo Zanoni @ 2013-11-01 15:32 UTC (permalink / raw)
To: intel-gfx; +Cc: Paulo Zanoni
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
Even though we only check for unclaimed registers while we're writing
registers, if we read a bad register we'll still trigger a CPU error
interrupt, and we'll print an "Unclaimed register" DRM_ERROR due to
that. To avoid this error, just avoid touching power domains that are
not enabled.
Use kzalloc so we're sure all the disabled domains will be zeroed on
the error state file. We already print the information that is enough
to discover if the power well is enabled on the error state file, so
this should not be a problem.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69747
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e841cd7..fba7d9b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11138,7 +11138,7 @@ intel_display_capture_error_state(struct drm_device *dev)
if (INTEL_INFO(dev)->num_pipes == 0)
return NULL;
- error = kmalloc(sizeof(*error), GFP_ATOMIC);
+ error = kzalloc(sizeof(*error), GFP_ATOMIC);
if (error == NULL)
return NULL;
@@ -11146,6 +11146,9 @@ intel_display_capture_error_state(struct drm_device *dev)
error->power_well_driver = I915_READ(HSW_PWR_WELL_DRIVER);
for_each_pipe(i) {
+ if (!intel_display_power_enabled(dev, POWER_DOMAIN_PIPE(i)))
+ continue;
+
if (INTEL_INFO(dev)->gen <= 6 || IS_VALLEYVIEW(dev)) {
error->cursor[i].control = I915_READ(CURCNTR(i));
error->cursor[i].position = I915_READ(CURPOS(i));
@@ -11179,6 +11182,10 @@ intel_display_capture_error_state(struct drm_device *dev)
for (i = 0; i < error->num_transcoders; i++) {
enum transcoder cpu_transcoder = transcoders[i];
+ if (!intel_display_power_enabled(dev,
+ POWER_DOMAIN_TRANSCODER(cpu_transcoder)))
+ continue;
+
error->transcoder[i].cpu_transcoder = cpu_transcoder;
error->transcoder[i].conf = I915_READ(PIPECONF(cpu_transcoder));
@@ -11190,12 +11197,6 @@ intel_display_capture_error_state(struct drm_device *dev)
error->transcoder[i].vsync = I915_READ(VSYNC(cpu_transcoder));
}
- /* In the code above we read the registers without checking if the power
- * well was on, so here we have to clear the FPGA_DBG_RM_NOCLAIM bit to
- * prevent the next I915_WRITE from detecting it and printing an error
- * message. */
- intel_uncore_clear_errors(dev);
-
return error;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] drm/i915: avoid unclaimed registers when capturing the error state
2013-11-01 15:32 Paulo Zanoni
@ 2013-11-01 18:28 ` Daniel Vetter
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2013-11-01 18:28 UTC (permalink / raw)
To: Paulo Zanoni; +Cc: intel-gfx, Paulo Zanoni
On Fri, Nov 01, 2013 at 01:32:08PM -0200, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>
> Even though we only check for unclaimed registers while we're writing
> registers, if we read a bad register we'll still trigger a CPU error
> interrupt, and we'll print an "Unclaimed register" DRM_ERROR due to
> that. To avoid this error, just avoid touching power domains that are
> not enabled.
>
> Use kzalloc so we're sure all the disabled domains will be zeroed on
> the error state file. We already print the information that is enough
> to discover if the power well is enabled on the error state file, so
> this should not be a problem.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69747
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-02 14:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-20 17:09 [PATCH] drm/i915: avoid unclaimed registers when capturing the error state Paulo Zanoni
2014-01-07 14:07 ` Imre Deak
2014-06-02 13:35 ` Chris Wilson
2014-06-02 14:02 ` Imre Deak
-- strict thread matches above, loose matches on Subject: below --
2013-11-01 15:32 Paulo Zanoni
2013-11-01 18:28 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox