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>
This commit is contained in:
Sunil Khatri
2024-10-01 11:35:14 +05:30
committed by Alex Deucher
parent 7feb4f3ad8
commit 58608034ed
85 changed files with 305 additions and 395 deletions

View File

@@ -49,17 +49,11 @@ static int isp_sw_fini(struct amdgpu_ip_block *ip_block)
* @handle: handle for amdgpu_device pointer
*
*/
static int isp_hw_init(void *handle)
static int isp_hw_init(struct amdgpu_ip_block *ip_block)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct amdgpu_device *adev = ip_block->adev;
struct amdgpu_isp *isp = &adev->isp;
const struct amdgpu_ip_block *ip_block =
amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_ISP);
if (!ip_block)
return -EINVAL;
if (isp->funcs->hw_init != NULL)
return isp->funcs->hw_init(isp);