This reverts commit
5161bba4311f in order to split it into two
different patches, and this will make it easier to understand.
[PATCH 1/2]
porting to gfx10 from
commit
1b0bfcff463f390c40 ("drm/amdgpu: Avoid destroy hqd when GPU is on reset")
Originally, MEC is touched
without GPU initialized first.
Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
uint32_t temp;
struct v10_compute_mqd *m = get_mqd(mqd);
- if (amdgpu_sriov_vf(adev) && adev->in_gpu_reset)
- return 0;
+ if (adev->in_gpu_reset)
+ return -EIO;
#if 0
unsigned long flags;
uint32_t temp;
struct v9_mqd *m = get_mqd(mqd);
- if (amdgpu_sriov_vf(adev) && adev->in_gpu_reset)
- return 0;
-
if (adev->in_gpu_reset)
return -EIO;
if (r)
return r;
- amdgpu_amdkfd_pre_reset(adev);
-
/* Resume IP prior to SMC */
r = amdgpu_device_ip_reinit_early_sriov(adev);
if (r)