diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2017-06-07 10:46:06 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-06-07 15:43:11 -0400 |
commit | cf8b611f55a775cc6514485e7dccf1c0e85b938d (patch) | |
tree | 1fceba68cad17d8d869461a4b1da6452f4134b2d /drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | |
parent | 378506a7e600a025131df947a15f9bc23b522690 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index 4c04e9dec28b..862bc724de42 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | |||
@@ -2825,9 +2825,15 @@ static void gfx_v7_0_compute_queue_acquire(struct amdgpu_device *adev) | |||
2825 | if (mec >= adev->gfx.mec.num_mec) | 2825 | if (mec >= adev->gfx.mec.num_mec) |
2826 | break; | 2826 | break; |
2827 | 2827 | ||
2828 | /* policy: amdgpu owns the first two queues of the first MEC */ | 2828 | if (adev->gfx.mec.num_mec > 1) { |
2829 | if (mec == 0 && queue < 2) | 2829 | /* policy: amdgpu owns the first two queues of the first MEC */ |
2830 | set_bit(i, adev->gfx.mec.queue_bitmap); | 2830 | if (mec == 0 && queue < 2) |
2831 | set_bit(i, adev->gfx.mec.queue_bitmap); | ||
2832 | } else { | ||
2833 | /* policy: amdgpu owns all queues in the first pipe */ | ||
2834 | if (mec == 0 && pipe == 0) | ||
2835 | set_bit(i, adev->gfx.mec.queue_bitmap); | ||
2836 | } | ||
2831 | } | 2837 | } |
2832 | 2838 | ||
2833 | /* update the number of active compute rings */ | 2839 | /* update the number of active compute rings */ |