<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<br>
<br>
<div class="moz-cite-prefix">Am 26.04.21 um 17:30 schrieb Wang,
Kevin(Yang):<br>
</div>
<blockquote type="cite"
cite="mid:MN2PR12MB3022E9D72A4816C9A693F591A2429@MN2PR12MB3022.namprd12.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<p
style="font-family:Arial;font-size:11pt;color:#0078D7;margin:5pt;"
align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
amd-gfx <a class="moz-txt-link-rfc2396E" href="mailto:amd-gfx-bounces@lists.freedesktop.org"><amd-gfx-bounces@lists.freedesktop.org></a> on
behalf of Roy Sun <a class="moz-txt-link-rfc2396E" href="mailto:Roy.Sun@amd.com"><Roy.Sun@amd.com></a><br>
<b>Sent:</b> Monday, April 26, 2021 2:27 PM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:amd-gfx@lists.freedesktop.org"><amd-gfx@lists.freedesktop.org></a><br>
<b>Cc:</b> Sun, Roy <a class="moz-txt-link-rfc2396E" href="mailto:Roy.Sun@amd.com"><Roy.Sun@amd.com></a>; Nieto, David M
<a class="moz-txt-link-rfc2396E" href="mailto:David.Nieto@amd.com"><David.Nieto@amd.com></a><br>
<b>Subject:</b> [PATCH 1/2] drm/scheduler: Change scheduled
fence track</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span
style="font-size:11pt">
<div class="PlainText">Update the timestamp of scheduled
fence on HW<br>
completion of the previous fences<br>
<br>
This allow more accurate tracking of the fence<br>
execution in HW<br>
<br>
Signed-off-by: David M Nieto <a class="moz-txt-link-rfc2396E" href="mailto:david.nieto@amd.com"><david.nieto@amd.com></a><br>
Signed-off-by: Roy Sun <a class="moz-txt-link-rfc2396E" href="mailto:Roy.Sun@amd.com"><Roy.Sun@amd.com></a><br>
---<br>
drivers/gpu/drm/scheduler/sched_main.c | 12
++++++++++--<br>
1 file changed, 10 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/scheduler/sched_main.c
b/drivers/gpu/drm/scheduler/sched_main.c<br>
index 92d8de24d0a1..f8e39ab0c41b 100644<br>
--- a/drivers/gpu/drm/scheduler/sched_main.c<br>
+++ b/drivers/gpu/drm/scheduler/sched_main.c<br>
@@ -515,7 +515,7 @@ void drm_sched_resubmit_jobs(struct
drm_gpu_scheduler *sched)<br>
EXPORT_SYMBOL(drm_sched_resubmit_jobs);<br>
<br>
/**<br>
- * drm_sched_resubmit_jobs_ext - helper to relunch
certain number of jobs from mirror ring list<br>
+ * drm_sched_resubmit_jobs_ext - helper to relaunch
certain number of jobs from pending list<br>
*<br>
* @sched: scheduler instance<br>
* @max: job numbers to relaunch<br>
@@ -671,7 +671,7 @@ drm_sched_select_entity(struct
drm_gpu_scheduler *sched)<br>
static struct drm_sched_job *<br>
drm_sched_get_cleanup_job(struct drm_gpu_scheduler
*sched)<br>
{<br>
- struct drm_sched_job *job;<br>
+ struct drm_sched_job *job, *next;<br>
<br>
/*<br>
* Don't destroy jobs while the timeout worker
is running OR thread<br>
@@ -690,6 +690,14 @@ drm_sched_get_cleanup_job(struct
drm_gpu_scheduler *sched)<br>
if (job &&
dma_fence_is_signaled(&job->s_fence->finished))
{<br>
/* remove job from pending_list */<br>
list_del_init(&job->list);<br>
We just need to record the scheduled time of the next
job. So we <br>
need not to check the rest job.</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">[kevin]:</div>
<div class="PlainText">ok, it is fine for me with the
timestamp flag check.</div>
<div class="PlainText">Reviewed-by: Kevin Wang
<a class="moz-txt-link-rfc2396E" href="mailto:kevin1.wang@amd.com"><kevin1.wang@amd.com></a></div>
</span></font></div>
</div>
</blockquote>
<br>
Actually please drop that extra check.<br>
<br>
The timestamp is guaranteed to be set on the next job or otherwise
we wouldn't got here in the first place.<br>
<br>
I've considered dropping the flag for quite a while and don't want
any new users of this.<br>
<br>
Christian.<br>
<br>
<blockquote type="cite"
cite="mid:MN2PR12MB3022E9D72A4816C9A693F591A2429@MN2PR12MB3022.namprd12.prod.outlook.com">
<div>
<div class="BodyFragment"><font size="2"><span
style="font-size:11pt">
<div class="PlainText"><br>
+ /* account for the next fence in the
queue */<br>
+ next =
list_first_entry_or_null(&sched->pending_list,<br>
+ struct drm_sched_job,
list);<br>
+ if (next &&
test_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT,<br>
+
&job->s_fence->finished.flags)) {<br>
+
next->s_fence->scheduled.timestamp =<br>
+
job->s_fence->finished.timestamp;<br>
+ }<br>
} else {<br>
job = NULL;<br>
/* queue timeout for next job */<br>
-- <br>
2.31.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<a
href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CKevin1.Wang%40amd.com%7C0cebaf8d37e144c6b82108d9087c502e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637550152295564379%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Hdiil9BC2sp2pUI1121yZWELoCQqhDqTnbr7E9oVutw%3D&reserved=0"
moz-do-not-send="true">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CKevin1.Wang%40amd.com%7C0cebaf8d37e144c6b82108d9087c502e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637550152295564379%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Hdiil9BC2sp2pUI1121yZWELoCQqhDqTnbr7E9oVutw%3D&reserved=0</a><br>
</div>
</span></font></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
amd-gfx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
</pre>
</blockquote>
<br>
</body>
</html>