Skip to content

Commit b77cc85

Browse files
Lin.Caoalexdeucher
authored andcommitted
drm/amdgpu doorbell range should be set when gpu recovery
GFX doorbell range should be set after flr otherwise the gfx doorbell range will be overlap with MEC. v2: remove "amdgpu_sriov_vf" and "amdgpu_in_reset" check, and add grbm select for the case of 2 gfx rings. Signed-off-by: Lin.Cao <lincao12@amd.com> Acked-by: ZhenGuo Yin <zhenguo.yin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 42ef313 commit b77cc85

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6467,6 +6467,13 @@ static int gfx_v10_0_gfx_init_queue(struct amdgpu_ring *ring)
64676467
if (adev->gfx.me.mqd_backup[mqd_idx])
64686468
memcpy(adev->gfx.me.mqd_backup[mqd_idx], mqd, sizeof(*mqd));
64696469
} else {
6470+
mutex_lock(&adev->srbm_mutex);
6471+
nv_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
6472+
if (ring->doorbell_index == adev->doorbell_index.gfx_ring0 << 1)
6473+
gfx_v10_0_cp_gfx_set_doorbell(adev, ring);
6474+
6475+
nv_grbm_select(adev, 0, 0, 0, 0);
6476+
mutex_unlock(&adev->srbm_mutex);
64706477
/* restore mqd with the backup copy */
64716478
if (adev->gfx.me.mqd_backup[mqd_idx])
64726479
memcpy(mqd, adev->gfx.me.mqd_backup[mqd_idx], sizeof(*mqd));

0 commit comments

Comments
 (0)