diff options
author | Sunil Khatri <sunil.khatri@amd.com> | 2024-10-02 11:20:58 +0530 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-10-07 14:03:25 -0400 |
commit | 692d2cd180e04805ea46e2721e24504d8d9ee28a (patch) | |
tree | 6b74dbb417ef54bd46125cdf9250c6bc59de5295 /drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | |
parent | 58608034ed5090b7a4b7f1c040a67a53fe1dbbc6 (diff) | |
download | linux-692d2cd180e04805ea46e2721e24504d8d9ee28a.tar.gz linux-692d2cd180e04805ea46e2721e24504d8d9ee28a.tar.bz2 linux-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 <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c index 68f90aab45d9..dc25fcb89b13 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c @@ -3603,9 +3603,9 @@ static int gfx_v12_0_hw_init(struct amdgpu_ip_block *ip_block) return r; } -static int gfx_v12_0_hw_fini(void *handle) +static int gfx_v12_0_hw_fini(struct amdgpu_ip_block *ip_block) { - struct amdgpu_device *adev = (struct amdgpu_device *)handle; + struct amdgpu_device *adev = ip_block->adev; uint32_t tmp; amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0); @@ -3645,9 +3645,7 @@ static int gfx_v12_0_hw_fini(void *handle) static int gfx_v12_0_suspend(struct amdgpu_ip_block *ip_block) { - struct amdgpu_device *adev = ip_block->adev; - - return gfx_v12_0_hw_fini(adev); + return gfx_v12_0_hw_fini(ip_block); } static int gfx_v12_0_resume(struct amdgpu_ip_block *ip_block) |