<div dir="ltr"><div>Hello,</div><div>seems some part of the World is still may waiting for a possibility to play Dying Light... till pushed :)</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 6, 2018 at 4:26 PM, Lionel Landwerlin <span dir="ltr"><<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 06/08/18 13:41, Sergii Romantsov wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Kernel (for ppgtt) requires memory address to be<br>
aligned to page size (4096).<br>
<br>
-v2: added marking that also fixes initial commit 01058a552294.<br>
-v3: numbers replaced by PAGE_SIZE; buffer-object size is aligned<br>
instead of alignment of offsets (Chris Wilson).<br>
-v4: changes related to PAGE_SIZE moved to separate commit<br>
<br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=106997" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/s<wbr>how_bug.cgi?id=106997</a><br>
Fixes: a363bb2cd0e2 (i965: Allocate VMA in userspace for full-PPGTT systems.)<br>
Fixes: 01058a552294 (i965: Add virtual memory allocator infrastructure to brw_bufmgr.)<br>
Signed-off-by: Sergii Romantsov <<a href="mailto:sergii.romantsov@globallogic.com" target="_blank">sergii.romantsov@globallogic.<wbr>com</a>><br>
</blockquote>
<br></span>
Reviewed-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a><wbr>><br>
<br>
Thanks!<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
src/mesa/drivers/dri/i965/brw_<wbr>bufmgr.c | 7 +++----<br>
1 file changed, 3 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/br<wbr>w_bufmgr.c b/src/mesa/drivers/dri/i965/br<wbr>w_bufmgr.c<br>
index 09d45e3..8274c2e 100644<br>
--- a/src/mesa/drivers/dri/i965/br<wbr>w_bufmgr.c<br>
+++ b/src/mesa/drivers/dri/i965/br<wbr>w_bufmgr.c<br>
@@ -496,7 +496,6 @@ bo_alloc_internal(struct brw_bufmgr *bufmgr,<br>
uint32_t stride)<br>
{<br>
struct brw_bo *bo;<br>
- unsigned int page_size = getpagesize();<br>
int ret;<br>
struct bo_cache_bucket *bucket;<br>
bool alloc_from_cache;<br>
@@ -522,12 +521,12 @@ bo_alloc_internal(struct brw_bufmgr *bufmgr,<br>
* allocation up.<br>
*/<br>
if (bucket == NULL) {<br>
- bo_size = size;<br>
- if (bo_size < page_size)<br>
- bo_size = page_size;<br>
+ unsigned int page_size = getpagesize();<br>
+ bo_size = ALIGN(size, page_size);<br>
} else {<br>
bo_size = bucket->size;<br>
}<br>
+ assert(bo_size);<br>
mtx_lock(&bufmgr->lock);<br>
/* Get a buffer out of the cache if available */<br>
</blockquote>
<br>
<br></div></div><div class="HOEnZb"><div class="h5">
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Sergii Romantsov<br></div><div dir="ltr"><div style="margin:0px;padding:0px;color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">GlobalLogic Inc.<br><a href="http://www.globallogic.com/" rel="nofollow" style="color:rgb(0,82,204)" target="_blank">www.globallogic.com</a><br></div></div></div></div></div></div>
</div></div>