AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: "Andrey Grodzovsky" <andrey.grodzovsky@amd.com>,
	"Christian König" <ckoenig.leichtzumerken@gmail.com>,
	amd-gfx@lists.freedesktop.org, Marek.Olsak@amd.com,
	timur.kristof@gmail.com, Yogesh.Mohanmarimuthu@amd.com
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 01/10] drm/sched: move calling drm_sched_entity_select_rq
Date: Thu, 14 Jul 2022 18:26:45 +0200	[thread overview]
Message-ID: <49b28cb0-ecc5-836e-aa57-1ea133f8d2a8@amd.com> (raw)
In-Reply-To: <9bfa0ac5-b3da-8682-25d7-b818faf9a1ec@amd.com>

We need this for limiting codecs like AV1 to the first instance for VCN3.

Essentially the idea is that we first initialize the job with entity, id 
etc... and before we submit it we select a new rq for the entity. In the 
meantime the VCN3 inline parse will have modified the available rqs for 
the entity.

See the patch "revert "fix limiting AV1 to the first instance on VCN3"" 
as well.

Christian.

Am 14.07.22 um 17:43 schrieb Andrey Grodzovsky:
> Can you please remind me of the use case that requires this ? I 
> browsed through
> related mails in the past but haven't found when is that needed. For 
> amdgpu
> drm_sched_job_init and drm_sched_job_arm are called together and amdgpu
> is the only one who supports modifying entity priority on the fly as 
> far as i see.
>
> Andrey
>
> On 2022-07-14 06:38, Christian König wrote:
>> We already discussed that the call to drm_sched_entity_select_rq() needs
>> to move to drm_sched_job_arm() to be able to set a new scheduler list
>> between _init() and _arm(). This was just not applied for some reason.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> CC: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
>> CC: dri-devel@lists.freedesktop.org
>> ---
>>   drivers/gpu/drm/scheduler/sched_main.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/scheduler/sched_main.c 
>> b/drivers/gpu/drm/scheduler/sched_main.c
>> index 68317d3a7a27..e0ab14e0fb6b 100644
>> --- a/drivers/gpu/drm/scheduler/sched_main.c
>> +++ b/drivers/gpu/drm/scheduler/sched_main.c
>> @@ -592,7 +592,6 @@ int drm_sched_job_init(struct drm_sched_job *job,
>>                  struct drm_sched_entity *entity,
>>                  void *owner)
>>   {
>> -    drm_sched_entity_select_rq(entity);
>>       if (!entity->rq)
>>           return -ENOENT;
>>   @@ -628,7 +627,7 @@ void drm_sched_job_arm(struct drm_sched_job *job)
>>       struct drm_sched_entity *entity = job->entity;
>>         BUG_ON(!entity);
>> -
>> +    drm_sched_entity_select_rq(entity);
>>       sched = entity->rq->sched;
>>         job->sched = sched;


  reply	other threads:[~2022-07-14 16:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14 10:38 Gang submit v2 Christian König
2022-07-14 10:38 ` [PATCH 01/10] drm/sched: move calling drm_sched_entity_select_rq Christian König
2022-07-14 15:43   ` Andrey Grodzovsky
2022-07-14 16:26     ` Christian König [this message]
2022-07-14 18:25       ` Andrey Grodzovsky
2022-07-14 10:38 ` [PATCH 02/10] drm/amdgpu: Protect the amdgpu_bo_list list with a mutex v2 Christian König
2022-07-14 15:10   ` Alex Deucher
2022-07-14 19:10   ` Luben Tuikov
2022-07-14 10:38 ` [PATCH 03/10] drm/amdgpu: revert "partial revert "remove ctx->lock" v2" Christian König
2022-07-14 10:38 ` [PATCH 04/10] drm/amdgpu: use DMA_RESV_USAGE_BOOKKEEP Christian König
2022-07-14 10:38 ` [PATCH 05/10] drm/amdgpu: cleanup and reorder amdgpu_cs.c Christian König
2022-07-14 10:38 ` [PATCH 06/10] drm/amdgpu: remove SRIOV and MCBP dependencies from the CS Christian König
2022-07-14 10:38 ` [PATCH 07/10] drm/amdgpu: move setting the job resources Christian König
2022-07-14 15:40   ` Luben Tuikov
2022-07-14 18:32   ` Andrey Grodzovsky
2022-07-14 10:39 ` [PATCH 08/10] drm/amdgpu: revert "fix limiting AV1 to the first instance on VCN3" Christian König
2022-07-14 10:39 ` [PATCH 09/10] drm/amdgpu: add gang submit backend Christian König
2022-07-14 14:36   ` Andrey Grodzovsky
2022-07-14 19:32   ` Luben Tuikov
2022-07-14 10:39 ` [PATCH 10/10] drm/amdgpu: add gang submit frontend v2 Christian König
2022-07-14 19:10   ` Andrey Grodzovsky

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=49b28cb0-ecc5-836e-aa57-1ea133f8d2a8@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Marek.Olsak@amd.com \
    --cc=Yogesh.Mohanmarimuthu@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrey.grodzovsky@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=timur.kristof@gmail.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