Skip to content

Commit 82ae661

Browse files
amd-sukhatrialexdeucher
authored andcommitted
drm/amdgpu: update the handle ptr in wait_for_idle
Update the *handle to amdgpu_ip_block ptr for all functions pointers of wait_for_idle. 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>
1 parent ded57e4 commit 82ae661

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+219
-157
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ static bool acp_is_idle(void *handle)
590590
return true;
591591
}
592592

593-
static int acp_wait_for_idle(void *handle)
593+
static int acp_wait_for_idle(struct amdgpu_ip_block *ip_block)
594594
{
595595
return 0;
596596
}

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,7 @@ int amdgpu_device_ip_wait_for_idle(struct amdgpu_device *adev,
22042204
if (!adev->ip_blocks[i].status.valid)
22052205
continue;
22062206
if (adev->ip_blocks[i].version->type == block_type) {
2207-
r = adev->ip_blocks[i].version->funcs->wait_for_idle((void *)adev);
2207+
r = adev->ip_blocks[i].version->funcs->wait_for_idle(&adev->ip_blocks[i]);
22082208
if (r)
22092209
return r;
22102210
break;

drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static bool isp_is_idle(void *handle)
155155
return true;
156156
}
157157

158-
static int isp_wait_for_idle(void *handle)
158+
static int isp_wait_for_idle(struct amdgpu_ip_block *ip_block)
159159
{
160160
return 0;
161161
}

drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ static bool amdgpu_vkms_is_idle(void *handle)
632632
return true;
633633
}
634634

635-
static int amdgpu_vkms_wait_for_idle(void *handle)
635+
static int amdgpu_vkms_wait_for_idle(struct amdgpu_ip_block *ip_block)
636636
{
637637
return 0;
638638
}

drivers/gpu/drm/amd/amdgpu/cik.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2172,7 +2172,7 @@ static bool cik_common_is_idle(void *handle)
21722172
return true;
21732173
}
21742174

2175-
static int cik_common_wait_for_idle(void *handle)
2175+
static int cik_common_wait_for_idle(struct amdgpu_ip_block *ip_block)
21762176
{
21772177
return 0;
21782178
}

drivers/gpu/drm/amd/amdgpu/cik_ih.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,11 @@ static bool cik_ih_is_idle(void *handle)
362362
return true;
363363
}
364364

365-
static int cik_ih_wait_for_idle(void *handle)
365+
static int cik_ih_wait_for_idle(struct amdgpu_ip_block *ip_block)
366366
{
367367
unsigned i;
368368
u32 tmp;
369-
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
369+
struct amdgpu_device *adev = ip_block->adev;
370370

371371
for (i = 0; i < adev->usec_timeout; i++) {
372372
/* read MC_STATUS */

drivers/gpu/drm/amd/amdgpu/cik_sdma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,11 +1039,11 @@ static bool cik_sdma_is_idle(void *handle)
10391039
return true;
10401040
}
10411041

1042-
static int cik_sdma_wait_for_idle(void *handle)
1042+
static int cik_sdma_wait_for_idle(struct amdgpu_ip_block *ip_block)
10431043
{
10441044
unsigned i;
10451045
u32 tmp;
1046-
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
1046+
struct amdgpu_device *adev = ip_block->adev;
10471047

10481048
for (i = 0; i < adev->usec_timeout; i++) {
10491049
tmp = RREG32(mmSRBM_STATUS2) & (SRBM_STATUS2__SDMA_BUSY_MASK |

drivers/gpu/drm/amd/amdgpu/cz_ih.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,11 @@ static bool cz_ih_is_idle(void *handle)
358358
return true;
359359
}
360360

361-
static int cz_ih_wait_for_idle(void *handle)
361+
static int cz_ih_wait_for_idle(struct amdgpu_ip_block *ip_block)
362362
{
363363
unsigned i;
364364
u32 tmp;
365-
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
365+
struct amdgpu_device *adev = ip_block->adev;
366366

367367
for (i = 0; i < adev->usec_timeout; i++) {
368368
/* read MC_STATUS */

drivers/gpu/drm/amd/amdgpu/dce_v10_0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2948,7 +2948,7 @@ static bool dce_v10_0_is_idle(void *handle)
29482948
return true;
29492949
}
29502950

2951-
static int dce_v10_0_wait_for_idle(void *handle)
2951+
static int dce_v10_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
29522952
{
29532953
return 0;
29542954
}

drivers/gpu/drm/amd/amdgpu/dce_v11_0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3086,7 +3086,7 @@ static bool dce_v11_0_is_idle(void *handle)
30863086
return true;
30873087
}
30883088

3089-
static int dce_v11_0_wait_for_idle(void *handle)
3089+
static int dce_v11_0_wait_for_idle(struct amdgpu_ip_block *ip_block)
30903090
{
30913091
return 0;
30923092
}

0 commit comments

Comments
 (0)