[PATCH 2/2] drm/amdgpu: use drm_device pointer directly rather than convert again

Christian König ckoenig.leichtzumerken at gmail.com
Fri Mar 10 07:04:51 UTC 2023


Am 10.03.23 um 06:04 schrieb Guchun Chen:
> The convert from adev is redundant.
>
> 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_device.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 41ef3368556b..2937912b7757 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -5575,7 +5575,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev)
>   	struct amdgpu_device *adev = drm_to_adev(dev);
>   	struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
>   
> -	if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
> +	if (!amdgpu_device_supports_baco(dev))
>   		return -ENOTSUPP;
>   
>   	if (ras && adev->ras_enabled &&
> @@ -5591,7 +5591,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev)
>   	struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
>   	int ret = 0;
>   
> -	if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
> +	if (!amdgpu_device_supports_baco(dev))
>   		return -ENOTSUPP;
>   
>   	ret = amdgpu_dpm_baco_exit(adev);



More information about the amd-gfx mailing list