Skip to contentSkip to conversation

amdgpu/uvd: get ring reference from rq scheduler

PATCH In review David (Ming Qiang) Wu 2 participants 2 messages Dec 4, 2024 – Dec 5, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amdgpu/uvd: get ring reference from rq scheduler

base.sched may not be set for each instance and should not be used for cases such as non-IB tests.

---
 drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +1 -1
index 53249d4ff8ec..9d237b5937fb 100644
@@ -1288,7 +1288,7 @@ static int uvd_v7_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);
+	struct amdgpu_ring *ring = amdgpu_job_ring(job);
 	unsigned i;
 
 	/* No patching necessary for the first instance */
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Am 05.12.24 um 00:31 schrieb David (Ming Qiang) Wu:

Quoted 4 lines

base.sched may not be set for each instance and should not be used for cases such as non-IB tests.

Quoted 17 lines
---
  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +1 -1
index 53249d4ff8ec..9d237b5937fb 100644
@@ -1288,7 +1288,7 @@ static int uvd_v7_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);
+	struct amdgpu_ring *ring = amdgpu_job_ring(job);
  	unsigned i;
 
  	/* No patching necessary for the first instance */