mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
drm/amdgpu: update the handle ptr in post_soft_reset
Update the *handle to amdgpu_ip_block ptr for all functions pointers of post_soft_reset. 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:
parent
0ef2a1e7af
commit
e15ec812b5
|
|
@ -5070,7 +5070,7 @@ static int amdgpu_device_ip_post_soft_reset(struct amdgpu_device *adev)
|
|||
continue;
|
||||
if (adev->ip_blocks[i].status.hang &&
|
||||
adev->ip_blocks[i].version->funcs->post_soft_reset)
|
||||
r = adev->ip_blocks[i].version->funcs->post_soft_reset(adev);
|
||||
r = adev->ip_blocks[i].version->funcs->post_soft_reset(&adev->ip_blocks[i]);
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4931,12 +4931,13 @@ static bool gfx_v11_0_check_soft_reset(struct amdgpu_ip_block *ip_block)
|
|||
return false;
|
||||
}
|
||||
|
||||
static int gfx_v11_0_post_soft_reset(void *handle)
|
||||
static int gfx_v11_0_post_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
/**
|
||||
* GFX soft reset will impact MES, need resume MES when do GFX soft reset
|
||||
*/
|
||||
return amdgpu_mes_resume((struct amdgpu_device *)handle);
|
||||
return amdgpu_mes_resume(adev);
|
||||
}
|
||||
|
||||
static uint64_t gfx_v11_0_get_gpu_clock_counter(struct amdgpu_device *adev)
|
||||
|
|
|
|||
|
|
@ -5086,9 +5086,9 @@ static int gfx_v8_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int gfx_v8_0_post_soft_reset(void *handle)
|
||||
static int gfx_v8_0_post_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
u32 grbm_soft_reset = 0;
|
||||
|
||||
if ((!adev->gfx.grbm_soft_reset) &&
|
||||
|
|
|
|||
|
|
@ -1361,9 +1361,9 @@ static int gmc_v8_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int gmc_v8_0_post_soft_reset(void *handle)
|
||||
static int gmc_v8_0_post_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (!adev->gmc.srbm_soft_reset)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1271,9 +1271,9 @@ static int sdma_v3_0_pre_soft_reset(struct amdgpu_ip_block *ip_block)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int sdma_v3_0_post_soft_reset(void *handle)
|
||||
static int sdma_v3_0_post_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
u32 srbm_soft_reset = 0;
|
||||
|
||||
if (!adev->sdma.srbm_soft_reset)
|
||||
|
|
|
|||
|
|
@ -415,9 +415,9 @@ static int tonga_ih_pre_soft_reset(struct amdgpu_ip_block *ip_block)
|
|||
return tonga_ih_hw_fini(adev);
|
||||
}
|
||||
|
||||
static int tonga_ih_post_soft_reset(void *handle)
|
||||
static int tonga_ih_post_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (!adev->irq.srbm_soft_reset)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1226,9 +1226,9 @@ static int uvd_v6_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvd_v6_0_post_soft_reset(void *handle)
|
||||
static int uvd_v6_0_post_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (!adev->uvd.inst->srbm_soft_reset)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1548,9 +1548,9 @@ static int uvd_v7_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int uvd_v7_0_post_soft_reset(void *handle)
|
||||
static int uvd_v7_0_post_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (!adev->uvd.inst[ring->me].srbm_soft_reset)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -712,9 +712,9 @@ static int vce_v3_0_pre_soft_reset(struct amdgpu_ip_block *ip_block)
|
|||
}
|
||||
|
||||
|
||||
static int vce_v3_0_post_soft_reset(void *handle)
|
||||
static int vce_v3_0_post_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (!adev->vce.srbm_soft_reset)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -806,9 +806,9 @@ static int vce_v4_0_pre_soft_reset(struct amdgpu_ip_block *ip_block)
|
|||
}
|
||||
|
||||
|
||||
static int vce_v4_0_post_soft_reset(void *handle)
|
||||
static int vce_v4_0_post_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (!adev->vce.srbm_soft_reset)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ struct amd_ip_funcs {
|
|||
bool (*check_soft_reset)(struct amdgpu_ip_block *ip_block);
|
||||
int (*pre_soft_reset)(struct amdgpu_ip_block *ip_block);
|
||||
int (*soft_reset)(struct amdgpu_ip_block *ip_block);
|
||||
int (*post_soft_reset)(void *handle);
|
||||
int (*post_soft_reset)(struct amdgpu_ip_block *ip_block);
|
||||
int (*set_clockgating_state)(void *handle,
|
||||
enum amd_clockgating_state state);
|
||||
int (*set_powergating_state)(void *handle,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user