[PATCH] drm/amdgpu: Avoid RAS recovery init when no RAS support.
Zhang, Hawking
Hawking.Zhang at amd.com
Mon Sep 9 14:51:33 UTC 2019
Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>
Regards,
Hawking
Sent from my iPhone
> On Sep 9, 2019, at 10:49, Andrey Grodzovsky <andrey.grodzovsky at amd.com> wrote:
>
> Fixes driver load regression on APUs.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index d2437e1..119bedc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1494,9 +1494,14 @@ static int amdgpu_ras_release_bad_pages(struct amdgpu_device *adev)
> int amdgpu_ras_recovery_init(struct amdgpu_device *adev)
> {
> struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
> - struct ras_err_handler_data **data = &con->eh_data;
> + struct ras_err_handler_data **data;
> int ret;
>
> + if (con)
> + data = &con->eh_data;
> + else
> + return 0;
> +
> *data = kmalloc(sizeof(**data), GFP_KERNEL | __GFP_ZERO);
> if (!*data) {
> ret = -ENOMEM;
> --
> 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