drm/amdgpu: update the handle ptr in prepare_suspend

Update the *handle to amdgpu_ip_block ptr for all
functions pointers of prepare_suspend.

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-09-30 14:11:22 +05:30 committed by Alex Deucher
parent 47d827f9c7
commit 94b2e07ad4
7 changed files with 12 additions and 12 deletions

View File

@ -4745,7 +4745,7 @@ int amdgpu_device_prepare(struct drm_device *dev)
continue;
if (!adev->ip_blocks[i].version->funcs->prepare_suspend)
continue;
r = adev->ip_blocks[i].version->funcs->prepare_suspend((void *)adev);
r = adev->ip_blocks[i].version->funcs->prepare_suspend(&adev->ip_blocks[i]);
if (r)
goto unprepare;
}

View File

@ -704,9 +704,9 @@ static int uvd_v3_1_hw_fini(void *handle)
return 0;
}
static int uvd_v3_1_prepare_suspend(void *handle)
static int uvd_v3_1_prepare_suspend(struct amdgpu_ip_block *ip_block)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct amdgpu_device *adev = ip_block->adev;
return amdgpu_uvd_prepare_suspend(adev);
}

View File

@ -218,9 +218,9 @@ static int uvd_v4_2_hw_fini(void *handle)
return 0;
}
static int uvd_v4_2_prepare_suspend(void *handle)
static int uvd_v4_2_prepare_suspend(struct amdgpu_ip_block *ip_block)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct amdgpu_device *adev = ip_block->adev;
return amdgpu_uvd_prepare_suspend(adev);
}

View File

@ -216,9 +216,9 @@ static int uvd_v5_0_hw_fini(void *handle)
return 0;
}
static int uvd_v5_0_prepare_suspend(void *handle)
static int uvd_v5_0_prepare_suspend(struct amdgpu_ip_block *ip_block)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct amdgpu_device *adev = ip_block->adev;
return amdgpu_uvd_prepare_suspend(adev);
}

View File

@ -540,9 +540,9 @@ static int uvd_v6_0_hw_fini(void *handle)
return 0;
}
static int uvd_v6_0_prepare_suspend(void *handle)
static int uvd_v6_0_prepare_suspend(struct amdgpu_ip_block *ip_block)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct amdgpu_device *adev = ip_block->adev;
return amdgpu_uvd_prepare_suspend(adev);
}

View File

@ -608,9 +608,9 @@ static int uvd_v7_0_hw_fini(void *handle)
return 0;
}
static int uvd_v7_0_prepare_suspend(void *handle)
static int uvd_v7_0_prepare_suspend(struct amdgpu_ip_block *ip_block)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct amdgpu_device *adev = ip_block->adev;
return amdgpu_uvd_prepare_suspend(adev);
}

View File

@ -387,7 +387,7 @@ struct amd_ip_funcs {
int (*hw_init)(void *handle);
int (*hw_fini)(void *handle);
void (*late_fini)(struct amdgpu_ip_block *ip_block);
int (*prepare_suspend)(void *handle);
int (*prepare_suspend)(struct amdgpu_ip_block *ip_block);
int (*suspend)(void *handle);
int (*resume)(void *handle);
bool (*is_idle)(void *handle);