[PATCH] drm/amdgpu: use adev_to_drm to get drm device

Christian König christian.koenig at amd.com
Thu Aug 25 08:13:32 UTC 2022


Am 25.08.22 um 09:48 schrieb Guchun Chen:
> adev_to_drm is used everywhere in amdgpu code, so modify
> it to keep consistency.
>
> Signed-off-by: Guchun Chen <guchun.chen at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> index 8ee4e8491f39..6ea8980c8ad7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> @@ -402,7 +402,7 @@ static void amdgpu_ctx_fini(struct kref *ref)
>   		}
>   	}
>   
> -	if (drm_dev_enter(&adev->ddev, &idx)) {
> +	if (drm_dev_enter(adev_to_drm(adev), &idx)) {
>   		amdgpu_ctx_set_stable_pstate(ctx, ctx->stable_pstate);
>   		drm_dev_exit(idx);
>   	}



More information about the amd-gfx mailing list