Re: [PATCH v3 1/1] drm/amdgpu: rework sched_list generation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 3/31/20 3:01 AM, Luben Tuikov wrote:
This patch seems to be using DOS line-endings.


Strange, I don't see that in my local patch file.


  After converting
it to UNIX line-endings, the output of "git am" using "scripts/checkpatch.pl"
via the pre-commit hook is appended last to my thoughts below.

On 2020-03-30 11:49 a.m., Nirmoy Das wrote:
Generate HW IP's sched_list in amdgpu_ring_init() instead of
amdgpu_ctx.c. This makes amdgpu_ctx_init_compute_sched(),
ring.has_high_prio and amdgpu_ctx_init_sched() unnecessary.
This patch also stores sched_list for all HW IPs in one big
array in struct amdgpu_device which makes amdgpu_ctx_init_entity()
much more leaner.

v2:
fix a coding style issue
do not use drm hw_ip const to populate amdgpu_ring_type enum

v3:
remove ctx reference and move sched array and num_sched to a struct
use num_scheds to detect uninitialized scheduler list

Signed-off-by: Nirmoy Das<nirmoy.das@xxxxxxx>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu.h        |   8 ++
  drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c    | 156 ++++-----------------
  drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h    |   3 -
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |   2 -
  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c    |   3 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h    |   5 -
  drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.h   |   2 -
  drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c   |  24 +++-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h   |  12 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h   |   2 -
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h    |   4 -
  drivers/gpu/drm/amd/amdgpu/cik_sdma.c      |   3 +-
  drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c     |  13 +-
  drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c      |   5 +-
  drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c      |   5 +-
  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c      |  11 +-
  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c      |  13 +-
  drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c     |   3 +-
  drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c     |   3 +-
  drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c     |   3 +-
  drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c     |   3 +-
  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c     |   3 +-
  drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c     |   6 +-
  drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c     |   3 +-
  drivers/gpu/drm/amd/amdgpu/si_dma.c        |   3 +-
  drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c      |   3 +-
  drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c      |   3 +-
  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c      |   7 +-
  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c      |   6 +-
  drivers/gpu/drm/amd/amdgpu/vce_v2_0.c      |   2 +-
  drivers/gpu/drm/amd/amdgpu/vce_v3_0.c      |   3 +-
  drivers/gpu/drm/amd/amdgpu/vce_v4_0.c      |   3 +-
  drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c      |   6 +-
  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c      |   6 +-
  drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c      |   6 +-
  35 files changed, 145 insertions(+), 198 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 29f0a410091b..27abbdc603dd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -721,6 +721,11 @@ struct amd_powerplay {
  	const struct amd_pm_funcs *pp_funcs;
  };

+struct amdgpu_sched {
+	uint32_t			num_scheds;
+	struct drm_gpu_scheduler	*sched[HWIP_MAX_INSTANCE];
+};
+
  #define AMDGPU_RESET_MAGIC_NUM 64
  #define AMDGPU_MAX_DF_PERFMONS 4
  struct amdgpu_device {
@@ -858,6 +863,8 @@ struct amdgpu_device {
  	struct amdgpu_ring		*rings[AMDGPU_MAX_RINGS];
  	bool				ib_pool_ready;
  	struct amdgpu_sa_manager	ring_tmp_bo[AMDGPU_IB_POOL_MAX];
+	/* drm scheduler list */
+	struct amdgpu_sched		gpu_sched[AMDGPU_HW_IP_NUM][AMDGPU_RING_PRIO_MAX];
That's a 2-dimensional array of "struct amdgpu_sched".
I think that the comment should be removed, or at least
not say "drm scheduler list". (I can see the structure
definition above.)


Yes I should remove it.


If this is the path you want to go, consider removing
"num_scheds" and creating a three dimensional array,
which would really essentialize the direction you want
to go:

struct drm_gpu_scheduler *gpu_sched[AMDGPU_HW_IP_NUM][AMDGPU_RING_PRIO_MAX][HWIP_MAX_INSTANCE];

Now that this architecture is stripped down to its essentials,
perhaps we can see some optimizations...?


If you mean whether we should see any performance improvement then imo we may not see much

difference as we are using pretty much same number of memory access plus now we have extra cost of array_index_nospec().

Also this is  not hot code path. We do only 1 amdgpu_ctx_init_entity()/HW_IP/Context.


Also consider that since you're creating an array of pointers,
you don't necessarily need to know their count. Your hot-path
algorithms should not need to know it. If you need to print
their count, say in sysfs, then you can count them up on
behalf of the user-space process cat-ing the sysfs entry.

  	/* interrupts */
  	struct amdgpu_irq		irq;
@@ -993,6 +1000,7 @@ struct amdgpu_device {
  	char				product_number[16];
  	char				product_name[32];
  	char				serial[16];
+
  };
Unnecessary empty line above.

  static inline struct amdgpu_device *amdgpu_ttm_adev(struct ttm_bo_device *bdev)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index 6ed36a2c5f73..331646d472e2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -72,13 +72,30 @@ static enum gfx_pipe_priority amdgpu_ctx_sched_prio_to_compute_prio(enum drm_sch
  	}
  }

+static unsigned int amdgpu_ctx_sched_prio_to_hw_prio(struct amdgpu_device *adev,
+						     enum drm_sched_priority prio,
+						     const int hw_ip)
+{
The name of this function could be normalized from
the current pattern of "sched_prio_to_hw_prio" where "prio"
is repeated, to <domain>-<from>-<to> as follows:

amdgpu_ctx_prio_sched_to_hw(...)


Good idea!



Where the domain is "priority" and we're converting from "scheduler"
to "hw" priority.

+	unsigned int hw_prio;
+
+	hw_prio = (hw_ip == AMDGPU_HW_IP_COMPUTE) ?
+			amdgpu_ctx_sched_prio_to_compute_prio(prio) :
+			AMDGPU_RING_PRIO_DEFAULT;
Parenthesis are unnecessary--relational = has higher priority than
ternary operator.


I know but it is more readable  with parenthesis.



+
+	/* set to default prio if sched_list is NULL */
+	if (!adev->gpu_sched[hw_ip][hw_prio].num_scheds)
+		hw_prio = AMDGPU_RING_PRIO_DEFAULT;
That comment is a bit confusing--it talks about a list
not being NULL, while the conditional implicitly checks
against 0.


Yes, this is wrong, will remove it.

<snip>

@@ -258,6 +272,12 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
  	ring->priority = DRM_SCHED_PRIORITY_NORMAL;
  	mutex_init(&ring->priority_mutex);

+	if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
+		hw_ip = amdgpu_ring_type_to_drm_hw_ip[ring->funcs->type];
+		num_sched = &adev->gpu_sched[hw_ip][hw_prio].num_scheds;
+		adev->gpu_sched[hw_ip][hw_prio].sched[(*num_sched)++] = &ring->sched;
+	}
This seems unnecessarily complicated. Perhaps we can remove
"num_scheds", as recommended above, and keep a running pointer
while initialization is being done...?


What do you mean by running pointer ?


Regards,

Nirmoy

Just my thoughts.

Regards,
Luben
P.S. After converting from DOS line-endings:

$git am /tmp/\[PATCH\ v3\ 1_1\]\ drm_amdgpu\:\ rework\ sched_list\ generation.eml
Applying: drm/amdgpu: rework sched_list generation
-:10: CHECK: Prefer kernel type 'u32' over 'uint32_t'
#10: FILE: drivers/gpu/drm/amd/amdgpu/amdgpu.h:725:
+	uint32_t			num_scheds;

-:22: WARNING: line over 81 characters
#22: FILE: drivers/gpu/drm/amd/amdgpu/amdgpu.h:867:
+	struct amdgpu_sched		gpu_sched[AMDGPU_HW_IP_NUM][AMDGPU_RING_PRIO_MAX];

-:43: WARNING: line over 81 characters
#43: FILE: drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c:76:
+						     enum drm_sched_priority prio,

-:115: CHECK: Please don't use multiple blank lines
#115: FILE: drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c:112:
+
+

-:357: WARNING: line over 81 characters
#357: FILE: drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c:278:
+		adev->gpu_sched[hw_ip][hw_prio].sched[(*num_sched)++] = &ring->sched;

-:461: WARNING: line over 81 characters
#461: FILE: drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:1302:
+			     &adev->gfx.eop_irq, irq_type, AMDGPU_RING_PRIO_DEFAULT);

-:510: WARNING: line over 81 characters
#510: FILE: drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c:3113:
+				     &adev->gfx.eop_irq, AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP,

-:520: WARNING: line over 81 characters
#520: FILE: drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c:3136:
+				     &adev->gfx.eop_irq, irq_type, AMDGPU_RING_PRIO_DEFAULT);

-:542: WARNING: line over 81 characters
#542: FILE: drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c:4508:
+				     &adev->gfx.eop_irq, AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP,

-:827: WARNING: line over 81 characters
#827: FILE: drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:455:
+			r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst[j].irq, 0,

-:837: WARNING: line over 81 characters
#837: FILE: drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c:475:
+			r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst[j].irq, 0,

-:851: WARNING: line over 81 characters
#851: FILE: drivers/gpu/drm/amd/amdgpu/vce_v2_0.c:437:
+				     &adev->vce.irq, 0, AMDGPU_RING_PRIO_DEFAULT);

-:950: WARNING: line over 81 characters
#950: FILE: drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c:207:
+			r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst[j].irq, 0,

total: 0 errors, 11 warnings, 2 checks, 675 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
       mechanically convert to the typical style using --fix or --fix-inplace.

Your patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
       them to the maintainer, see CHECKPATCH in MAINTAINERS.
$_


+
  	for (i = 0; i < DRM_SCHED_PRIORITY_MAX; ++i)
  		atomic_set(&ring->num_jobs[i], 0);

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
index 080024d21d3e..219fb1a07b12 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
@@ -35,6 +35,9 @@
  #define AMDGPU_MAX_VCE_RINGS		3
  #define AMDGPU_MAX_UVD_ENC_RINGS	2

+#define AMDGPU_RING_PRIO_DEFAULT	1
+#define AMDGPU_RING_PRIO_MAX		AMDGPU_GFX_PIPE_PRIO_MAX
+
  /* some special values for the owner field */
  #define AMDGPU_FENCE_OWNER_UNDEFINED	((void *)0ul)
  #define AMDGPU_FENCE_OWNER_VM		((void *)1ul)
@@ -52,11 +55,11 @@ enum amdgpu_ring_type {
  	AMDGPU_RING_TYPE_SDMA,
  	AMDGPU_RING_TYPE_UVD,
  	AMDGPU_RING_TYPE_VCE,
-	AMDGPU_RING_TYPE_KIQ,
  	AMDGPU_RING_TYPE_UVD_ENC,
  	AMDGPU_RING_TYPE_VCN_DEC,
  	AMDGPU_RING_TYPE_VCN_ENC,
-	AMDGPU_RING_TYPE_VCN_JPEG
+	AMDGPU_RING_TYPE_VCN_JPEG,
+	AMDGPU_RING_TYPE_KIQ
  };

  struct amdgpu_device;
@@ -221,7 +224,6 @@ struct amdgpu_ring {
  	struct mutex		priority_mutex;
  	/* protected by priority_mutex */
  	int			priority;
-	bool			has_high_prio;

  #if defined(CONFIG_DEBUG_FS)
  	struct dentry *ent;
@@ -259,8 +261,8 @@ void amdgpu_ring_generic_pad_ib(struct amdgpu_ring *ring, struct amdgpu_ib *ib);
  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 ring_size, struct amdgpu_irq_src *irq_src,
-		     unsigned irq_type);
+		     unsigned int ring_size, struct amdgpu_irq_src *irq_src,
+		     unsigned int irq_type, unsigned int prio);
  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,
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
index 2f4412e030a4..e5b8fb8e75c5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h
@@ -61,8 +61,6 @@ struct amdgpu_sdma_ras_funcs {

  struct amdgpu_sdma {
  	struct amdgpu_sdma_instance instance[AMDGPU_MAX_SDMA_INSTANCES];
-	struct drm_gpu_scheduler    *sdma_sched[AMDGPU_MAX_SDMA_INSTANCES];
-	uint32_t		    num_sdma_sched;
  	struct amdgpu_irq_src	trap_irq;
  	struct amdgpu_irq_src	illegal_inst_irq;
  	struct amdgpu_irq_src	ecc_irq;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
index 6fe057329de2..2d0633d5515f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
@@ -196,10 +196,6 @@ struct amdgpu_vcn {
  	uint8_t	num_vcn_inst;
  	struct amdgpu_vcn_inst	 inst[AMDGPU_MAX_VCN_INSTANCES];
  	struct amdgpu_vcn_reg	 internal;
-	struct drm_gpu_scheduler *vcn_enc_sched[AMDGPU_MAX_VCN_ENC_RINGS];
-	struct drm_gpu_scheduler *vcn_dec_sched[AMDGPU_MAX_VCN_INSTANCES];
-	uint32_t		 num_vcn_enc_sched;
-	uint32_t		 num_vcn_dec_sched;

  	unsigned	harvest_config;
  	int (*pause_dpg_mode)(struct amdgpu_device *adev,
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
index cc1033784720..20f108818b2b 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
@@ -979,7 +979,8 @@ static int cik_sdma_sw_init(void *handle)
  				     &adev->sdma.trap_irq,
  				     (i == 0) ?
  				     AMDGPU_SDMA_IRQ_INSTANCE0 :
-				     AMDGPU_SDMA_IRQ_INSTANCE1);
+				     AMDGPU_SDMA_IRQ_INSTANCE1,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 51be7aa2d5ec..18e6d1b0dee9 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -1299,7 +1299,7 @@ static int gfx_v10_0_gfx_ring_init(struct amdgpu_device *adev, int ring_id,

  	irq_type = AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP + ring->pipe;
  	r = amdgpu_ring_init(adev, ring, 1024,
-			     &adev->gfx.eop_irq, irq_type);
+			     &adev->gfx.eop_irq, irq_type, AMDGPU_RING_PRIO_DEFAULT);
  	if (r)
  		return r;
  	return 0;
@@ -1310,7 +1310,8 @@ static int gfx_v10_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
  {
  	int r;
  	unsigned irq_type;
-	struct amdgpu_ring *ring = &adev->gfx.compute_ring[ring_id];
+	struct amdgpu_ring *ring;
+	int hw_prio;

  	ring = &adev->gfx.compute_ring[ring_id];

@@ -1329,10 +1330,11 @@ static int gfx_v10_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
  	irq_type = AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP
  		+ ((ring->me - 1) * adev->gfx.mec.num_pipe_per_mec)
  		+ ring->pipe;
-
+	hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring->queue) ?
+			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);
+			     &adev->gfx.eop_irq, irq_type, hw_prio);
  	if (r)
  		return r;

@@ -3261,11 +3263,8 @@ static void gfx_v10_0_compute_mqd_set_priority(struct amdgpu_ring *ring, struct
  	if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) {
  		if (amdgpu_gfx_is_high_priority_compute_queue(adev, ring->queue)) {
  			mqd->cp_hqd_pipe_priority = AMDGPU_GFX_PIPE_PRIO_HIGH;
-			ring->has_high_prio = true;
  			mqd->cp_hqd_queue_priority =
  				AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM;
-		} else {
-			ring->has_high_prio = false;
  		}
  	}
  }
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 73d2b96e02b1..e5252aafabf0 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
@@ -3110,7 +3110,8 @@ static int gfx_v6_0_sw_init(void *handle)
  		ring->ring_obj = NULL;
  		sprintf(ring->name, "gfx");
  		r = amdgpu_ring_init(adev, ring, 1024,
-				     &adev->gfx.eop_irq, AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP);
+				     &adev->gfx.eop_irq, AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
@@ -3132,7 +3133,7 @@ static int gfx_v6_0_sw_init(void *handle)
  		sprintf(ring->name, "comp_%d.%d.%d", ring->me, ring->pipe, ring->queue);
  		irq_type = AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP + ring->pipe;
  		r = amdgpu_ring_init(adev, ring, 1024,
-				     &adev->gfx.eop_irq, irq_type);
+				     &adev->gfx.eop_irq, irq_type, AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index f5ab0f1c6ca6..bb489246f9aa 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -4433,7 +4433,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);
+			&adev->gfx.eop_irq, irq_type, AMDGPU_RING_PRIO_DEFAULT);
  	if (r)
  		return r;

@@ -4505,7 +4505,8 @@ static int gfx_v7_0_sw_init(void *handle)
  		ring->ring_obj = NULL;
  		sprintf(ring->name, "gfx");
  		r = amdgpu_ring_init(adev, ring, 1024,
-				     &adev->gfx.eop_irq, AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP);
+				     &adev->gfx.eop_irq, AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 5e5d7bae57ec..2da78ea55b8a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -1894,6 +1894,7 @@ static int gfx_v8_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
  	int r;
  	unsigned irq_type;
  	struct amdgpu_ring *ring = &adev->gfx.compute_ring[ring_id];
+	int hw_prio;

  	ring = &adev->gfx.compute_ring[ring_id];

@@ -1913,9 +1914,11 @@ static int gfx_v8_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
  		+ ((ring->me - 1) * adev->gfx.mec.num_pipe_per_mec)
  		+ ring->pipe;

+	hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring->queue) ?
+			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);
+			&adev->gfx.eop_irq, irq_type, hw_prio);
  	if (r)
  		return r;

@@ -2019,7 +2022,8 @@ 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_CP_IRQ_GFX_ME0_PIPE0_EOP,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
@@ -4432,11 +4436,8 @@ static void gfx_v8_0_mqd_set_priority(struct amdgpu_ring *ring, struct vi_mqd *m
  	if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) {
  		if (amdgpu_gfx_is_high_priority_compute_queue(adev, ring->queue)) {
  			mqd->cp_hqd_pipe_priority = AMDGPU_GFX_PIPE_PRIO_HIGH;
-			ring->has_high_prio = true;
  			mqd->cp_hqd_queue_priority =
  				AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM;
-		} else {
-			ring->has_high_prio = false;
  		}
  	}
  }
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 1fea077ef748..1486e612da39 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -2190,6 +2190,7 @@ static int gfx_v9_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
  	int r;
  	unsigned irq_type;
  	struct amdgpu_ring *ring = &adev->gfx.compute_ring[ring_id];
+	int hw_prio;

  	ring = &adev->gfx.compute_ring[ring_id];

@@ -2208,10 +2209,11 @@ static int gfx_v9_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
  	irq_type = AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP
  		+ ((ring->me - 1) * adev->gfx.mec.num_pipe_per_mec)
  		+ ring->pipe;
-
+	hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring->queue) ?
+			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);
+			     &adev->gfx.eop_irq, irq_type, hw_prio);
  	if (r)
  		return r;

@@ -2305,7 +2307,9 @@ static int gfx_v9_0_sw_init(void *handle)
  		ring->use_doorbell = true;
  		ring->doorbell_index = adev->doorbell_index.gfx_ring0 << 1;
  		r = amdgpu_ring_init(adev, ring, 1024,
-				     &adev->gfx.eop_irq, AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP);
+				     &adev->gfx.eop_irq,
+				     AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
@@ -3369,11 +3373,8 @@ static void gfx_v9_0_mqd_set_priority(struct amdgpu_ring *ring, struct v9_mqd *m
  	if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) {
  		if (amdgpu_gfx_is_high_priority_compute_queue(adev, ring->queue)) {
  			mqd->cp_hqd_pipe_priority = AMDGPU_GFX_PIPE_PRIO_HIGH;
-			ring->has_high_prio = true;
  			mqd->cp_hqd_queue_priority =
  				AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM;
-		} else {
-			ring->has_high_prio = false;
  		}
  	}
  }
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c
index 0debfd9f428c..0105519a856f 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c
@@ -480,7 +480,8 @@ 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);
+	r = amdgpu_ring_init(adev, ring, 512, &adev->jpeg.inst->irq, 0,
+			     AMDGPU_RING_PRIO_DEFAULT);
  	if (r)
  		return r;

diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
index ba6aeff122da..9ae8247fb13b 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c
@@ -106,7 +106,8 @@ static int jpeg_v2_0_sw_init(void *handle)
  	ring->use_doorbell = true;
  	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);
+	r = amdgpu_ring_init(adev, ring, 512, &adev->jpeg.inst->irq, 0,
+			     AMDGPU_RING_PRIO_DEFAULT);
  	if (r)
  		return r;

diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
index c04c2078a7c1..54f66926f0d8 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c
@@ -118,7 +118,8 @@ static int jpeg_v2_5_sw_init(void *handle)
  		ring->use_doorbell = true;
  		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);
+		r = amdgpu_ring_init(adev, ring, 512, &adev->jpeg.inst[i].irq, 0,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
index 9211583adfa8..5f304d61999e 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
@@ -873,7 +873,8 @@ static int sdma_v2_4_sw_init(void *handle)
  				     &adev->sdma.trap_irq,
  				     (i == 0) ?
  				     AMDGPU_SDMA_IRQ_INSTANCE0 :
-				     AMDGPU_SDMA_IRQ_INSTANCE1);
+				     AMDGPU_SDMA_IRQ_INSTANCE1,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index 8077b01c1f52..c59f6f6f4c09 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -1157,7 +1157,8 @@ static int sdma_v3_0_sw_init(void *handle)
  				     &adev->sdma.trap_irq,
  				     (i == 0) ?
  				     AMDGPU_SDMA_IRQ_INSTANCE0 :
-				     AMDGPU_SDMA_IRQ_INSTANCE1);
+				     AMDGPU_SDMA_IRQ_INSTANCE1,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index db03bcff3348..352cd9632770 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -1859,7 +1859,8 @@ 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_SDMA_IRQ_INSTANCE0 + i,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;

@@ -1877,7 +1878,8 @@ static int sdma_v4_0_sw_init(void *handle)
  			sprintf(ring->name, "page%d", i);
  			r = amdgpu_ring_init(adev, ring, 1024,
  					     &adev->sdma.trap_irq,
-					     AMDGPU_SDMA_IRQ_INSTANCE0 + i);
+					     AMDGPU_SDMA_IRQ_INSTANCE0 + i,
+					     AMDGPU_RING_PRIO_DEFAULT);
  			if (r)
  				return r;
  		}
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
index d6299786a068..5e6e4ea1a8ee 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c
@@ -1234,7 +1234,8 @@ static int sdma_v5_0_sw_init(void *handle)
  				     &adev->sdma.trap_irq,
  				     (i == 0) ?
  				     AMDGPU_SDMA_IRQ_INSTANCE0 :
-				     AMDGPU_SDMA_IRQ_INSTANCE1);
+				     AMDGPU_SDMA_IRQ_INSTANCE1,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c b/drivers/gpu/drm/amd/amdgpu/si_dma.c
index 3da3422c2d77..7d2bbcbe547b 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dma.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c
@@ -504,7 +504,8 @@ static int si_dma_sw_init(void *handle)
  				     &adev->sdma.trap_irq,
  				     (i == 0) ?
  				     AMDGPU_SDMA_IRQ_INSTANCE0 :
-				     AMDGPU_SDMA_IRQ_INSTANCE1);
+				     AMDGPU_SDMA_IRQ_INSTANCE1,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
index 957e14e2c155..3cafba726587 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
@@ -118,7 +118,8 @@ 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);
+	r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst->irq, 0,
+			     AMDGPU_RING_PRIO_DEFAULT);
  	if (r)
  		return r;

diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
index 2aad6689823b..a566ff926e90 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
@@ -116,7 +116,8 @@ 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);
+	r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst->irq, 0,
+			     AMDGPU_RING_PRIO_DEFAULT);
  	if (r)
  		return r;

diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
index 81186be66600..0a880bc101b8 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
@@ -418,7 +418,8 @@ 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);
+	r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst->irq, 0,
+			     AMDGPU_RING_PRIO_DEFAULT);
  	if (r)
  		return r;

@@ -430,7 +431,9 @@ static int uvd_v6_0_sw_init(void *handle)
  		for (i = 0; i < adev->uvd.num_enc_rings; ++i) {
  			ring = &adev->uvd.inst->ring_enc[i];
  			sprintf(ring->name, "uvd_enc%d", i);
-			r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst->irq, 0);
+			r = amdgpu_ring_init(adev, ring, 512,
+					     &adev->uvd.inst->irq, 0,
+					     AMDGPU_RING_PRIO_DEFAULT);
  			if (r)
  				return r;
  		}
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
index eef56211b3a2..db8364667177 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
@@ -452,7 +452,8 @@ static int uvd_v7_0_sw_init(void *handle)
  		if (!amdgpu_sriov_vf(adev)) {
  			ring = &adev->uvd.inst[j].ring;
  			sprintf(ring->name, "uvd_%d", ring->me);
-			r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst[j].irq, 0);
+			r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst[j].irq, 0,
+					     AMDGPU_RING_PRIO_DEFAULT);
  			if (r)
  				return r;
  		}
@@ -471,7 +472,8 @@ static int uvd_v7_0_sw_init(void *handle)
  				else
  					ring->doorbell_index = adev->doorbell_index.uvd_vce.uvd_ring2_3 * 2 + 1;
  			}
-			r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst[j].irq, 0);
+			r = amdgpu_ring_init(adev, ring, 512, &adev->uvd.inst[j].irq, 0,
+					     AMDGPU_RING_PRIO_DEFAULT);
  			if (r)
  				return r;
  		}
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
index b6837fcfdba7..74c9f567bcd6 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c
@@ -434,7 +434,7 @@ static int vce_v2_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);
+				     &adev->vce.irq, 0, AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
index 217db187207c..6d9108fa22e0 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
@@ -442,7 +442,8 @@ static int vce_v3_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);
+		r = amdgpu_ring_init(adev, ring, 512, &adev->vce.irq, 0,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
index 5e986dea4645..a0fb119240f4 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
@@ -476,7 +476,8 @@ static int vce_v4_0_sw_init(void *handle)
  			else
  				ring->doorbell_index = adev->doorbell_index.uvd_vce.vce_ring2_3 * 2 + 1;
  		}
-		r = amdgpu_ring_init(adev, ring, 512, &adev->vce.irq, 0);
+		r = amdgpu_ring_init(adev, ring, 512, &adev->vce.irq, 0,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
index f570ac72a351..1ad79155ed00 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
@@ -127,7 +127,8 @@ 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);
+	r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0,
+			     AMDGPU_RING_PRIO_DEFAULT);
  	if (r)
  		return r;

@@ -145,7 +146,8 @@ static int vcn_v1_0_sw_init(void *handle)
  	for (i = 0; i < adev->vcn.num_enc_rings; ++i) {
  		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);
+		r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
index b3b5e5cac400..89ebeb28f499 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
@@ -133,7 +133,8 @@ static int vcn_v2_0_sw_init(void *handle)
  	ring->doorbell_index = adev->doorbell_index.vcn.vcn_ring0_1 << 1;

  	sprintf(ring->name, "vcn_dec");
-	r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0);
+	r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0,
+			     AMDGPU_RING_PRIO_DEFAULT);
  	if (r)
  		return r;

@@ -163,7 +164,8 @@ static int vcn_v2_0_sw_init(void *handle)
  		else
  			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);
+		r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;
  	}
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
index 22540265aee5..c881e1b28481 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
@@ -191,7 +191,8 @@ static int vcn_v2_5_sw_init(void *handle)
  		ring->doorbell_index = (adev->doorbell_index.vcn.vcn_ring0_1 << 1) +
  				(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);
+		r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst[j].irq, 0,
+				     AMDGPU_RING_PRIO_DEFAULT);
  		if (r)
  			return r;

@@ -203,7 +204,8 @@ static int vcn_v2_5_sw_init(void *handle)
  					(amdgpu_sriov_vf(adev) ? (1 + i + 2*j) : (2 + i + 8*j));

  			sprintf(ring->name, "vcn_enc_%d.%d", j, i);
-			r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst[j].irq, 0);
+			r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst[j].irq, 0,
+					     AMDGPU_RING_PRIO_DEFAULT);
  			if (r)
  				return r;
  		}
--
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cluben.tuikov%40amd.com%7C05503615828d419b121d08d7d4c14931%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637211798960734673&amp;sdata=t4PJwt2ooR471rAFEt1pDCwqyX4N7%2B6pSTpNpf%2B8s4o%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux