]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
Merge tag 'drm-msm-fixes-2021-04-02' of https://gitlab.freedesktop.org/drm/msm into...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_gfx.c
index cd2c676a2797cc084950f90a0727064c6e076181..8e0a6c62322ec9d62d569d717982580abd58901f 100644 (file)
@@ -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)
This page took 0.035061 seconds and 4 git commands to generate.