diff options
| author | Tony Lindgren <[email protected]> | 2021-03-08 11:34:12 +0200 |
|---|---|---|
| committer | Tony Lindgren <[email protected]> | 2021-03-08 11:34:12 +0200 |
| commit | 4c9f4865f4604744d4f1a43db22ac6ec9dc8e587 (patch) | |
| tree | 46abf93c9b90b880464772ce7d23309ee3616b91 /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | |
| parent | effe89e40037038db7711bdab5d3401fe297d72c (diff) | |
| parent | 77335a040178a0456d4eabc8bf17a7ca3ee4a327 (diff) | |
Merge branch 'fixes-rc2' into fixes
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index cd2c676a2797..8e0a6c62322e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c @@ -193,15 +193,16 @@ static bool amdgpu_gfx_is_multipipe_capable(struct amdgpu_device *adev) } bool amdgpu_gfx_is_high_priority_compute_queue(struct amdgpu_device *adev, - int pipe, int queue) + struct amdgpu_ring *ring) { - bool multipipe_policy = amdgpu_gfx_is_multipipe_capable(adev); - int cond; - /* Policy: alternate between normal and high priority */ - cond = multipipe_policy ? pipe : queue; - - return ((cond % 2) != 0); + /* Policy: use 1st queue as high priority compute queue if we + * have more than one compute queue. + */ + if (adev->gfx.num_compute_rings > 1 && + ring == &adev->gfx.compute_ring[0]) + return true; + return false; } void amdgpu_gfx_compute_queue_acquire(struct amdgpu_device *adev) |