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 1a4809d..47ea468 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 d087f25..de540c2 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 b644c78..688624e 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 56acec1..ca16228 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 43b9781..c4bb8ee 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 5581099..aae6403 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 ca74638..3a8d52a 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 4502b95..c35fdd2 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 4d45844..c26e060 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 1393cca..6351237 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 7332a32..9360204 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 3b22953..de5abce 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 072774a..8353199 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 e8fbb2a..de5dfcf 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 7f30629..a7ec4ac 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 eb5dc6c..9f0dda0 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 ad308d8..135727b 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 98b7db5..5715be6 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 d345e32..920fc6d 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 b39e7db..93f826a 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 488497a..cb703e3 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 10ecae2..284447d 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 a70d2a0..a301518 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 f3b0a92..a4d5bd2 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 7608598..2bab9c7 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 7cd67cb..0cd98fc 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 0e2945b..c7d28c1 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 6d9108f..3b82fb2 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 37fa163..8e238de 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 6117931..51a773a 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 d63198c..116b964 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 87ec883..948813d 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 b61d1ba..4b5c45e 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;
                }