Skip to content

Commit 9db5ec1

Browse files
Sonny Jiangalexdeucher
authored andcommitted
drm/amdgpu: vcn_4_0 set instance 0 init sched score to 1
Only vcn0 can process AV1 codecx. In order to use both vcn0 and vcn1 in h264/265 transcode to AV1 cases, set vcn0 sched score to 1 at initialization time. Signed-off-by: Sonny Jiang <[email protected]> Reviewed-by: Leo Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.1.x
1 parent 7ac9be9 commit 9db5ec1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ static int vcn_v4_0_sw_init(void *handle)
129129
if (adev->vcn.harvest_config & (1 << i))
130130
continue;
131131

132-
atomic_set(&adev->vcn.inst[i].sched_score, 0);
132+
/* Init instance 0 sched_score to 1, so it's scheduled after other instances */
133+
if (i == 0)
134+
atomic_set(&adev->vcn.inst[i].sched_score, 1);
135+
else
136+
atomic_set(&adev->vcn.inst[i].sched_score, 0);
133137

134138
/* VCN UNIFIED TRAP */
135139
r = amdgpu_irq_add_id(adev, amdgpu_ih_clientid_vcns[i],

0 commit comments

Comments
 (0)