<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Nice catch, the patch looks good to me
in general.<br>
<br>
You should add a commit message better describing what could go
wrong here and double check the indentation, looks a bit like you
used space instead of tabs.<br>
<br>
Additional to that you should send the patch as text and not html
mail, cause that makes it practically impossible to apply.<br>
<br>
Regards,<br>
Christian.<br>
<br>
Am 29.06.2016 um 07:42 schrieb Wang, Qingqing:<br>
</div>
<blockquote
cite="mid:CY1PR12MB05088FB9BB225C7E94B1B8F0EC230@CY1PR12MB0508.namprd12.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span id="ms-rterangepaste-start"></span></p>
<div>Change-Id: I55e90ae63dd653463817df351050370fc7e896ca<br>
Signed-off-by: David Mao <a class="moz-txt-link-rfc2396E" href="mailto:david.mao@amd.com"><david.mao@amd.com></a><br>
---<br>
amdgpu/amdgpu_vamgr.c | 6 +++++-<br>
1 file changed, 5 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/amdgpu/amdgpu_vamgr.c b/amdgpu/amdgpu_vamgr.c<br>
index 82653e9..bc2d302 100644<br>
--- a/amdgpu/amdgpu_vamgr.c<br>
+++ b/amdgpu/amdgpu_vamgr.c<br>
@@ -192,10 +192,14 @@ static uint64_t
amdgpu_vamgr_find_va_in_range(struct amdgpu_bo_va_mgr *mgr,
uint<br>
(hole->offset < range_min &&
range_min + size > hole->offset + hole->size) ||<br>
hole->size < size)<br>
continue;<br>
- offset = hole->offset;<br>
+ // it is possible that the hole covers more than one
range,<br>
+ // thus we need to respect the range_min<br>
+ offset = MAX2(hole->offset, range_min);<br>
waste = offset % alignment;<br>
waste = waste ? alignment - waste : 0;<br>
offset += waste;<br>
+ // the gap between the range_min and hole->offset
need to be covered as well<br>
+ waste = offset - hole->offset;<br>
if (offset >= (hole->offset + hole->size)) {<br>
continue;<br>
}<br>
-- </div>
<span id="ms-rterangepaste-end"></span><br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<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>