AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Nirmoy Das <nirmoy.aiemd@gmail.com>, amd-gfx@lists.freedesktop.org
Cc: alexander.deucher@amd.com, Boyuan.Zhang@amd.com,
	nirmoy.das@amd.com, Leo.Liu@amd.com, James.Zhu@amd.com
Subject: Re: [PATCH 2/2] drm/amdgpu: disable gpu_sched load balancer for vcn jobs
Date: Fri, 13 Mar 2020 15:03:55 +0100	[thread overview]
Message-ID: <338f39d6-fd4c-0823-4da8-e81115ee9c60@amd.com> (raw)
In-Reply-To: <20200313135953.68418-2-nirmoy.das@amd.com>

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@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;

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-03-13 14:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 13:59 [PATCH v2 1/2] drm/sched: implement and export drm_sched_pick_best Nirmoy Das
2020-03-13 13:59 ` [PATCH 2/2] drm/amdgpu: disable gpu_sched load balancer for vcn jobs Nirmoy Das
2020-03-13 14:03   ` Christian König [this message]
2020-03-13 14:11     ` Nirmoy
2020-03-13 14:02 ` [PATCH v2 1/2] drm/sched: implement and export drm_sched_pick_best Christian König
2020-03-13 14:03 ` Nirmoy
  -- strict thread matches above, loose matches on Subject: below --
2020-03-13 12:05 [PATCH " Nirmoy Das
2020-03-13 12:05 ` [PATCH 2/2] drm/amdgpu: disable gpu_sched load balancer for vcn jobs Nirmoy Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=338f39d6-fd4c-0823-4da8-e81115ee9c60@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Boyuan.Zhang@amd.com \
    --cc=James.Zhu@amd.com \
    --cc=Leo.Liu@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=nirmoy.aiemd@gmail.com \
    --cc=nirmoy.das@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox