Re: [PATCH] drm/radeon: only print meaningful VM faults

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

 



On Mon, Jul 7, 2014 at 5:16 AM, Christian König <deathsimple@xxxxxxxxxxx> wrote:
> From: Christian König <christian.koenig@xxxxxxx>
>
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>


Applied to my -fixes tree.

Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/cik.c       | 6 ++++--
>  drivers/gpu/drm/radeon/evergreen.c | 6 ++++--
>  drivers/gpu/drm/radeon/si.c        | 6 ++++--
>  3 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
> index dcd4518..0b24711 100644
> --- a/drivers/gpu/drm/radeon/cik.c
> +++ b/drivers/gpu/drm/radeon/cik.c
> @@ -7676,14 +7676,16 @@ restart_ih:
>                         addr = RREG32(VM_CONTEXT1_PROTECTION_FAULT_ADDR);
>                         status = RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS);
>                         mc_client = RREG32(VM_CONTEXT1_PROTECTION_FAULT_MCCLIENT);
> +                       /* reset addr and status */
> +                       WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
> +                       if (addr == 0x0 && status == 0x0)
> +                               break;
>                         dev_err(rdev->dev, "GPU fault detected: %d 0x%08x\n", src_id, src_data);
>                         dev_err(rdev->dev, "  VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x%08X\n",
>                                 addr);
>                         dev_err(rdev->dev, "  VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
>                                 status);
>                         cik_vm_decode_fault(rdev, status, addr, mc_client);
> -                       /* reset addr and status */
> -                       WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
>                         break;
>                 case 167: /* VCE */
>                         DRM_DEBUG("IH: VCE int: 0x%08x\n", src_data);
> diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
> index e2f6052..d5d4d3a 100644
> --- a/drivers/gpu/drm/radeon/evergreen.c
> +++ b/drivers/gpu/drm/radeon/evergreen.c
> @@ -5066,14 +5066,16 @@ restart_ih:
>                 case 147:
>                         addr = RREG32(VM_CONTEXT1_PROTECTION_FAULT_ADDR);
>                         status = RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS);
> +                       /* reset addr and status */
> +                       WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
> +                       if (addr == 0x0 && status == 0x0)
> +                               break;
>                         dev_err(rdev->dev, "GPU fault detected: %d 0x%08x\n", src_id, src_data);
>                         dev_err(rdev->dev, "  VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x%08X\n",
>                                 addr);
>                         dev_err(rdev->dev, "  VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
>                                 status);
>                         cayman_vm_decode_fault(rdev, status, addr);
> -                       /* reset addr and status */
> -                       WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
>                         break;
>                 case 176: /* CP_INT in ring buffer */
>                 case 177: /* CP_INT in IB1 */
> diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
> index 730cee2..eba0225 100644
> --- a/drivers/gpu/drm/radeon/si.c
> +++ b/drivers/gpu/drm/radeon/si.c
> @@ -6376,14 +6376,16 @@ restart_ih:
>                 case 147:
>                         addr = RREG32(VM_CONTEXT1_PROTECTION_FAULT_ADDR);
>                         status = RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS);
> +                       /* reset addr and status */
> +                       WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
> +                       if (addr == 0x0 && status == 0x0)
> +                               break;
>                         dev_err(rdev->dev, "GPU fault detected: %d 0x%08x\n", src_id, src_data);
>                         dev_err(rdev->dev, "  VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x%08X\n",
>                                 addr);
>                         dev_err(rdev->dev, "  VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
>                                 status);
>                         si_vm_decode_fault(rdev, status, addr);
> -                       /* reset addr and status */
> -                       WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
>                         break;
>                 case 176: /* RINGID0 CP_INT */
>                         radeon_fence_process(rdev, RADEON_RING_TYPE_GFX_INDEX);
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux