From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.9 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MIME_HTML_MOSTLY,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4A4FC433B4 for ; Wed, 28 Apr 2021 09:06:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42491613B1 for ; Wed, 28 Apr 2021 09:06:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42491613B1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A013E6E156; Wed, 28 Apr 2021 09:06:43 +0000 (UTC) Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E5246E156 for ; Wed, 28 Apr 2021 09:06:41 +0000 (UTC) Received: by mail-ej1-x62f.google.com with SMTP id u3so14833871eja.12 for ; Wed, 28 Apr 2021 02:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=CFgmmN5GfQyM7QcDyAI04KzEC3fMC8Xko2cr1E2naXI=; b=ma7/ndcBW3C72/CvVb/BlagpHpVkah3TfukGmbq8cY/ZLWcCS7CWm49r7ImXyPy/M4 mxOEYtE+PJIKB2qy3Kl0r5lZTDtMe8HKDh/I3fS0McqaSngbC7Gr7sE3Me061UUY6w+6 MT+4gomGm51g68oqT6jFmy2ABGsz3NQJGTx3f9fZo8tHLgPynFA7DrXpQ5JX+gBmuW1G vk9H67X8x5Y3wEQer/E07CsqzWQHDLKTummP4AphMgIFUDZZuKo0sznDJ3ZSaNA2azof CiZIzpob/zAG0pIeIddwMVuwv/cDVrrqlHdZsZYF5/8UcDNpjyUn6ACQ+b51d1D3+n6n BSkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=CFgmmN5GfQyM7QcDyAI04KzEC3fMC8Xko2cr1E2naXI=; b=eCBsQzPDdJyRTbqi3H7mdxaXOApYwLrLOaBt567IF64V2yHtGn9jm4M9xalXPP7tZM sQ3/b5DcwgQ2WasOcJuHY7p8i4epenS96IMN77vSOOGH+xICpEiAqD6f/iO/HjmYo3u7 XgbJ6XfwMEQ2wNbX9G/CSYfmd/UQht+gUAuaC3IZ/EzGfpCZpWOYS97xlc3ZL2IWmZ4S 34eG7KFf0iBZL+wFswBHwpNgnXoWRIc6IVwWW5CJQn1d9hMfl7uc+hoTmo9Hn7SdS/Hh q6EVrHxIOILferKB0Q51y0TEmXjT/dtmDk+9fPZoKMU6vtL/IpXthX3EDcUFaQjEO//y +C2w== X-Gm-Message-State: AOAM530xkdWiJdjLH7OTfoeMahEBgRMchxg1TWzSZX9ghnJLrF5cLXrP 7ZHWFpwrzYYbjbb1JUB6WSE= X-Google-Smtp-Source: ABdhPJx9HjhaAxUXY37ihpsn6UL2XUIbB8ItXbJ/sqVbvGIfR66SORvDi8DHqzLxLG34K8JNO1RrMA== X-Received: by 2002:a17:906:60d6:: with SMTP id f22mr27623679ejk.177.1619600800173; Wed, 28 Apr 2021 02:06:40 -0700 (PDT) Received: from ?IPv6:2a02:908:1252:fb60:3f0d:4946:a7a8:ad7c? ([2a02:908:1252:fb60:3f0d:4946:a7a8:ad7c]) by smtp.gmail.com with ESMTPSA id g17sm577729edv.47.2021.04.28.02.06.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Apr 2021 02:06:39 -0700 (PDT) Subject: Re: [PATCH 1/2] drm/scheduler: Change scheduled fence track To: "Deng, Emily" , "Deucher, Alexander" References: <20210426062701.39732-1-Roy.Sun@amd.com> <8b8ec884-5b0b-3409-b7b0-be7da43e3e71@gmail.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: <8529a53a-66ed-60a1-9ae4-279524e5a57f@gmail.com> Date: Wed, 28 Apr 2021 11:06:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: amd-gfx list , "Sun, Roy" , "Nieto, David M" Content-Type: multipart/mixed; boundary="===============2142800290==" Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" This is a multi-part message in MIME format. --===============2142800290== Content-Type: multipart/alternative; boundary="------------73150BC57CCE78D8A277C4FD" Content-Language: en-US This is a multi-part message in MIME format. --------------73150BC57CCE78D8A277C4FD Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Well none. As I said I will push this upstream through drm-misc-next. Christian. Am 28.04.21 um 10:32 schrieb Deng, Emily: > > [AMD Official Use Only - Internal Distribution Only] > > > Hi Alex and Christian, > > What extra work Roy need to do about this patch? And fdinfo? > > Best wishes > > Emily Deng > > *From:* amd-gfx *On Behalf Of > *Deucher, Alexander > *Sent:* Tuesday, April 27, 2021 3:52 AM > *To:* Christian König > *Cc:* Sun, Roy ; amd-gfx list > ; Nieto, David M > *Subject:* Re: [PATCH 1/2] drm/scheduler: Change scheduled fence track > > [AMD Official Use Only - Internal Distribution Only] > > [AMD Official Use Only - Internal Distribution Only] > > Fair point. Either way works for me. > > Alex > > ------------------------------------------------------------------------ > > *From:*Christian König > > *Sent:* Monday, April 26, 2021 3:48 PM > *To:* Deucher, Alexander > > *Cc:* amd-gfx list >; Sun, Roy >; Nieto, David M > > *Subject:* Re: [PATCH 1/2] drm/scheduler: Change scheduled fence track > > My concern is more to get this tested from more people than just AMD. > > Christian. > > Am 26.04.21 um 21:40 schrieb Deucher, Alexander: > > [AMD Official Use Only - Internal Distribution Only] > > That said, it would be easier for me to merge through the AMD tree > since a relatively big AMD feature depends on it.  Not sure how > much conflict potential there is if this goes through the AMD tree. > > Alex > > ------------------------------------------------------------------------ > > *From:*amd-gfx > on behalf of > Deucher, Alexander > > *Sent:* Monday, April 26, 2021 3:24 PM > *To:* Christian König > > *Cc:* amd-gfx list > ; Sun, Roy > ; Nieto, David M > > *Subject:* Re: [PATCH 1/2] drm/scheduler: Change scheduled fence > track > > [AMD Official Use Only - Internal Distribution Only] > > [AMD Official Use Only - Internal Distribution Only] > > No objections from me. > > Thanks! > > Alex > > ------------------------------------------------------------------------ > > *From:*Christian König > > *Sent:* Monday, April 26, 2021 2:49 AM > *To:* Deucher, Alexander > > *Cc:* Nieto, David M > ; Sun, Roy > ; amd-gfx list > > *Subject:* Re: [PATCH 1/2] drm/scheduler: Change scheduled fence > track > > Hey Alex, > > any objections that we merge those two patches through drm-misc-next? > > Thanks, > Christian. > > Am 26.04.21 um 08:27 schrieb Roy Sun: > > Update the timestamp of scheduled fence on HW > > completion of the previous fences > > > > This allow more accurate tracking of the fence > > execution in HW > > > > Signed-off-by: David M Nieto > > > Signed-off-by: Roy Sun > > --- > > drivers/gpu/drm/scheduler/sched_main.c | 12 ++++++++++-- > >   1 file changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/scheduler/sched_main.c > b/drivers/gpu/drm/scheduler/sched_main.c > > index 92d8de24d0a1..f8e39ab0c41b 100644 > > --- a/drivers/gpu/drm/scheduler/sched_main.c > > +++ b/drivers/gpu/drm/scheduler/sched_main.c > > @@ -515,7 +515,7 @@ void drm_sched_resubmit_jobs(struct > drm_gpu_scheduler *sched) > > EXPORT_SYMBOL(drm_sched_resubmit_jobs); > > > >   /** > > - * drm_sched_resubmit_jobs_ext - helper to relunch certain > number of jobs from mirror ring list > > + * drm_sched_resubmit_jobs_ext - helper to relaunch certain > number of jobs from pending list > >    * > >    * @sched: scheduler instance > >    * @max: job numbers to relaunch > > @@ -671,7 +671,7 @@ drm_sched_select_entity(struct > drm_gpu_scheduler *sched) > >   static struct drm_sched_job * > > drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched) > >   { > > -     struct drm_sched_job *job; > > +     struct drm_sched_job *job, *next; > > > >        /* > >         * Don't destroy jobs while the timeout worker is running > OR thread > > @@ -690,6 +690,14 @@ drm_sched_get_cleanup_job(struct > drm_gpu_scheduler *sched) > >        if (job && dma_fence_is_signaled(&job->s_fence->finished)) { > >                /* remove job from pending_list */ > > list_del_init(&job->list); > > We just need to record the scheduled time of the next job. So we > > need not to check the rest job. > > +             /* account for the next fence in the queue */ > > +             next = list_first_entry_or_null(&sched->pending_list, > > + struct drm_sched_job, list); > > +             if (next && test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, > > + &job->s_fence->finished.flags)) { > > + next->s_fence->scheduled.timestamp = > > + job->s_fence->finished.timestamp; > > +             } > >        } else { > >                job = NULL; > >                /* queue timeout for next job */ > --------------73150BC57CCE78D8A277C4FD Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit Well none. As I said I will push this upstream through drm-misc-next.

Christian.

Am 28.04.21 um 10:32 schrieb Deng, Emily:

[AMD Official Use Only - Internal Distribution Only]


Hi Alex and Christian,

What extra work Roy need to do about this patch? And fdinfo?

 

Best wishes

Emily Deng

From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Deucher, Alexander
Sent: Tuesday, April 27, 2021 3:52 AM
To: Christian König <ckoenig.leichtzumerken@gmail.com>
Cc: Sun, Roy <Roy.Sun@amd.com>; amd-gfx list <amd-gfx@lists.freedesktop.org>; Nieto, David M <David.Nieto@amd.com>
Subject: Re: [PATCH 1/2] drm/scheduler: Change scheduled fence track

 

[AMD Official Use Only - Internal Distribution Only]

 

[AMD Official Use Only - Internal Distribution Only]

 

Fair point.  Either way works for me.

 

Alex


From: Christian König <ckoenig.leichtzumerken@gmail.com>
Sent: Monday, April 26, 2021 3:48 PM
To: Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>; Sun, Roy <Roy.Sun@amd.com>; Nieto, David M <David.Nieto@amd.com>
Subject: Re: [PATCH 1/2] drm/scheduler: Change scheduled fence track

 

My concern is more to get this tested from more people than just AMD.

Christian.

Am 26.04.21 um 21:40 schrieb Deucher, Alexander:

[AMD Official Use Only - Internal Distribution Only]

 

That said, it would be easier for me to merge through the AMD tree since a relatively big AMD feature depends on it.  Not sure how much conflict potential there is if this goes through the AMD tree.

 

Alex

 


From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Deucher, Alexander <Alexander.Deucher@amd.com>
Sent: Monday, April 26, 2021 3:24 PM
To: Christian König <ckoenig.leichtzumerken@gmail.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>; Sun, Roy <Roy.Sun@amd.com>; Nieto, David M <David.Nieto@amd.com>
Subject: Re: [PATCH 1/2] drm/scheduler: Change scheduled fence track

 

[AMD Official Use Only - Internal Distribution Only]

 

[AMD Official Use Only - Internal Distribution Only]

 

No objections from me.

 

Thanks!

 

Alex

 


From: Christian König <ckoenig.leichtzumerken@gmail.com>
Sent: Monday, April 26, 2021 2:49 AM
To: Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: Nieto, David M <David.Nieto@amd.com>; Sun, Roy <Roy.Sun@amd.com>; amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm/scheduler: Change scheduled fence track

 

Hey Alex,

any objections that we merge those two patches through drm-misc-next?

Thanks,
Christian.

Am 26.04.21 um 08:27 schrieb Roy Sun:
> Update the timestamp of scheduled fence on HW
> completion of the previous fences
>
> This allow more accurate tracking of the fence
> execution in HW
>
> Signed-off-by: David M Nieto <david.nieto@amd.com>
> Signed-off-by: Roy Sun <Roy.Sun@amd.com>
> ---
>   drivers/gpu/drm/scheduler/sched_main.c | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index 92d8de24d0a1..f8e39ab0c41b 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -515,7 +515,7 @@ void drm_sched_resubmit_jobs(struct drm_gpu_scheduler *sched)
>   EXPORT_SYMBOL(drm_sched_resubmit_jobs);
>  
>   /**
> - * drm_sched_resubmit_jobs_ext - helper to relunch certain number of jobs from mirror ring list
> + * drm_sched_resubmit_jobs_ext - helper to relaunch certain number of jobs from pending list
>    *
>    * @sched: scheduler instance
>    * @max: job numbers to relaunch
> @@ -671,7 +671,7 @@ drm_sched_select_entity(struct drm_gpu_scheduler *sched)
>   static struct drm_sched_job *
>   drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
>   {
> -     struct drm_sched_job *job;
> +     struct drm_sched_job *job, *next;
>  
>        /*
>         * Don't destroy jobs while the timeout worker is running  OR thread
> @@ -690,6 +690,14 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
>        if (job && dma_fence_is_signaled(&job->s_fence->finished)) {
>                /* remove job from pending_list */
>                list_del_init(&job->list);
> We just need to record the scheduled time of the next job. So we
> need not to check the rest job.
> +             /* account for the next fence in the queue */
> +             next = list_first_entry_or_null(&sched->pending_list,
> +                             struct drm_sched_job, list);
> +             if (next && test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT,
> +                     &job->s_fence->finished.flags)) {
> +                     next->s_fence->scheduled.timestamp =
> +                             job->s_fence->finished.timestamp;
> +             }
>        } else {
>                job = NULL;
>                /* queue timeout for next job */

 


--------------73150BC57CCE78D8A277C4FD-- --===============2142800290== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx --===============2142800290==--