mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
drm/amdgpu: fix mec queue policy on single MEC asics
Fixes hangs on single MEC asics. Fixes: 2ed286fb434 (drm/amdgpu: new queue policy, take first 2 queues of each pipe v2) Reviewed-by: Alex Xie <AlexBin.Xie@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
378506a7e6
commit
cf8b611f55
3 changed files with 27 additions and 9 deletions
|
@ -2825,9 +2825,15 @@ static void gfx_v7_0_compute_queue_acquire(struct amdgpu_device *adev)
|
|||
if (mec >= adev->gfx.mec.num_mec)
|
||||
break;
|
||||
|
||||
/* policy: amdgpu owns the first two queues of the first MEC */
|
||||
if (mec == 0 && queue < 2)
|
||||
set_bit(i, adev->gfx.mec.queue_bitmap);
|
||||
if (adev->gfx.mec.num_mec > 1) {
|
||||
/* policy: amdgpu owns the first two queues of the first MEC */
|
||||
if (mec == 0 && queue < 2)
|
||||
set_bit(i, adev->gfx.mec.queue_bitmap);
|
||||
} else {
|
||||
/* policy: amdgpu owns all queues in the first pipe */
|
||||
if (mec == 0 && pipe == 0)
|
||||
set_bit(i, adev->gfx.mec.queue_bitmap);
|
||||
}
|
||||
}
|
||||
|
||||
/* update the number of active compute rings */
|
||||
|
|
|
@ -1464,9 +1464,15 @@ static void gfx_v8_0_compute_queue_acquire(struct amdgpu_device *adev)
|
|||
if (mec >= adev->gfx.mec.num_mec)
|
||||
break;
|
||||
|
||||
/* policy: amdgpu owns the first two queues of the first MEC */
|
||||
if (mec == 0 && queue < 2)
|
||||
set_bit(i, adev->gfx.mec.queue_bitmap);
|
||||
if (adev->gfx.mec.num_mec > 1) {
|
||||
/* policy: amdgpu owns the first two queues of the first MEC */
|
||||
if (mec == 0 && queue < 2)
|
||||
set_bit(i, adev->gfx.mec.queue_bitmap);
|
||||
} else {
|
||||
/* policy: amdgpu owns all queues in the first pipe */
|
||||
if (mec == 0 && pipe == 0)
|
||||
set_bit(i, adev->gfx.mec.queue_bitmap);
|
||||
}
|
||||
}
|
||||
|
||||
/* update the number of active compute rings */
|
||||
|
|
|
@ -873,9 +873,15 @@ static void gfx_v9_0_compute_queue_acquire(struct amdgpu_device *adev)
|
|||
if (mec >= adev->gfx.mec.num_mec)
|
||||
break;
|
||||
|
||||
/* policy: amdgpu owns the first two queues of the first MEC */
|
||||
if (mec == 0 && queue < 2)
|
||||
set_bit(i, adev->gfx.mec.queue_bitmap);
|
||||
if (adev->gfx.mec.num_mec > 1) {
|
||||
/* policy: amdgpu owns the first two queues of the first MEC */
|
||||
if (mec == 0 && queue < 2)
|
||||
set_bit(i, adev->gfx.mec.queue_bitmap);
|
||||
} else {
|
||||
/* policy: amdgpu owns all queues in the first pipe */
|
||||
if (mec == 0 && pipe == 0)
|
||||
set_bit(i, adev->gfx.mec.queue_bitmap);
|
||||
}
|
||||
}
|
||||
|
||||
/* update the number of active compute rings */
|
||||
|
|
Loading…
Reference in a new issue