drm/amdgpu: set sched_hw_submission higher for KIQ

Submitted by Xie, AlexBin on Aug. 22, 2017, 9:02 p.m.

Details

Message ID DM5PR12MB12571FB4E55CA1963C161F09F2840@DM5PR12MB1257.namprd12.prod.outlook.com
State New
Headers show
Series "drm/amdgpu: set sched_hw_submission higher for KIQ" ( rev: 2 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Xie, AlexBin Aug. 22, 2017, 9:02 p.m.
Hi Alex,


See below comment about coding style of 80 characters per line.


Thanks,

Alex Bin Xie

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index 6c5646b..f39b851 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -170,6 +170,16 @@  int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
                      unsigned irq_type)
 {
         int r;
+       int sched_hw_submission = amdgpu_sched_hw_submission;
+
+       /* Set the hw submission limit higher for KIQ because
+        * it's used for a number of gfx/compute tasks by both
+        * KFD and KGD which may have outstanding fences and
+        * it doesn't really use the gpu scheduler anyway;
+        * KIQ tasks get submitted directly to the ring.
+        */
+       if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
+               sched_hw_submission *= 2;

         if (ring->adev == NULL) {
                 if (adev->num_rings >= AMDGPU_MAX_RINGS)
@@ -179,7 +189,7 @@  int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
                 ring->idx = adev->num_rings++;
                 adev->rings[ring->idx] = ring;
                 r = amdgpu_fence_driver_init_ring(ring,
-                       amdgpu_sched_hw_submission);
+                                                 sched_hw_submission);

Alex Bin Xie: With shorter variable name, there is no need to wrap into a new line of code.