drm/amdgpu:don't invoke srio-gpu-reset in gpu-reset (v2)
because we don't want to do sriov-gpu-reset under certain cases, so just split those two funtion and don't invoke sr-iov one from bare-metal one. V2: remove debugfs_gpu_reset routine on SRIOV case. Signed-off-by: Monk Liu <Monk.Liu@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
bea396726d
commit
4fbf87e2fe
|
@ -2731,9 +2731,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
|
||||||
int resched;
|
int resched;
|
||||||
bool need_full_reset;
|
bool need_full_reset;
|
||||||
|
|
||||||
if (amdgpu_sriov_vf(adev))
|
|
||||||
return amdgpu_sriov_gpu_reset(adev, true);
|
|
||||||
|
|
||||||
if (!amdgpu_check_soft_reset(adev)) {
|
if (!amdgpu_check_soft_reset(adev)) {
|
||||||
DRM_INFO("No hardware hang detected. Did some blocks stall?\n");
|
DRM_INFO("No hardware hang detected. Did some blocks stall?\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -660,11 +660,17 @@ static const struct drm_info_list amdgpu_debugfs_fence_list[] = {
|
||||||
{"amdgpu_fence_info", &amdgpu_debugfs_fence_info, 0, NULL},
|
{"amdgpu_fence_info", &amdgpu_debugfs_fence_info, 0, NULL},
|
||||||
{"amdgpu_gpu_reset", &amdgpu_debugfs_gpu_reset, 0, NULL}
|
{"amdgpu_gpu_reset", &amdgpu_debugfs_gpu_reset, 0, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct drm_info_list amdgpu_debugfs_fence_list_sriov[] = {
|
||||||
|
{"amdgpu_fence_info", &amdgpu_debugfs_fence_info, 0, NULL},
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int amdgpu_debugfs_fence_init(struct amdgpu_device *adev)
|
int amdgpu_debugfs_fence_init(struct amdgpu_device *adev)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_DEBUG_FS)
|
#if defined(CONFIG_DEBUG_FS)
|
||||||
|
if (amdgpu_sriov_vf(adev))
|
||||||
|
return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_fence_list_sriov, 1);
|
||||||
return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_fence_list, 2);
|
return amdgpu_debugfs_add_files(adev, amdgpu_debugfs_fence_list, 2);
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -83,6 +83,7 @@ static void amdgpu_irq_reset_work_func(struct work_struct *work)
|
||||||
struct amdgpu_device *adev = container_of(work, struct amdgpu_device,
|
struct amdgpu_device *adev = container_of(work, struct amdgpu_device,
|
||||||
reset_work);
|
reset_work);
|
||||||
|
|
||||||
|
if (!amdgpu_sriov_vf(adev))
|
||||||
amdgpu_gpu_reset(adev);
|
amdgpu_gpu_reset(adev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,10 @@ static void amdgpu_job_timedout(struct amd_sched_job *s_job)
|
||||||
job->base.sched->name,
|
job->base.sched->name,
|
||||||
atomic_read(&job->ring->fence_drv.last_seq),
|
atomic_read(&job->ring->fence_drv.last_seq),
|
||||||
job->ring->fence_drv.sync_seq);
|
job->ring->fence_drv.sync_seq);
|
||||||
|
|
||||||
|
if (amdgpu_sriov_vf(job->adev))
|
||||||
|
amdgpu_sriov_gpu_reset(job->adev, true);
|
||||||
|
else
|
||||||
amdgpu_gpu_reset(job->adev);
|
amdgpu_gpu_reset(job->adev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue