[PATCH v2] drm/amdgpu:Add error message when register failed to reach expected value

Alex Deucher alexdeucher at gmail.com
Tue Sep 11 14:39:44 UTC 2018


On Mon, Sep 10, 2018 at 4:34 PM James Zhu <jzhums at gmail.com> wrote:
>
> Signed-off-by: James Zhu <James.Zhu at amd.com>

Acked-by: Alex Deucher <alexander.deucher at amd.com>

>
> Add error message when register failed to reach expected value, It will
> help discover potential issue.
> ---
>  drivers/gpu/drm/amd/amdgpu/soc15_common.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/soc15_common.h b/drivers/gpu/drm/amd/amdgpu/soc15_common.h
> index 0942f49..f5d6025 100644
> --- a/drivers/gpu/drm/amd/amdgpu/soc15_common.h
> +++ b/drivers/gpu/drm/amd/amdgpu/soc15_common.h
> @@ -56,6 +56,8 @@
>                         tmp_ = RREG32(adev->reg_offset[ip##_HWIP][inst][reg##_BASE_IDX] + reg); \
>                         loop--;                                 \
>                         if (!loop) {                            \
> +                               DRM_ERROR("Register(%d) [%s] failed to reach value 0x%08x != 0x%08x\n", \
> +                                                       inst, #reg, expected_value, (tmp_ & (mask))); \
>                                 ret = -ETIMEDOUT;               \
>                                 break;                          \
>                         }                                       \
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list