drm/amdgpu set doorbell range when gpu recovery in sriov environment
Subsystems (2)
PATCH 1/1 drm/amdgpu set doorbell range when gpu recovery in sriov environment
GFX doorbell range should be set after flr otherwise the GFX doorbell range will overlap with MEC.
Signed-off-by Lin.Cao <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +6 -0
@@ -6467,6 +6467,12 @@ static int gfx_v10_0_gfx_init_queue(struct amdgpu_ring *ring)if (adev->gfx.me.mqd_backup[mqd_idx])memcpy (adev->gfx.me.mqd_backup[mqd_idx], mqd,sizeof (*mqd)); }else { +if (amdgpu_sriov_vf (adev) &&amdgpu_in_reset (adev)) { +mutex_lock (&adev->srbm_mutex); +if (ring->doorbell_index == adev->doorbell_index.gfx_ring0 <<1 ) +gfx_v10_0_cp_gfx_set_doorbell (adev, ring); +mutex_unlock (&adev->srbm_mutex); + }/* restore mqd with the backup copy */ if (adev->gfx.me.mqd_backup[mqd_idx])memcpy (mqd, adev->gfx.me.mqd_backup[mqd_idx],sizeof (*mqd));
Signature · 1 line
2.25.1