drm/amdgpu: update the handle ptr in soft_reset
Update the *handle to amdgpu_ip_block ptr for all functions pointers of 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
e47cb9d253
commit
0ef2a1e7af
@ -595,7 +595,7 @@ static int acp_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int acp_soft_reset(void *handle)
|
||||
static int acp_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -5041,7 +5041,7 @@ static int amdgpu_device_ip_soft_reset(struct amdgpu_device *adev)
|
||||
continue;
|
||||
if (adev->ip_blocks[i].status.hang &&
|
||||
adev->ip_blocks[i].version->funcs->soft_reset) {
|
||||
r = adev->ip_blocks[i].version->funcs->soft_reset(adev);
|
||||
r = adev->ip_blocks[i].version->funcs->soft_reset(&adev->ip_blocks[i]);
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ static int isp_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int isp_soft_reset(void *handle)
|
||||
static int isp_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -637,7 +637,7 @@ static int amdgpu_vkms_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int amdgpu_vkms_soft_reset(void *handle)
|
||||
static int amdgpu_vkms_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2177,7 +2177,7 @@ static int cik_common_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cik_common_soft_reset(void *handle)
|
||||
static int cik_common_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* XXX hard reset?? */
|
||||
return 0;
|
||||
|
||||
@ -378,9 +378,9 @@ static int cik_ih_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int cik_ih_soft_reset(void *handle)
|
||||
static int cik_ih_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;
|
||||
u32 tmp = RREG32(mmSRBM_STATUS);
|
||||
|
||||
@ -54,7 +54,7 @@ static void cik_sdma_set_ring_funcs(struct amdgpu_device *adev);
|
||||
static void cik_sdma_set_irq_funcs(struct amdgpu_device *adev);
|
||||
static void cik_sdma_set_buffer_funcs(struct amdgpu_device *adev);
|
||||
static void cik_sdma_set_vm_pte_funcs(struct amdgpu_device *adev);
|
||||
static int cik_sdma_soft_reset(void *handle);
|
||||
static int cik_sdma_soft_reset(struct amdgpu_ip_block *ip_block);
|
||||
|
||||
MODULE_FIRMWARE("amdgpu/bonaire_sdma.bin");
|
||||
MODULE_FIRMWARE("amdgpu/bonaire_sdma1.bin");
|
||||
@ -1056,10 +1056,10 @@ static int cik_sdma_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int cik_sdma_soft_reset(void *handle)
|
||||
static int cik_sdma_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 srbm_soft_reset = 0;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
u32 tmp;
|
||||
|
||||
/* sdma0 */
|
||||
|
||||
@ -374,10 +374,10 @@ static int cz_ih_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int cz_ih_soft_reset(void *handle)
|
||||
static int cz_ih_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 srbm_soft_reset = 0;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
u32 tmp = RREG32(mmSRBM_STATUS);
|
||||
|
||||
if (tmp & SRBM_STATUS__IH_BUSY_MASK)
|
||||
|
||||
@ -2960,10 +2960,10 @@ static bool dce_v10_0_check_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
return dce_v10_0_is_display_hung(adev);
|
||||
}
|
||||
|
||||
static int dce_v10_0_soft_reset(void *handle)
|
||||
static int dce_v10_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 srbm_soft_reset = 0, tmp;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (dce_v10_0_is_display_hung(adev))
|
||||
srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_DC_MASK;
|
||||
|
||||
@ -3091,10 +3091,10 @@ static int dce_v11_0_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dce_v11_0_soft_reset(void *handle)
|
||||
static int dce_v11_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 srbm_soft_reset = 0, tmp;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (dce_v11_0_is_display_hung(adev))
|
||||
srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_DC_MASK;
|
||||
|
||||
@ -2848,7 +2848,7 @@ static int dce_v6_0_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dce_v6_0_soft_reset(void *handle)
|
||||
static int dce_v6_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
DRM_INFO("xxxx: dce_v6_0_soft_reset --- no impl!!\n");
|
||||
return 0;
|
||||
|
||||
@ -2871,10 +2871,10 @@ static int dce_v8_0_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dce_v8_0_soft_reset(void *handle)
|
||||
static int dce_v8_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 srbm_soft_reset = 0, tmp;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
if (dce_v8_0_is_display_hung(adev))
|
||||
srbm_soft_reset |= SRBM_SOFT_RESET__SOFT_RESET_DC_MASK;
|
||||
|
||||
@ -7495,11 +7495,11 @@ static int gfx_v10_0_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int gfx_v10_0_soft_reset(void *handle)
|
||||
static int gfx_v10_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 grbm_soft_reset = 0;
|
||||
u32 tmp;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
/* GRBM_STATUS */
|
||||
tmp = RREG32_SOC15(GC, 0, mmGRBM_STATUS);
|
||||
|
||||
@ -4776,12 +4776,12 @@ int gfx_v11_0_request_gfx_index_mutex(struct amdgpu_device *adev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gfx_v11_0_soft_reset(void *handle)
|
||||
static int gfx_v11_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 grbm_soft_reset = 0;
|
||||
u32 tmp;
|
||||
int r, i, j, k;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
amdgpu_gfx_rlc_enter_safe_mode(adev, 0);
|
||||
|
||||
|
||||
@ -3190,7 +3190,7 @@ static int gfx_v6_0_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int gfx_v6_0_soft_reset(void *handle)
|
||||
static int gfx_v6_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4540,11 +4540,11 @@ static int gfx_v7_0_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int gfx_v7_0_soft_reset(void *handle)
|
||||
static int gfx_v7_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 grbm_soft_reset = 0, srbm_soft_reset = 0;
|
||||
u32 tmp;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
/* GRBM_STATUS */
|
||||
tmp = RREG32(mmGRBM_STATUS);
|
||||
|
||||
@ -5024,9 +5024,9 @@ static int gfx_v8_0_pre_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gfx_v8_0_soft_reset(void *handle)
|
||||
static int gfx_v8_0_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, srbm_soft_reset = 0;
|
||||
u32 tmp;
|
||||
|
||||
|
||||
@ -4108,11 +4108,11 @@ static int gfx_v9_0_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int gfx_v9_0_soft_reset(void *handle)
|
||||
static int gfx_v9_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 grbm_soft_reset = 0;
|
||||
u32 tmp;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
/* GRBM_STATUS */
|
||||
tmp = RREG32_SOC15(GC, 0, mmGRBM_STATUS);
|
||||
|
||||
@ -2423,11 +2423,11 @@ static int gfx_v9_4_3_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int gfx_v9_4_3_soft_reset(void *handle)
|
||||
static int gfx_v9_4_3_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 grbm_soft_reset = 0;
|
||||
u32 tmp;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
/* GRBM_STATUS */
|
||||
tmp = RREG32_SOC15(GC, GET_INST(GC, 0), regGRBM_STATUS);
|
||||
|
||||
@ -1088,7 +1088,7 @@ static int gmc_v10_0_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gmc_v10_0_soft_reset(void *handle)
|
||||
static int gmc_v10_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -996,7 +996,7 @@ static int gmc_v11_0_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gmc_v11_0_soft_reset(void *handle)
|
||||
static int gmc_v11_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -980,7 +980,7 @@ static int gmc_v12_0_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gmc_v12_0_soft_reset(void *handle)
|
||||
static int gmc_v12_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -973,9 +973,9 @@ static int gmc_v6_0_wait_for_idle(void *handle)
|
||||
|
||||
}
|
||||
|
||||
static int gmc_v6_0_soft_reset(void *handle)
|
||||
static int gmc_v6_0_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;
|
||||
u32 tmp = RREG32(mmSRBM_STATUS);
|
||||
|
||||
|
||||
@ -1167,9 +1167,9 @@ static int gmc_v7_0_wait_for_idle(void *handle)
|
||||
|
||||
}
|
||||
|
||||
static int gmc_v7_0_soft_reset(void *handle)
|
||||
static int gmc_v7_0_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;
|
||||
u32 tmp = RREG32(mmSRBM_STATUS);
|
||||
|
||||
|
||||
@ -1330,9 +1330,9 @@ static int gmc_v8_0_pre_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gmc_v8_0_soft_reset(void *handle)
|
||||
static int gmc_v8_0_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;
|
||||
|
||||
if (!adev->gmc.srbm_soft_reset)
|
||||
|
||||
@ -2461,7 +2461,7 @@ static int gmc_v9_0_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gmc_v9_0_soft_reset(void *handle)
|
||||
static int gmc_v9_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* XXX for emulation.*/
|
||||
return 0;
|
||||
|
||||
@ -368,10 +368,10 @@ static int iceland_ih_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int iceland_ih_soft_reset(void *handle)
|
||||
static int iceland_ih_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 srbm_soft_reset = 0;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
u32 tmp = RREG32(mmSRBM_STATUS);
|
||||
|
||||
if (tmp & SRBM_STATUS__IH_BUSY_MASK)
|
||||
|
||||
@ -670,7 +670,7 @@ static int ih_v6_0_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int ih_v6_0_soft_reset(void *handle)
|
||||
static int ih_v6_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* todo */
|
||||
return 0;
|
||||
|
||||
@ -649,7 +649,7 @@ static int ih_v6_1_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int ih_v6_1_soft_reset(void *handle)
|
||||
static int ih_v6_1_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* todo */
|
||||
return 0;
|
||||
|
||||
@ -639,7 +639,7 @@ static int ih_v7_0_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int ih_v7_0_soft_reset(void *handle)
|
||||
static int ih_v7_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* todo */
|
||||
return 0;
|
||||
|
||||
@ -644,7 +644,7 @@ static int navi10_ih_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int navi10_ih_soft_reset(void *handle)
|
||||
static int navi10_ih_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* todo */
|
||||
return 0;
|
||||
|
||||
@ -1053,7 +1053,7 @@ static int nv_common_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nv_common_soft_reset(void *handle)
|
||||
static int nv_common_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -944,10 +944,10 @@ static int sdma_v2_4_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int sdma_v2_4_soft_reset(void *handle)
|
||||
static int sdma_v2_4_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
u32 srbm_soft_reset = 0;
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
u32 tmp = RREG32(mmSRBM_STATUS2);
|
||||
|
||||
if (tmp & SRBM_STATUS2__SDMA_BUSY_MASK) {
|
||||
|
||||
@ -1290,9 +1290,9 @@ static int sdma_v3_0_post_soft_reset(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sdma_v3_0_soft_reset(void *handle)
|
||||
static int sdma_v3_0_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;
|
||||
u32 tmp;
|
||||
|
||||
|
||||
@ -2049,7 +2049,7 @@ static int sdma_v4_0_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int sdma_v4_0_soft_reset(void *handle)
|
||||
static int sdma_v4_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* todo */
|
||||
|
||||
|
||||
@ -1559,7 +1559,7 @@ static int sdma_v4_4_2_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int sdma_v4_4_2_soft_reset(void *handle)
|
||||
static int sdma_v4_4_2_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* todo */
|
||||
|
||||
|
||||
@ -1548,7 +1548,7 @@ static int sdma_v5_0_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int sdma_v5_0_soft_reset(void *handle)
|
||||
static int sdma_v5_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* todo */
|
||||
|
||||
|
||||
@ -761,9 +761,9 @@ static int sdma_v5_2_load_microcode(struct amdgpu_device *adev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sdma_v5_2_soft_reset(void *handle)
|
||||
static int sdma_v5_2_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;
|
||||
u32 tmp;
|
||||
int i;
|
||||
@ -803,6 +803,7 @@ static int sdma_v5_2_soft_reset(void *handle)
|
||||
static int sdma_v5_2_start(struct amdgpu_device *adev)
|
||||
{
|
||||
int r = 0;
|
||||
struct amdgpu_ip_block *ip_block;
|
||||
|
||||
if (amdgpu_sriov_vf(adev)) {
|
||||
sdma_v5_2_ctx_switch_enable(adev, false);
|
||||
@ -823,7 +824,11 @@ static int sdma_v5_2_start(struct amdgpu_device *adev)
|
||||
msleep(1000);
|
||||
}
|
||||
|
||||
sdma_v5_2_soft_reset(adev);
|
||||
ip_block = amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_SDMA);
|
||||
if (!ip_block)
|
||||
return -EINVAL;
|
||||
|
||||
sdma_v5_2_soft_reset(ip_block);
|
||||
/* unhalt the MEs */
|
||||
sdma_v5_2_enable(adev, true);
|
||||
/* enable sdma ring preemption */
|
||||
|
||||
@ -755,9 +755,9 @@ static int sdma_v6_0_load_microcode(struct amdgpu_device *adev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sdma_v6_0_soft_reset(void *handle)
|
||||
static int sdma_v6_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
u32 tmp;
|
||||
int i;
|
||||
|
||||
|
||||
@ -747,9 +747,9 @@ static int sdma_v7_0_load_microcode(struct amdgpu_device *adev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sdma_v7_0_soft_reset(void *handle)
|
||||
static int sdma_v7_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
u32 tmp;
|
||||
int i;
|
||||
|
||||
|
||||
@ -2674,7 +2674,7 @@ static int si_common_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int si_common_soft_reset(void *handle)
|
||||
static int si_common_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -571,7 +571,7 @@ static int si_dma_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int si_dma_soft_reset(void *handle)
|
||||
static int si_dma_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
DRM_INFO("si_dma_soft_reset --- not implemented !!!!!!!\n");
|
||||
return 0;
|
||||
|
||||
@ -240,9 +240,9 @@ static int si_ih_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int si_ih_soft_reset(void *handle)
|
||||
static int si_ih_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;
|
||||
u32 tmp = RREG32(SRBM_STATUS);
|
||||
|
||||
@ -1346,7 +1346,7 @@ static int soc15_common_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int soc15_common_soft_reset(void *handle)
|
||||
static int soc15_common_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -939,7 +939,7 @@ static int soc21_common_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int soc21_common_soft_reset(void *handle)
|
||||
static int soc21_common_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -536,7 +536,7 @@ static int soc24_common_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int soc24_common_soft_reset(void *handle)
|
||||
static int soc24_common_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -425,9 +425,9 @@ static int tonga_ih_post_soft_reset(void *handle)
|
||||
return tonga_ih_hw_init(adev);
|
||||
}
|
||||
|
||||
static int tonga_ih_soft_reset(void *handle)
|
||||
static int tonga_ih_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;
|
||||
|
||||
if (!adev->irq.srbm_soft_reset)
|
||||
|
||||
@ -778,9 +778,9 @@ static int uvd_v3_1_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int uvd_v3_1_soft_reset(void *handle)
|
||||
static int uvd_v3_1_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
uvd_v3_1_stop(adev);
|
||||
|
||||
|
||||
@ -678,9 +678,9 @@ static int uvd_v4_2_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int uvd_v4_2_soft_reset(void *handle)
|
||||
static int uvd_v4_2_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
uvd_v4_2_stop(adev);
|
||||
|
||||
|
||||
@ -600,9 +600,9 @@ static int uvd_v5_0_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int uvd_v5_0_soft_reset(void *handle)
|
||||
static int uvd_v5_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
uvd_v5_0_stop(adev);
|
||||
|
||||
|
||||
@ -1195,9 +1195,9 @@ static int uvd_v6_0_pre_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int uvd_v6_0_soft_reset(void *handle)
|
||||
static int uvd_v6_0_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;
|
||||
|
||||
if (!adev->uvd.inst->srbm_soft_reset)
|
||||
|
||||
@ -1517,9 +1517,9 @@ static int uvd_v7_0_pre_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int uvd_v7_0_soft_reset(void *handle)
|
||||
static int uvd_v7_0_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;
|
||||
|
||||
if (!adev->uvd.inst[ring->me].srbm_soft_reset)
|
||||
|
||||
@ -532,9 +532,9 @@ static int vce_v2_0_resume(void *handle)
|
||||
return vce_v2_0_hw_init(adev);
|
||||
}
|
||||
|
||||
static int vce_v2_0_soft_reset(void *handle)
|
||||
static int vce_v2_0_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||
struct amdgpu_device *adev = ip_block->adev;
|
||||
|
||||
WREG32_FIELD(SRBM_SOFT_RESET, SOFT_RESET_VCE, 1);
|
||||
mdelay(5);
|
||||
|
||||
@ -668,9 +668,9 @@ static bool vce_v3_0_check_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
}
|
||||
}
|
||||
|
||||
static int vce_v3_0_soft_reset(void *handle)
|
||||
static int vce_v3_0_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;
|
||||
|
||||
if (!adev->vce.srbm_soft_reset)
|
||||
|
||||
@ -762,9 +762,9 @@ static bool vce_v4_0_check_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
}
|
||||
}
|
||||
|
||||
static int vce_v4_0_soft_reset(void *handle)
|
||||
static int vce_v4_0_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;
|
||||
|
||||
if (!adev->vce.srbm_soft_reset)
|
||||
|
||||
@ -576,7 +576,7 @@ static int vega10_ih_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int vega10_ih_soft_reset(void *handle)
|
||||
static int vega10_ih_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* todo */
|
||||
|
||||
|
||||
@ -642,7 +642,7 @@ static int vega20_ih_wait_for_idle(void *handle)
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int vega20_ih_soft_reset(void *handle)
|
||||
static int vega20_ih_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* todo */
|
||||
|
||||
|
||||
@ -1755,7 +1755,7 @@ static int vi_common_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int vi_common_soft_reset(void *handle)
|
||||
static int vi_common_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -331,7 +331,7 @@ static bool dm_check_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
return false;
|
||||
}
|
||||
|
||||
static int dm_soft_reset(void *handle)
|
||||
static int dm_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
/* XXX todo */
|
||||
return 0;
|
||||
|
||||
@ -394,7 +394,7 @@ struct amd_ip_funcs {
|
||||
int (*wait_for_idle)(void *handle);
|
||||
bool (*check_soft_reset)(struct amdgpu_ip_block *ip_block);
|
||||
int (*pre_soft_reset)(struct amdgpu_ip_block *ip_block);
|
||||
int (*soft_reset)(void *handle);
|
||||
int (*soft_reset)(struct amdgpu_ip_block *ip_block);
|
||||
int (*post_soft_reset)(void *handle);
|
||||
int (*set_clockgating_state)(void *handle,
|
||||
enum amd_clockgating_state state);
|
||||
|
||||
@ -3105,7 +3105,7 @@ static int kv_dpm_wait_for_idle(void *handle)
|
||||
}
|
||||
|
||||
|
||||
static int kv_dpm_soft_reset(void *handle)
|
||||
static int kv_dpm_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -7849,7 +7849,7 @@ static int si_dpm_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int si_dpm_soft_reset(void *handle)
|
||||
static int si_dpm_soft_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -250,7 +250,7 @@ static int pp_wait_for_idle(void *handle)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pp_sw_reset(void *handle)
|
||||
static int pp_sw_reset(struct amdgpu_ip_block *ip_block)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2053,6 +2053,7 @@ static void smu_late_fini(struct amdgpu_ip_block *ip_block)
|
||||
static int smu_reset(struct smu_context *smu)
|
||||
{
|
||||
struct amdgpu_device *adev = smu->adev;
|
||||
struct amdgpu_ip_block *ip_block;
|
||||
int ret;
|
||||
|
||||
ret = smu_hw_fini(adev);
|
||||
@ -2063,7 +2064,11 @@ static int smu_reset(struct smu_context *smu)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = smu_late_init(&adev->ip_blocks[AMD_IP_BLOCK_TYPE_SMC]);
|
||||
ip_block = amdgpu_device_ip_get_ip_block(adev, AMD_IP_BLOCK_TYPE_SMC);
|
||||
if (!ip_block)
|
||||
return -EINVAL;
|
||||
|
||||
ret = smu_late_init(ip_block);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user