aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/si_dma.c
diff options
context:
space:
mode:
authorSunil Khatri <[email protected]>2024-10-02 05:50:58 +0000
committerAlex Deucher <[email protected]>2024-10-07 18:03:25 +0000
commit692d2cd180e04805ea46e2721e24504d8d9ee28a (patch)
tree6b74dbb417ef54bd46125cdf9250c6bc59de5295 /drivers/gpu/drm/amd/amdgpu/si_dma.c
parentdrm/amdgpu: update the handle ptr in hw_init (diff)
downloadkernel-692d2cd180e04805ea46e2721e24504d8d9ee28a.tar.gz
kernel-692d2cd180e04805ea46e2721e24504d8d9ee28a.zip
drm/amdgpu: update the handle ptr in hw_fini
Update the *handle to amdgpu_ip_block ptr for all functions pointers of hw_fini. Also update the ip_block ptr where ever needed as there were cyclic dependency of hw_fini on suspend and some followed clean up. Signed-off-by: Sunil Khatri <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/si_dma.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/si_dma.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c b/drivers/gpu/drm/amd/amdgpu/si_dma.c
index 68e7572b4a90..d44483ed3363 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dma.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c
@@ -524,20 +524,16 @@ static int si_dma_hw_init(struct amdgpu_ip_block *ip_block)
return si_dma_start(adev);
}
-static int si_dma_hw_fini(void *handle)
+static int si_dma_hw_fini(struct amdgpu_ip_block *ip_block)
{
- struct amdgpu_device *adev = (struct amdgpu_device *)handle;
-
- si_dma_stop(adev);
+ si_dma_stop(ip_block->adev);
return 0;
}
static int si_dma_suspend(struct amdgpu_ip_block *ip_block)
{
- struct amdgpu_device *adev = ip_block->adev;
-
- return si_dma_hw_fini(adev);
+ return si_dma_hw_fini(ip_block);
}
static int si_dma_resume(struct amdgpu_ip_block *ip_block)