]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
Merge tag 'kvm-x86-hyperv-6.8' of https://github.com/kvm-x86/linux into HEAD
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_mes.c
index 59f10b353b3ad3ec5a340324c64657cb7facb3a8..9ddbf1494326a0d7e6606f6f25fe06f32333917b 100644 (file)
@@ -557,8 +557,20 @@ static void amdgpu_mes_queue_init_mqd(struct amdgpu_device *adev,
        mqd_prop.hqd_queue_priority = p->hqd_queue_priority;
        mqd_prop.hqd_active = false;
 
+       if (p->queue_type == AMDGPU_RING_TYPE_GFX ||
+           p->queue_type == AMDGPU_RING_TYPE_COMPUTE) {
+               mutex_lock(&adev->srbm_mutex);
+               amdgpu_gfx_select_me_pipe_q(adev, p->ring->me, p->ring->pipe, 0, 0, 0);
+       }
+
        mqd_mgr->init_mqd(adev, q->mqd_cpu_ptr, &mqd_prop);
 
+       if (p->queue_type == AMDGPU_RING_TYPE_GFX ||
+           p->queue_type == AMDGPU_RING_TYPE_COMPUTE) {
+               amdgpu_gfx_select_me_pipe_q(adev, 0, 0, 0, 0, 0);
+               mutex_unlock(&adev->srbm_mutex);
+       }
+
        amdgpu_bo_unreserve(q->mqd_obj);
 }
 
@@ -994,9 +1006,13 @@ int amdgpu_mes_add_ring(struct amdgpu_device *adev, int gang_id,
        switch (queue_type) {
        case AMDGPU_RING_TYPE_GFX:
                ring->funcs = adev->gfx.gfx_ring[0].funcs;
+               ring->me = adev->gfx.gfx_ring[0].me;
+               ring->pipe = adev->gfx.gfx_ring[0].pipe;
                break;
        case AMDGPU_RING_TYPE_COMPUTE:
                ring->funcs = adev->gfx.compute_ring[0].funcs;
+               ring->me = adev->gfx.compute_ring[0].me;
+               ring->pipe = adev->gfx.compute_ring[0].pipe;
                break;
        case AMDGPU_RING_TYPE_SDMA:
                ring->funcs = adev->sdma.instance[0].ring.funcs;
This page took 0.034408 seconds and 4 git commands to generate.