summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
diff options
context:
space:
mode:
authorSunil Khatri <sunil.khatri@amd.com>2024-10-01 11:35:14 +0530
committerAlex Deucher <alexander.deucher@amd.com>2024-10-07 14:03:25 -0400
commit58608034ed5090b7a4b7f1c040a67a53fe1dbbc6 (patch)
treecc79f96dae5b0c9ffaddc27c9b1f73f892e07023 /drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
parent7feb4f3ad8befa0850a576adaa32d57962bf82e5 (diff)
downloadlinux-58608034ed5090b7a4b7f1c040a67a53fe1dbbc6.tar.gz
linux-58608034ed5090b7a4b7f1c040a67a53fe1dbbc6.tar.bz2
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/amdgpu_vkms.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
index d876b407249d..2c810750f7d5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
@@ -555,9 +555,9 @@ static int amdgpu_vkms_sw_fini(struct amdgpu_ip_block *ip_block)
return 0;
}
-static int amdgpu_vkms_hw_init(void *handle)
+static int amdgpu_vkms_hw_init(struct amdgpu_ip_block *ip_block)
{
- struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+ struct amdgpu_device *adev = ip_block->adev;
switch (adev->asic_type) {
#ifdef CONFIG_DRM_AMDGPU_SI
@@ -618,13 +618,12 @@ static int amdgpu_vkms_suspend(struct amdgpu_ip_block *ip_block)
static int amdgpu_vkms_resume(struct amdgpu_ip_block *ip_block)
{
- struct amdgpu_device *adev = ip_block->adev;
int r;
- r = amdgpu_vkms_hw_init(adev);
+ r = amdgpu_vkms_hw_init(ip_block);
if (r)
return r;
- return drm_mode_config_helper_resume(adev_to_drm(adev));
+ return drm_mode_config_helper_resume(adev_to_drm(ip_block->adev));
}
static bool amdgpu_vkms_is_idle(void *handle)