diff options
author | Sunil Khatri <sunil.khatri@amd.com> | 2024-10-01 08:05:14 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-10-07 20:03:25 +0200 |
commit | 58608034ed5090b7a4b7f1c040a67a53fe1dbbc6 (patch) | |
tree | cc79f96dae5b0c9ffaddc27c9b1f73f892e07023 /drivers/gpu/drm/amd/amdgpu/si.c | |
parent | drm/amdgpu: update the handle ptr in resume (diff) | |
download | linux-58608034ed5090b7a4b7f1c040a67a53fe1dbbc6.tar.xz linux-58608034ed5090b7a4b7f1c040a67a53fe1dbbc6.zip |
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/si.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/si.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c index 0fc303843493..8b0cad1dfad6 100644 --- a/drivers/gpu/drm/amd/amdgpu/si.c +++ b/drivers/gpu/drm/amd/amdgpu/si.c @@ -2633,9 +2633,9 @@ static void si_fix_pci_max_read_req_size(struct amdgpu_device *adev) pcie_set_readrq(adev->pdev, 512); } -static int si_common_hw_init(void *handle) +static int si_common_hw_init(struct amdgpu_ip_block *ip_block) { - struct amdgpu_device *adev = (struct amdgpu_device *)handle; + struct amdgpu_device *adev = ip_block->adev; si_fix_pci_max_read_req_size(adev); si_init_golden_registers(adev); @@ -2659,9 +2659,7 @@ static int si_common_suspend(struct amdgpu_ip_block *ip_block) static int si_common_resume(struct amdgpu_ip_block *ip_block) { - struct amdgpu_device *adev = ip_block->adev; - - return si_common_hw_init(adev); + return si_common_hw_init(ip_block); } static bool si_common_is_idle(void *handle) |