diff options
author | Sunil Khatri <sunil.khatri@amd.com> | 2024-10-01 11:35:14 +0530 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-10-07 14:03:25 -0400 |
commit | 58608034ed5090b7a4b7f1c040a67a53fe1dbbc6 (patch) | |
tree | cc79f96dae5b0c9ffaddc27c9b1f73f892e07023 /drivers/gpu/drm/amd/amdgpu/tonga_ih.c | |
parent | 7feb4f3ad8befa0850a576adaa32d57962bf82e5 (diff) |
drm/amdgpu: update the handle ptr in hw_init
Update the *handle to amdgpu_ip_block ptr for all
functions pointers of hw_init.
Also update the ip_block ptr where ever needed as
there were cyclic dependency of hw_init on resume.
v2: squash in isp fix
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/tonga_ih.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c index c63044187954..b4fa3c74cb43 100644 --- a/drivers/gpu/drm/amd/amdgpu/tonga_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/tonga_ih.c @@ -324,10 +324,10 @@ static int tonga_ih_sw_fini(struct amdgpu_ip_block *ip_block) return 0; } -static int tonga_ih_hw_init(void *handle) +static int tonga_ih_hw_init(struct amdgpu_ip_block *ip_block) { int r; - struct amdgpu_device *adev = (struct amdgpu_device *)handle; + struct amdgpu_device *adev = ip_block->adev; r = tonga_ih_irq_init(adev); if (r) @@ -354,9 +354,7 @@ static int tonga_ih_suspend(struct amdgpu_ip_block *ip_block) static int tonga_ih_resume(struct amdgpu_ip_block *ip_block) { - struct amdgpu_device *adev = ip_block->adev; - - return tonga_ih_hw_init(adev); + return tonga_ih_hw_init(ip_block); } static bool tonga_ih_is_idle(void *handle) @@ -422,7 +420,7 @@ static int tonga_ih_post_soft_reset(struct amdgpu_ip_block *ip_block) if (!adev->irq.srbm_soft_reset) return 0; - return tonga_ih_hw_init(adev); + return tonga_ih_hw_init(ip_block); } static int tonga_ih_soft_reset(struct amdgpu_ip_block *ip_block) |