[PATCH 2/2] drm/amdgpu: disable gpu_sched load balancer for vcn jobs
Christian König
christian.koenig at amd.com
Fri Mar 13 14:03:55 UTC 2020
Am 13.03.20 um 14:59 schrieb Nirmoy Das:
> VCN HW doesn't support dynamic load balance on multiple instances
> for a context. This patch initializes VNC entities with only one
> drm_gpu_scheduler picked by drm_sched_pick_best(). Picking a
> drm_gpu_scheduler using drm_sched_pick_best() ensures that we
> do load balance among multiple contexts but not among multiple
> jobs in a context.
>
> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> index fa575bdc03c8..8f1e3c05812e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> @@ -121,12 +121,17 @@ static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, const u32 hw_ip, const
> num_scheds = 1;
> break;
> case AMDGPU_HW_IP_VCN_DEC:
> - scheds = adev->vcn.vcn_dec_sched;
> num_scheds = adev->vcn.num_vcn_dec_sched;
> + sched = drm_sched_pick_best(adev->vcn.vcn_dec_sched,
> + num_scheds);
> + scheds = &sched;
> break;
> case AMDGPU_HW_IP_VCN_ENC:
> scheds = adev->vcn.vcn_enc_sched;
> num_scheds = adev->vcn.num_vcn_enc_sched;
> + sched = drm_sched_pick_best(adev->vcn.vcn_enc_sched,
> + num_scheds);
> + scheds = &sched;
num_scheds need to be set to 1 here and above.
And maybe add a separate patch to fix the indentation of the case labels.
Christian.
> break;
> case AMDGPU_HW_IP_VCN_JPEG:
> scheds = adev->jpeg.jpeg_sched;
More information about the amd-gfx
mailing list