]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: add the sched_score to amdgpu_ring_init
authorChristian König <christian.koenig@amd.com>
Tue, 2 Feb 2021 12:05:49 +0000 (13:05 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Apr 2021 20:44:56 +0000 (16:44 -0400)
Allow separate ring to share the same scheduler score.

No functional change.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-and-Tested-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
33 files changed:
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
drivers/gpu/drm/amd/amdgpu/cik_sdma.c
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c
drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
drivers/gpu/drm/amd/amdgpu/mes_v10_1.c
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
drivers/gpu/drm/amd/amdgpu/si_dma.c
drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c

index 1a4809d9e85022681771065da141736069a12c7b..47ea468596184509b4174db02437993f2ca93b33 100644 (file)
@@ -439,7 +439,8 @@ int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring,
  * Helper function for amdgpu_fence_driver_init().
  */
 int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
-                                 unsigned num_hw_submission)
+                                 unsigned num_hw_submission,
+                                 atomic_t *sched_score)
 {
        struct amdgpu_device *adev = ring->adev;
        long timeout;
@@ -467,30 +468,31 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
                return -ENOMEM;
 
        /* No need to setup the GPU scheduler for rings that don't need it */
-       if (!ring->no_scheduler) {
-               switch (ring->funcs->type) {
-               case AMDGPU_RING_TYPE_GFX:
-                       timeout = adev->gfx_timeout;
-                       break;
-               case AMDGPU_RING_TYPE_COMPUTE:
-                       timeout = adev->compute_timeout;
-                       break;
-               case AMDGPU_RING_TYPE_SDMA:
-                       timeout = adev->sdma_timeout;
-                       break;
-               default:
-                       timeout = adev->video_timeout;
-                       break;
-               }
+       if (ring->no_scheduler)
+               return 0;
 
-               r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,
-                                  num_hw_submission, amdgpu_job_hang_limit,
-                                  timeout, NULL, ring->name);
-               if (r) {
-                       DRM_ERROR("Failed to create scheduler on ring %s.\n",
-                                 ring->name);
-                       return r;
-               }
+       switch (ring->funcs->type) {
+       case AMDGPU_RING_TYPE_GFX:
+               timeout = adev->gfx_timeout;
+               break;
+       case AMDGPU_RING_TYPE_COMPUTE:
+               timeout = adev->compute_timeout;
+               break;
+       case AMDGPU_RING_TYPE_SDMA:
+               timeout = adev->sdma_timeout;
+               break;
+       default:
+               timeout = adev->video_timeout;
+               break;
+       }
+
+       r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,
+                          num_hw_submission, amdgpu_job_hang_limit,
+                          timeout, sched_score, ring->name);
+       if (r) {
+               DRM_ERROR("Failed to create scheduler on ring %s.\n",
+                         ring->name);
+               return r;
        }
 
        return 0;
index d087f254e0d571dc095fd9af591093230ff9deaa..de540c2090231caa8fb48daf39decec7b7ed9ec5 100644 (file)
@@ -310,9 +310,8 @@ int amdgpu_gfx_kiq_init_ring(struct amdgpu_device *adev,
        ring->eop_gpu_addr = kiq->eop_gpu_addr;
        ring->no_scheduler = true;
        sprintf(ring->name, "kiq_%d.%d.%d", ring->me, ring->pipe, ring->queue);
-       r = amdgpu_ring_init(adev, ring, 1024,
-                            irq, AMDGPU_CP_KIQ_IRQ_DRIVER0,
-                            AMDGPU_RING_PRIO_DEFAULT);
+       r = amdgpu_ring_init(adev, ring, 1024, irq, AMDGPU_CP_KIQ_IRQ_DRIVER0,
+                            AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                dev_warn(adev->dev, "(%d) failed to init kiq ring\n", r);
 
index b644c78475fd8de1e53677bccf3333d4db104fa0..688624ebe42110c314a4f4e551cf96509919d6f7 100644 (file)
@@ -164,7 +164,8 @@ void amdgpu_ring_undo(struct amdgpu_ring *ring)
  */
 int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
                     unsigned int max_dw, struct amdgpu_irq_src *irq_src,
-                    unsigned int irq_type, unsigned int hw_prio)
+                    unsigned int irq_type, unsigned int hw_prio,
+                    atomic_t *sched_score)
 {
        int r;
        int sched_hw_submission = amdgpu_sched_hw_submission;
@@ -189,7 +190,8 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
                ring->adev = adev;
                ring->idx = adev->num_rings++;
                adev->rings[ring->idx] = ring;
-               r = amdgpu_fence_driver_init_ring(ring, sched_hw_submission);
+               r = amdgpu_fence_driver_init_ring(ring, sched_hw_submission,
+                                                 sched_score);
                if (r)
                        return r;
        }
index 56acec1075acd7defabce37d0bf6862af174d7f6..ca16228352969e804d8e8498018630ab2fe14bdc 100644 (file)
@@ -111,7 +111,8 @@ void amdgpu_fence_driver_fini(struct amdgpu_device *adev);
 void amdgpu_fence_driver_force_completion(struct amdgpu_ring *ring);
 
 int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
-                                 unsigned num_hw_submission);
+                                 unsigned num_hw_submission,
+                                 atomic_t *sched_score);
 int amdgpu_fence_driver_start_ring(struct amdgpu_ring *ring,
                                   struct amdgpu_irq_src *irq_src,
                                   unsigned irq_type);
@@ -282,7 +283,8 @@ void amdgpu_ring_commit(struct amdgpu_ring *ring);
 void amdgpu_ring_undo(struct amdgpu_ring *ring);
 int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
                     unsigned int ring_size, struct amdgpu_irq_src *irq_src,
-                    unsigned int irq_type, unsigned int prio);
+                    unsigned int irq_type, unsigned int prio,
+                    atomic_t *sched_score);
 void amdgpu_ring_fini(struct amdgpu_ring *ring);
 void amdgpu_ring_emit_reg_write_reg_wait_helper(struct amdgpu_ring *ring,
                                                uint32_t reg0, uint32_t val0,
index 43b978144b79688a78a73db467bfd5594161fb27..c4bb8eed246d66789bbd387d80711894caa9e582 100644 (file)
@@ -984,10 +984,9 @@ static int cik_sdma_sw_init(void *handle)
                sprintf(ring->name, "sdma%d", i);
                r = amdgpu_ring_init(adev, ring, 1024,
                                     &adev->sdma.trap_irq,
-                                    (i == 0) ?
-                                    AMDGPU_SDMA_IRQ_INSTANCE0 :
+                                    (i == 0) ? AMDGPU_SDMA_IRQ_INSTANCE0 :
                                     AMDGPU_SDMA_IRQ_INSTANCE1,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 5581099177d1770a55abbfb954ce18da169cfd50..aae6403f0421fc397d3d9bfcd2523167a71e2ef8 100644 (file)
@@ -4458,9 +4458,8 @@ static int gfx_v10_0_gfx_ring_init(struct amdgpu_device *adev, int ring_id,
        sprintf(ring->name, "gfx_%d.%d.%d", ring->me, ring->pipe, ring->queue);
 
        irq_type = AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP + ring->pipe;
-       r = amdgpu_ring_init(adev, ring, 1024,
-                            &adev->gfx.eop_irq, irq_type,
-                            AMDGPU_RING_PRIO_DEFAULT);
+       r = amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type,
+                            AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                return r;
        return 0;
@@ -4494,8 +4493,8 @@ static int gfx_v10_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
        hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring) ?
                        AMDGPU_GFX_PIPE_PRIO_HIGH : AMDGPU_GFX_PIPE_PRIO_NORMAL;
        /* type-2 packets are deprecated on MEC, use type-3 instead */
-       r = amdgpu_ring_init(adev, ring, 1024,
-                            &adev->gfx.eop_irq, irq_type, hw_prio);
+       r = amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type,
+                            hw_prio, NULL);
        if (r)
                return r;
 
index ca74638dec9b7a4379642f6684014354808f0f0e..3a8d52a54873f64e9f2fd1f2575bed43decc8c66 100644 (file)
@@ -3114,7 +3114,7 @@ static int gfx_v6_0_sw_init(void *handle)
                r = amdgpu_ring_init(adev, ring, 1024,
                                     &adev->gfx.eop_irq,
                                     AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
@@ -3137,7 +3137,7 @@ static int gfx_v6_0_sw_init(void *handle)
                irq_type = AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP + ring->pipe;
                r = amdgpu_ring_init(adev, ring, 1024,
                                     &adev->gfx.eop_irq, irq_type,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 4502b95ddf6b48f6a7af883956c2b5b67e5ce0f5..c35fdd2ef2d4daf5d1df0142ffb86ada692bb894 100644 (file)
@@ -4438,7 +4438,7 @@ static int gfx_v7_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
        /* type-2 packets are deprecated on MEC, use type-3 instead */
        r = amdgpu_ring_init(adev, ring, 1024,
                             &adev->gfx.eop_irq, irq_type,
-                            AMDGPU_RING_PRIO_DEFAULT);
+                            AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                return r;
 
@@ -4512,7 +4512,7 @@ static int gfx_v7_0_sw_init(void *handle)
                r = amdgpu_ring_init(adev, ring, 1024,
                                     &adev->gfx.eop_irq,
                                     AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 4d45844a1d92b1f023e42859a46ffb5cf40126a8..c26e0605946622900de485d5c146fbac292570c3 100644 (file)
@@ -1927,8 +1927,8 @@ static int gfx_v8_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
        hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring) ?
                        AMDGPU_GFX_PIPE_PRIO_HIGH : AMDGPU_RING_PRIO_DEFAULT;
        /* type-2 packets are deprecated on MEC, use type-3 instead */
-       r = amdgpu_ring_init(adev, ring, 1024,
-                            &adev->gfx.eop_irq, irq_type, hw_prio);
+       r = amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type,
+                            hw_prio, NULL);
        if (r)
                return r;
 
@@ -2033,7 +2033,7 @@ static int gfx_v8_0_sw_init(void *handle)
 
                r = amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq,
                                     AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 1393ccae74180149559c4736515884fb365f3600..63512370a51b32a9c128f3cdb73f7b74defaba04 100644 (file)
@@ -2286,8 +2286,8 @@ static int gfx_v9_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
        hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring) ?
                        AMDGPU_GFX_PIPE_PRIO_HIGH : AMDGPU_GFX_PIPE_PRIO_NORMAL;
        /* type-2 packets are deprecated on MEC, use type-3 instead */
-       return amdgpu_ring_init(adev, ring, 1024,
-                               &adev->gfx.eop_irq, irq_type, hw_prio);
+       return amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type,
+                               hw_prio, NULL);
 }
 
 static int gfx_v9_0_sw_init(void *handle)
@@ -2376,10 +2376,9 @@ static int gfx_v9_0_sw_init(void *handle)
                        sprintf(ring->name, "gfx_%d", i);
                ring->use_doorbell = true;
                ring->doorbell_index = adev->doorbell_index.gfx_ring0 << 1;
-               r = amdgpu_ring_init(adev, ring, 1024,
-                                    &adev->gfx.eop_irq,
+               r = amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq,
                                     AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 7332a320ede87c881db974fabb28a29c9f9fde4c..9360204da7fb7b5c39619a67f7c1af4dac70ecce 100644 (file)
@@ -487,7 +487,7 @@ int jpeg_v1_0_sw_init(void *handle)
        ring = &adev->jpeg.inst->ring_dec;
        sprintf(ring->name, "jpeg_dec");
        r = amdgpu_ring_init(adev, ring, 512, &adev->jpeg.inst->irq,
-                            0, AMDGPU_RING_PRIO_DEFAULT);
+                            0, AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                return r;
 
index 3b22953aa62e1a071b104b79cf38e0e98bc0cf55..de5abceced0dd28ac92cacdf9a424a8388860de2 100644 (file)
@@ -108,7 +108,7 @@ static int jpeg_v2_0_sw_init(void *handle)
        ring->doorbell_index = (adev->doorbell_index.vcn.vcn_ring0_1 << 1) + 1;
        sprintf(ring->name, "jpeg_dec");
        r = amdgpu_ring_init(adev, ring, 512, &adev->jpeg.inst->irq,
-                            0, AMDGPU_RING_PRIO_DEFAULT);
+                            0, AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                return r;
 
index 072774ae16bd48c4fe571b1dd3b6c42ea9016277..83531997aeba9056bf0e802decdd9f5e254c01a7 100644 (file)
@@ -115,7 +115,7 @@ static int jpeg_v2_5_sw_init(void *handle)
                ring->doorbell_index = (adev->doorbell_index.vcn.vcn_ring0_1 << 1) + 1 + 8 * i;
                sprintf(ring->name, "jpeg_dec_%d", i);
                r = amdgpu_ring_init(adev, ring, 512, &adev->jpeg.inst[i].irq,
-                                    0, AMDGPU_RING_PRIO_DEFAULT);
+                                    0, AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
 
index e8fbb2a0de3409b62ca5f0f4e5a38a515cc7ad0f..de5dfcfb385919985f983bf7a2c9b90da5fbbfa5 100644 (file)
@@ -94,7 +94,7 @@ static int jpeg_v3_0_sw_init(void *handle)
        ring->doorbell_index = (adev->doorbell_index.vcn.vcn_ring0_1 << 1) + 1;
        sprintf(ring->name, "jpeg_dec");
        r = amdgpu_ring_init(adev, ring, 512, &adev->jpeg.inst->irq, 0,
-                            AMDGPU_RING_PRIO_DEFAULT);
+                            AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                return r;
 
index 7f30629f21a21dd3b90f35089eb5f27ab9f3172f..a7ec4ac89da5c7cba0815b633c5b364884588cdb 100644 (file)
@@ -848,7 +848,8 @@ static int mes_v10_1_ring_init(struct amdgpu_device *adev)
        ring->no_scheduler = true;
        sprintf(ring->name, "mes_%d.%d.%d", ring->me, ring->pipe, ring->queue);
 
-       return amdgpu_ring_init(adev, ring, 1024, NULL, 0, AMDGPU_RING_PRIO_DEFAULT);
+       return amdgpu_ring_init(adev, ring, 1024, NULL, 0,
+                               AMDGPU_RING_PRIO_DEFAULT, NULL);
 }
 
 static int mes_v10_1_mqd_sw_init(struct amdgpu_device *adev)
index eb5dc6c5b46ee0f746d0a4609a369d08204d9694..9f0dda040ec8823fc57f1c203830e48e6a616a43 100644 (file)
@@ -876,12 +876,10 @@ static int sdma_v2_4_sw_init(void *handle)
                ring->ring_obj = NULL;
                ring->use_doorbell = false;
                sprintf(ring->name, "sdma%d", i);
-               r = amdgpu_ring_init(adev, ring, 1024,
-                                    &adev->sdma.trap_irq,
-                                    (i == 0) ?
-                                    AMDGPU_SDMA_IRQ_INSTANCE0 :
+               r = amdgpu_ring_init(adev, ring, 1024, &adev->sdma.trap_irq,
+                                    (i == 0) ? AMDGPU_SDMA_IRQ_INSTANCE0 :
                                     AMDGPU_SDMA_IRQ_INSTANCE1,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index ad308d8c6d30843b44cc1c839e093198bb0cba89..135727b59c41e8f37a5d93ed53759ad2f423bf3f 100644 (file)
@@ -1160,12 +1160,10 @@ static int sdma_v3_0_sw_init(void *handle)
                }
 
                sprintf(ring->name, "sdma%d", i);
-               r = amdgpu_ring_init(adev, ring, 1024,
-                                    &adev->sdma.trap_irq,
-                                    (i == 0) ?
-                                    AMDGPU_SDMA_IRQ_INSTANCE0 :
+               r = amdgpu_ring_init(adev, ring, 1024, &adev->sdma.trap_irq,
+                                    (i == 0) ? AMDGPU_SDMA_IRQ_INSTANCE0 :
                                     AMDGPU_SDMA_IRQ_INSTANCE1,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 98b7db516438931656236f29db54fa893804e2e1..5715be6770ecc0314e0c40d71b9412a7771d474a 100644 (file)
@@ -1968,7 +1968,7 @@ static int sdma_v4_0_sw_init(void *handle)
                sprintf(ring->name, "sdma%d", i);
                r = amdgpu_ring_init(adev, ring, 1024, &adev->sdma.trap_irq,
                                     AMDGPU_SDMA_IRQ_INSTANCE0 + i,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
 
@@ -1987,7 +1987,7 @@ static int sdma_v4_0_sw_init(void *handle)
                        r = amdgpu_ring_init(adev, ring, 1024,
                                             &adev->sdma.trap_irq,
                                             AMDGPU_SDMA_IRQ_INSTANCE0 + i,
-                                            AMDGPU_RING_PRIO_DEFAULT);
+                                            AMDGPU_RING_PRIO_DEFAULT, NULL);
                        if (r)
                                return r;
                }
index d345e324837ddf2152757e7119cf563882770ed6..920fc6d4a1273b2470c9fbe071e10385dbe3183b 100644 (file)
@@ -1273,12 +1273,10 @@ static int sdma_v5_0_sw_init(void *handle)
                        : (adev->doorbell_index.sdma_engine[1] << 1); // get DWORD offset
 
                sprintf(ring->name, "sdma%d", i);
-               r = amdgpu_ring_init(adev, ring, 1024,
-                                    &adev->sdma.trap_irq,
-                                    (i == 0) ?
-                                    AMDGPU_SDMA_IRQ_INSTANCE0 :
+               r = amdgpu_ring_init(adev, ring, 1024, &adev->sdma.trap_irq,
+                                    (i == 0) ? AMDGPU_SDMA_IRQ_INSTANCE0 :
                                     AMDGPU_SDMA_IRQ_INSTANCE1,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index b39e7db0e299ef3954cd0fa9aacf2e3d65558729..93f826a7d3f038ab9c5e9b99dd0138d8606b6bd2 100644 (file)
@@ -1283,10 +1283,9 @@ static int sdma_v5_2_sw_init(void *handle)
                        (adev->doorbell_index.sdma_engine[i] << 1); //get DWORD offset
 
                sprintf(ring->name, "sdma%d", i);
-               r = amdgpu_ring_init(adev, ring, 1024,
-                                    &adev->sdma.trap_irq,
+               r = amdgpu_ring_init(adev, ring, 1024, &adev->sdma.trap_irq,
                                     AMDGPU_SDMA_IRQ_INSTANCE0 + i,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 488497ad5e0ccace84b3cbe7e857b07d400f890e..cb703e307238d9e7d1f0babdede723906769e993 100644 (file)
@@ -507,10 +507,9 @@ static int si_dma_sw_init(void *handle)
                sprintf(ring->name, "sdma%d", i);
                r = amdgpu_ring_init(adev, ring, 1024,
                                     &adev->sdma.trap_irq,
-                                    (i == 0) ?
-                                    AMDGPU_SDMA_IRQ_INSTANCE0 :
+                                    (i == 0) ? AMDGPU_SDMA_IRQ_INSTANCE0 :
                                     AMDGPU_SDMA_IRQ_INSTANCE1,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 10ecae257b18a17c55e64f6d1b5dc8e806e5fb24..284447d7a579523118923fb8396c31483f094e5e 100644 (file)
@@ -562,7 +562,7 @@ static int uvd_v3_1_sw_init(void *handle)
        ring = &adev->uvd.inst->ring;
        sprintf(ring->name, "uvd");
        r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst->irq, 0,
-                        AMDGPU_RING_PRIO_DEFAULT);
+                        AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                return r;
 
index a70d2a0de316baf0a5b43fe711fc2a73b34e9933..a301518e4957ec10f40232060e114ffef76c05fb 100644 (file)
@@ -119,7 +119,7 @@ static int uvd_v4_2_sw_init(void *handle)
        ring = &adev->uvd.inst->ring;
        sprintf(ring->name, "uvd");
        r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst->irq, 0,
-                            AMDGPU_RING_PRIO_DEFAULT);
+                            AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                return r;
 
index f3b0a927101b7449cdd14258ee659a257cbe8975..a4d5bd21c83c714996af6da23ba186abd83302ef 100644 (file)
@@ -117,7 +117,7 @@ static int uvd_v5_0_sw_init(void *handle)
        ring = &adev->uvd.inst->ring;
        sprintf(ring->name, "uvd");
        r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst->irq, 0,
-                            AMDGPU_RING_PRIO_DEFAULT);
+                            AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                return r;
 
index 760859880c1edde68a3e18032c38c99bc598e705..2bab9c77952fd73163a6df839d441d0827b0de05 100644 (file)
@@ -420,7 +420,7 @@ static int uvd_v6_0_sw_init(void *handle)
        ring = &adev->uvd.inst->ring;
        sprintf(ring->name, "uvd");
        r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst->irq, 0,
-                            AMDGPU_RING_PRIO_DEFAULT);
+                            AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                return r;
 
@@ -434,7 +434,7 @@ static int uvd_v6_0_sw_init(void *handle)
                        sprintf(ring->name, "uvd_enc%d", i);
                        r = amdgpu_ring_init(adev, ring, 512,
                                             &adev->uvd.inst->irq, 0,
-                                            AMDGPU_RING_PRIO_DEFAULT);
+                                            AMDGPU_RING_PRIO_DEFAULT, NULL);
                        if (r)
                                return r;
                }
index 7cd67cb2ac5f114e945b16041e79fbef6c5ab465..0cd98fcb1f9fcbcdc8c5b2bceb224a754988bd75 100644 (file)
@@ -454,7 +454,7 @@ static int uvd_v7_0_sw_init(void *handle)
                        sprintf(ring->name, "uvd_%d", ring->me);
                        r = amdgpu_ring_init(adev, ring, 512,
                                             &adev->uvd.inst[j].irq, 0,
-                                            AMDGPU_RING_PRIO_DEFAULT);
+                                            AMDGPU_RING_PRIO_DEFAULT, NULL);
                        if (r)
                                return r;
                }
@@ -475,7 +475,7 @@ static int uvd_v7_0_sw_init(void *handle)
                        }
                        r = amdgpu_ring_init(adev, ring, 512,
                                             &adev->uvd.inst[j].irq, 0,
-                                            AMDGPU_RING_PRIO_DEFAULT);
+                                            AMDGPU_RING_PRIO_DEFAULT, NULL);
                        if (r)
                                return r;
                }
index 0e2945baf0f157430452faccb5a184d7d7505b79..c7d28c169be56f4759fa242e213146dbaee1b868 100644 (file)
@@ -433,9 +433,8 @@ static int vce_v2_0_sw_init(void *handle)
        for (i = 0; i < adev->vce.num_rings; i++) {
                ring = &adev->vce.ring[i];
                sprintf(ring->name, "vce%d", i);
-               r = amdgpu_ring_init(adev, ring, 512,
-                                    &adev->vce.irq, 0,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+               r = amdgpu_ring_init(adev, ring, 512, &adev->vce.irq, 0,
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 6d9108fa22e0f21e08ffee13b2f78f1de1f069ec..3b82fb289ef6a3afa69a73c230b16377d8631fea 100644 (file)
@@ -443,7 +443,7 @@ static int vce_v3_0_sw_init(void *handle)
                ring = &adev->vce.ring[i];
                sprintf(ring->name, "vce%d", i);
                r = amdgpu_ring_init(adev, ring, 512, &adev->vce.irq, 0,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 37fa163393fd4dacd949a9298c17b3c2016769c0..8e238dea7bef1976747537ada6877bc3611162fd 100644 (file)
@@ -477,7 +477,7 @@ static int vce_v4_0_sw_init(void *handle)
                                ring->doorbell_index = adev->doorbell_index.uvd_vce.vce_ring2_3 * 2 + 1;
                }
                r = amdgpu_ring_init(adev, ring, 512, &adev->vce.irq, 0,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 6117931fa8d798275219aceea41eee0ed15db652..51a773a37a354ee8d73a126e6326bf9fe15c65c5 100644 (file)
@@ -129,7 +129,7 @@ static int vcn_v1_0_sw_init(void *handle)
        ring = &adev->vcn.inst->ring_dec;
        sprintf(ring->name, "vcn_dec");
        r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0,
-                            AMDGPU_RING_PRIO_DEFAULT);
+                            AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                return r;
 
@@ -148,7 +148,7 @@ static int vcn_v1_0_sw_init(void *handle)
                ring = &adev->vcn.inst->ring_enc[i];
                sprintf(ring->name, "vcn_enc%d", i);
                r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index d63198c945bf06f526443989e07a8363fd06423b..116b9643d5bab315fd890dad877eaf213dbe4c24 100644 (file)
@@ -136,7 +136,7 @@ static int vcn_v2_0_sw_init(void *handle)
 
        sprintf(ring->name, "vcn_dec");
        r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0,
-                            AMDGPU_RING_PRIO_DEFAULT);
+                            AMDGPU_RING_PRIO_DEFAULT, NULL);
        if (r)
                return r;
 
@@ -167,7 +167,7 @@ static int vcn_v2_0_sw_init(void *handle)
                        ring->doorbell_index = (adev->doorbell_index.vcn.vcn_ring0_1 << 1) + 1 + i;
                sprintf(ring->name, "vcn_enc%d", i);
                r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
        }
index 87ec883f7e0674aca6b6b8825857075e064ea25e..948813d7caa024221679ded544247602bbf72b88 100644 (file)
@@ -189,7 +189,7 @@ static int vcn_v2_5_sw_init(void *handle)
                                (amdgpu_sriov_vf(adev) ? 2*j : 8*j);
                sprintf(ring->name, "vcn_dec_%d", j);
                r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst[j].irq,
-                                    0, AMDGPU_RING_PRIO_DEFAULT);
+                                    0, AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
 
@@ -203,7 +203,7 @@ static int vcn_v2_5_sw_init(void *handle)
                        sprintf(ring->name, "vcn_enc_%d.%d", j, i);
                        r = amdgpu_ring_init(adev, ring, 512,
                                             &adev->vcn.inst[j].irq, 0,
-                                            AMDGPU_RING_PRIO_DEFAULT);
+                                            AMDGPU_RING_PRIO_DEFAULT, NULL);
                        if (r)
                                return r;
                }
index b61d1ba1aa9db00053781d545a8a291292847097..4b5c45e9e97822d6e4fb0e7fb16c9c296256b8fa 100644 (file)
@@ -209,7 +209,7 @@ static int vcn_v3_0_sw_init(void *handle)
                        ring->no_scheduler = true;
                sprintf(ring->name, "vcn_dec_%d", i);
                r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst[i].irq, 0,
-                                    AMDGPU_RING_PRIO_DEFAULT);
+                                    AMDGPU_RING_PRIO_DEFAULT, NULL);
                if (r)
                        return r;
 
@@ -231,7 +231,7 @@ static int vcn_v3_0_sw_init(void *handle)
                                ring->no_scheduler = true;
                        sprintf(ring->name, "vcn_enc_%d.%d", i, j);
                        r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst[i].irq, 0,
-                                            AMDGPU_RING_PRIO_DEFAULT);
+                                            AMDGPU_RING_PRIO_DEFAULT, NULL);
                        if (r)
                                return r;
                }