[PATCH 12/12] drm/amdgpu: cleanup VCN3 and VCN4 instance limiting v2
Christian König
ckoenig.leichtzumerken at gmail.com
Mon Sep 5 12:32:32 UTC 2022
Check if the entity is already limited, not if it's assigned to the
first instance.
v2: only a cleanup, not a fix
Signed-off-by: Christian König <christian.koenig at amd.com>
---
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 5 ++---
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 5 ++---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
index 3cabceee5f57..5e64c3426728 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
@@ -1862,13 +1862,12 @@ static int vcn_v3_0_ring_patch_cs_in_place(struct amdgpu_cs_parser *p,
struct amdgpu_job *job,
struct amdgpu_ib *ib)
{
- struct amdgpu_ring *ring = to_amdgpu_ring(job->base.sched);
uint32_t msg_lo = 0, msg_hi = 0;
unsigned i;
int r;
- /* The first instance can decode anything */
- if (!ring->me)
+ /* Abort if it's already limited */
+ if (job->base.entity->num_sched_list <= 1)
return 0;
for (i = 0; i < ib->length_dw; i += 2) {
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
index 9338172eec8b..a8264fe2201d 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c
@@ -1430,13 +1430,12 @@ static int vcn_v4_0_ring_patch_cs_in_place(struct amdgpu_cs_parser *p,
struct amdgpu_job *job,
struct amdgpu_ib *ib)
{
- struct amdgpu_ring *ring = to_amdgpu_ring(job->base.entity->rq->sched);
struct amdgpu_vcn_decode_buffer *decode_buffer;
uint64_t addr;
uint32_t val;
- /* The first instance can decode anything */
- if (!ring->me)
+ /* Abort if it's already limited */
+ if (job->base.entity->num_sched_list <= 1)
return 0;
/* unified queue ib header has 8 double words. */
--
2.25.1
More information about the amd-gfx
mailing list