drm/amdgpu: disable gpu-sched load balance for uvd_enc
Subsystems (2)
PATCH 1/1 drm/amdgpu: disable gpu-sched load balance for uvd_enc
On hardware with multiple uvd instances, dependent uvd_enc jobs may get scheduled to different uvd instances. Because uvd_enc jobs retain hw context, dependent jobs should always run on the same uvd instance. This patch disables GPU scheduler's load balancer for a context that binds jobs from same the context to a uvd instance.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +2 -0
@@ -114,8 +114,10 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, scheds = adev->gpu_sched[hw_ip][hw_prio].sched; num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds; +/* disable load balance if the hw engine retains context among dependent jobs */ if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || hw_ip ==AMDGPU_HW_IP_VCN_DEC || + hw_ip ==AMDGPU_HW_IP_UVD_ENC || hw_ip ==AMDGPU_HW_IP_UVD ) { sched =drm_sched_pick_best (scheds, num_scheds); scheds = &sched;
--
2.28.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Please ignore this.
Quoted 6 lines · Nirmoy Das
On hardware with multiple uvd instances, dependent
uvd_encjobs may get scheduled to different uvd instances. Becauseuvd_encjobs retain hw context, dependent jobs should always run on the same uvd instance. This patch disables GPU scheduler's load balancer for a context that binds jobs from same the context to a uvd instance.
from same the context --> from the same context
Quoted 22 lines
Signed-off-by Nirmoy Das <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +2
-1@@ -114,8 +114,10 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip, scheds = adev->gpu_sched[hw_ip][hw_prio].sched; num_scheds = adev->gpu_sched[hw_ip][hw_prio].num_scheds; +/* disable load balance if the hw engine retains context among dependent jobs */ if (hw_ip ==AMDGPU_HW_IP_VCN_ENC || hw_ip ==AMDGPU_HW_IP_VCN_DEC || + hw_ip ==AMDGPU_HW_IP_UVD_ENC || hw_ip ==AMDGPU_HW_IP_UVD ) { sched =drm_sched_pick_best (scheds, num_scheds); scheds = &sched; --
Quoted 2 lines
2.28.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx