<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 21.11.2015 11:48, Ernst Sjöstrand
wrote:<br>
</div>
<blockquote
cite="mid:CAD=4a=VmWcuyY=O6oCJ5tp2d=kSx=euRTwCrAZ4cozAe5ugp9w@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>I guess the patches should be for drivers/gpu/drm/amd/<span
class="">amdgpu</span>/amdgpu_cs.c instead?<br>
</div>
</div>
</blockquote>
<br>
No, why do you think so? This is a libdrm patch, not a kernel patch.<br>
<br>
Regards,<br>
Christian.<br>
<br>
<blockquote
cite="mid:CAD=4a=VmWcuyY=O6oCJ5tp2d=kSx=euRTwCrAZ4cozAe5ugp9w@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Regards<br>
</div>
//Ernst<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-11-21 1:24 GMT+01:00 Alex Deucher
<span dir="ltr"><<a moz-do-not-send="true"
href="mailto:alexdeucher@gmail.com" target="_blank">alexdeucher@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">From:
Jammy Zhou <<a moz-do-not-send="true"
href="mailto:Jammy.Zhou@amd.com">Jammy.Zhou@amd.com</a>><br>
<br>
Set the timeout to AMDGPU_TIMEOUT_INFINITE when overflow
happens<br>
<br>
Signed-off-by: Jammy Zhou <<a moz-do-not-send="true"
href="mailto:Jammy.Zhou@amd.com">Jammy.Zhou@amd.com</a>><br>
Reviewed-by: Christian König <<a moz-do-not-send="true"
href="mailto:christian.koenig@amd.com">christian.koenig@amd.com</a>><br>
---<br>
amdgpu/amdgpu_cs.c | 8 ++++++--<br>
1 file changed, 6 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c<br>
index 4da9821..aa594c4 100644<br>
--- a/amdgpu/amdgpu_cs.c<br>
+++ b/amdgpu/amdgpu_cs.c<br>
@@ -289,12 +289,16 @@ drm_private uint64_t
amdgpu_cs_calculate_timeout(uint64_t timeout)<br>
<br>
if (timeout != AMDGPU_TIMEOUT_INFINITE) {<br>
struct timespec current;<br>
+ uint64_t current_ns;<br>
r = clock_gettime(CLOCK_MONOTONIC,
¤t);<br>
if (r)<br>
return r;<br>
<br>
- timeout += ((uint64_t)current.tv_sec) *
1000000000ull;<br>
- timeout += current.tv_nsec;<br>
+ current_ns = ((uint64_t)current.tv_sec) *
1000000000ull;<br>
+ current_ns += current.tv_nsec;<br>
+ timeout += current_ns;<br>
+ if (timeout < current_ns)<br>
+ timeout = AMDGPU_TIMEOUT_INFINITE;<br>
}<br>
return timeout;<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
_______________________________________________<br>
dri-devel mailing list<br>
<a moz-do-not-send="true"
href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freedesktop.org/mailman/listinfo/dri-devel"
rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</font></span></blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
dri-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/dri-devel">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>