<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 30, 2014 at 11:09 AM, Paulo Zanoni <span dir="ltr"><<a href="mailto:przanoni@gmail.com" target="_blank">przanoni@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2014-07-28 12:19 GMT-03:00 Rodrigo Vivi <<a href="mailto:rodrigo.vivi@intel.com">rodrigo.vivi@intel.com</a>>:<br>

<div><div class="h5">> BDW has many other Display Engine interrupts and GT interrupts registers.<br>
> Collecting it properly on gpu_error_state.<br>
><br>
> On debugfs all was properly listed already but besides we were also listing old<br>
> DEIER and GTIER that doesn't exist on BDW anymore. This was causing<br>
> unclaimed register messages:<br>
><br>
> <a href="https://bugs.freedesktop.org/show_bug.cgi?id=81701" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=81701</a><br>
><br>
> Cc: Paulo Zanoni <<a href="mailto:paulo.r.zanoni@intel.com">paulo.r.zanoni@intel.com</a>><br>
> Signed-off-by: Rodrigo Vivi <<a href="mailto:rodrigo.vivi@intel.com">rodrigo.vivi@intel.com</a>><br>
> ---<br>
>  drivers/gpu/drm/i915/i915_debugfs.c   |  2 +-<br>
>  drivers/gpu/drm/i915/i915_drv.h       |  4 +++-<br>
>  drivers/gpu/drm/i915/i915_gpu_error.c | 23 ++++++++++++++++++++---<br>
>  3 files changed, 24 insertions(+), 5 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c<br>
> index 9e737b7..679cda6 100644<br>
> --- a/drivers/gpu/drm/i915/i915_debugfs.c<br>
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c<br>
> @@ -783,7 +783,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data)<br>
>                         seq_printf(m, "Pipe %c stat:         %08x\n",<br>
>                                    pipe_name(pipe),<br>
>                                    I915_READ(PIPESTAT(pipe)));<br>
> -       } else {<br>
> +       } else if (!IS_BROADWELL(dev)) {<br>
>                 seq_printf(m, "North Display Interrupt enable:          %08x\n",<br>
>                            I915_READ(DEIER));<br>
>                 seq_printf(m, "North Display Interrupt identity:        %08x\n",<br>
<br>
</div></div>This chunk is not needed since we already have a check for "gen >= 8"<br>
at the top.<br></blockquote><div><br></div><div>oh, for a moment I thought it was messy as the other code and it was writing twice...</div><div>mainly when you mentioned that you could reproduce the unclaimed when reading debugfs...</div>
<div>but probably was related to the powerwell you mentioned below...</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5"><br>
<br>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h<br>
> index ccb97f1..ee28cd7 100644<br>
> --- a/drivers/gpu/drm/i915/i915_drv.h<br>
> +++ b/drivers/gpu/drm/i915/i915_drv.h<br>
> @@ -314,7 +314,9 @@ struct drm_i915_error_state {<br>
>         u32 eir;<br>
>         u32 pgtbl_er;<br>
>         u32 ier;<br>
> -       u32 gtier;<br>
> +       u32 gtier[4];<br>
> +       u32 deier[3];<br>
> +       u32 de_misc_ier;<br>
>         u32 ccid;<br>
>         u32 derrmr;<br>
>         u32 forcewake;<br>
> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c<br>
> index 372fea3..f865d1d 100644<br>
> --- a/drivers/gpu/drm/i915/i915_gpu_error.c<br>
> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c<br>
> @@ -358,9 +358,19 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,<br>
>         err_printf(m, "Suspend count: %u\n", error->suspend_count);<br>
>         err_printf(m, "PCI ID: 0x%04x\n", dev->pdev->device);<br>
>         err_printf(m, "EIR: 0x%08x\n", error->eir);<br>
> -       err_printf(m, "IER: 0x%08x\n", error->ier);<br>
> +       if (IS_BROADWELL(dev)) {<br>
> +               for_each_pipe(i)<br>
> +                       err_printf(m, "DEIER pipe %c: 0x%08x\n", pipe_name(i),<br>
> +                                  error->deier[i]);<br>
> +               for (i = 0; i < 4; i++)<br>
> +                       err_printf(m, "GTIER gt %d: 0x%08x\n", i,<br>
> +                                  error->gtier[i]);<br>
> +               err_printf(m, "DE_MISC_IER: 0x%08x\n", error->de_misc_ier);<br>
> +       } else {<br>
> +               err_printf(m, "IER: 0x%08x\n", error->ier);<br>
> +       }<br>
>         if (IS_HASWELL(dev))<br>
> -               err_printf(m, "GTIER: 0x%08x\n", error->gtier);<br>
> +               err_printf(m, "GTIER: 0x%08x\n", error->gtier[0]);<br>
>         err_printf(m, "PGTBL_ER: 0x%08x\n", error->pgtbl_er);<br>
>         err_printf(m, "FORCEWAKE: 0x%08x\n", error->forcewake);<br>
>         err_printf(m, "DERRMR: 0x%08x\n", error->derrmr);<br>
> @@ -1093,6 +1103,7 @@ static void i915_capture_reg_state(struct drm_i915_private *dev_priv,<br>
>                                    struct drm_i915_error_state *error)<br>
>  {<br>
>         struct drm_device *dev = dev_priv->dev;<br>
> +       int i;<br>
><br>
>         /* General organization<br>
>          * 1. Registers specific to a single generation<br>
> @@ -1139,7 +1150,13 @@ static void i915_capture_reg_state(struct drm_i915_private *dev_priv,<br>
><br>
>         if (IS_HASWELL(dev)) {<br>
>                 error->ier = I915_READ(DEIER);<br>
> -               error->gtier = I915_READ(GTIER);<br>
> +               error->gtier[0] = I915_READ(GTIER);<br>
> +       } else if (IS_BROADWELL(dev)) {<br>
> +               for_each_pipe(i)<br>
> +                       error->deier[i] = I915_READ(GEN8_DE_PIPE_IER(i));<br>
<br>
</div></div>for_each_pipe(i)<br>
        if (intel_display_power_enabled(dev_priv, POWER_DOMAIN_PIPE(i)))<br>
<div class="">            error->deier[i] = I915_READ(GEN8_DE_PIPE_IER(i));<br>
<br>
</div>If the pipe's power well is disabled, the IER register is powered off<br>
and we can get an unclaimed register errors too.<br></blockquote><div><br></div><div>thanks! I'll add it...</div><div>Also also need to be added to debugfs interface.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
I also just noticed that this function contains the "/* 4: Everything<br>
else */" comment twice. You could remove one :)<br></blockquote><div><br></div><div>indeed.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class=""><br>
<br>
> +               for (i = 0; i < 4; i++)<br>
</div>> +                       error->gtier[3] = I915_READ(GEN8_GT_IER(i));<br>
<div class="im HOEnZb">> +               error->de_misc_ier = I915_READ(GEN8_DE_MISC_IER);<br>
>         } else if (HAS_PCH_SPLIT(dev)) {<br>
>                 error->ier = I915_READ(DEIER) | I915_READ(GTIER);<br>
>         } else if (IS_GEN2(dev)) {<br>
> --<br>
> 1.9.3<br>
><br>
> _______________________________________________<br>
> Intel-gfx mailing list<br>
> <a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br>
<br>
<br>
<br>
</div><span class="HOEnZb"><font color="#888888">--<br>
Paulo Zanoni<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Intel-gfx mailing list<br>
<a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Rodrigo Vivi</div><div>Blog: <a href="http://blog.vivi.eng.br" target="_blank">http://blog.vivi.eng.br</a></div><div> </div>
</div></div>