[PATCH] drm/amdgpu: fix buffer funcs setting order on suspend

Luben Tuikov ltuikov89 at gmail.com
Tue Dec 5 23:34:15 UTC 2023


On 2023-12-04 09:13, Alex Deucher wrote:
> We need to disable this after the last eviction
> call, but before we disable the SDMA IP.
> 
> Fixes: b70438004a14 ("drm/amdgpu: move buffer funcs setting up a level")
> Link: https://lore.kernel.org/r/87edgv4x3i.fsf@vps.thesusis.net
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> Cc: Phillip Susi <phill at thesusis.net>
> Cc: Luben Tuikov <ltuikov89 at gmail.com>

Thank you Alex for this patch and thank you Phillip for testing it!
(Let's also add a Tested-by tag.)

Reviewed-by: Luben Tuikov <ltuikov89 at gmail.com>

Regards,
Luben

> ---
>  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 f29d0faf956e..b76ec5ec04c5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -4593,8 +4593,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
>  
>  	amdgpu_ras_suspend(adev);
>  
> -	amdgpu_ttm_set_buffer_funcs_status(adev, false);
> -
>  	amdgpu_device_ip_suspend_phase1(adev);
>  
>  	if (!adev->in_s0ix)
> @@ -4604,6 +4602,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
>  	if (r)
>  		return r;
>  
> +	amdgpu_ttm_set_buffer_funcs_status(adev, false);
> +
>  	amdgpu_fence_driver_hw_fini(adev);
>  
>  	amdgpu_device_ip_suspend_phase2(adev);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x4C15479431A334AF.asc
Type: application/pgp-keys
Size: 664 bytes
Desc: OpenPGP public key
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20231205/711a0018/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20231205/711a0018/attachment.sig>


More information about the amd-gfx mailing list