Re: [PATCH] drm/i915: Just clear the mmiodebug before a register access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:

> When we enable the per-register access mmiodebug, it is to detect which
> access is illegal. Reporting on earlier untraced access outside of the
> mmiodebug does not help debugging (as the suspicion is immediately put
> upon the current register which is not at fault)!
>

I think the original intent here was that if the unclaimed access was
before driver register access, it would be sometimes possible to assess
the real culprit by understanding what happened before this moment.

For example if it is before first register access after resume, you can blame
BIOS.

On the other hand we should have now the checks from and after
suspending in place so perhaps it is not worthwhile anymore to keep
reporting the prior unclaimed access in generic case.

However as the check also clears the unclaimed bit, we might
really squels some real problems with this change.

-Mika

> References: https://bugs.freedesktop.org/show_bug.cgi?id=97985
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_uncore.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index a9b6c936aadd..ee2306a79747 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -796,10 +796,9 @@ __unclaimed_reg_debug(struct drm_i915_private *dev_priv,
>  		      const bool read,
>  		      const bool before)
>  {
> -	if (WARN(check_for_unclaimed_mmio(dev_priv),
> -		 "Unclaimed register detected %s %s register 0x%x\n",
> -		 before ? "before" : "after",
> -		 read ? "reading" : "writing to",
> +	if (WARN(check_for_unclaimed_mmio(dev_priv) && !before,
> +		 "Unclaimed %s register 0x%x\n",
> +		 read ? "read from" : "write to",
>  		 i915_mmio_reg_offset(reg)))
>  		i915.mmio_debug--; /* Only report the first N failures */
>  }
> -- 
> 2.9.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux