<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 29, 2018 at 2:10 PM, Rogovin, Kevin <span dir="ltr"><<a href="mailto:kevin.rogovin@intel.com" target="_blank">kevin.rogovin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Thanks, so the items that need to be fixed are:<br>
<br>
Patch 1: use the better name for the macro value to better match the string<br>
Patch 2: either use pread/pwrite for both set and check noise or use map for both (I will use map)<br></blockquote><div><br></div><div>If you're going to use a map (which is fine), you don't need the "allocate and return noise" function, you just need fill and check.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Patch 3: fine as is.<br></blockquote><div><br></div><div>That about sums it up.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Apparently, the mesa-dev archive is acting like /dev/null again as the patch series, your review and discussion have disappeared.<br></blockquote><div><br></div><div>Weird...<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I will post a v4 shortly unless there are any additional shortcomings that need to be addressed.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Kevin<br>
</font></span><div><div class="h5"><br>
-----Original Message-----<br>
From: Jason Ekstrand [mailto:<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>]<br>
Sent: Monday, January 29, 2018 6:41 PM<br>
To: Rogovin, Kevin <<a href="mailto:kevin.rogovin@intel.com">kevin.rogovin@intel.com</a>><br>
Subject: RE: [PATCH v3 3/3] i965: if DEBUG_OUT_OF_BOUND_CHK is up, check that noise padding for each bo used in batchbuffer is correct<br>
<br>
Nope. That one looked fine as-is.<br>
<br>
<br>
On January 28, 2018 23:13:40 "Rogovin, Kevin" <<a href="mailto:kevin.rogovin@intel.com">kevin.rogovin@intel.com</a>> wrote:<br>
<br>
> Any comments/review for Patch 3?<br>
><br>
> -----Original Message-----<br>
> From: Rogovin, Kevin<br>
> Sent: Friday, January 26, 2018 10:56 AM<br>
> To: <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> Cc: Rogovin, Kevin <<a href="mailto:kevin.rogovin@intel.com">kevin.rogovin@intel.com</a>><br>
> Subject: [PATCH v3 3/3] i965: if DEBUG_OUT_OF_BOUND_CHK is up, check<br>
> that noise padding for each bo used in batchbuffer is correct<br>
><br>
> From: Kevin Rogovin <<a href="mailto:kevin.rogovin@intel.com">kevin.rogovin@intel.com</a>><br>
><br>
> Signed-off-by: Kevin Rogovin <<a href="mailto:kevin.rogovin@intel.com">kevin.rogovin@intel.com</a>><br>
> ---<br>
> src/mesa/drivers/dri/i965/<wbr>intel_batchbuffer.c | 22<br>
> +++++++++++++++++++++-<br>
> 1 file changed, 21 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_batchbuffer.c<br>
> b/src/mesa/drivers/dri/i965/<wbr>intel_batchbuffer.c<br>
> index 02bfd3f333..fc6998a7ca 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>intel_batchbuffer.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>intel_batchbuffer.c<br>
> @@ -1019,11 +1019,31 @@ _intel_batchbuffer_flush_<wbr>fence(struct<br>
> brw_context *brw,<br>
><br>
> ret = submit_batch(brw, in_fence_fd, out_fence_fd);<br>
><br>
> - if (unlikely(INTEL_DEBUG & DEBUG_SYNC)) {<br>
> + if (unlikely(INTEL_DEBUG & (DEBUG_SYNC | DEBUG_OUT_OF_BOUND_CHK)))<br>
</div></div>> + {<br>
<div class="HOEnZb"><div class="h5">> fprintf(stderr, "waiting for idle\n");<br>
> brw_bo_wait_rendering(brw-><a href="http://batch.batch.bo" rel="noreferrer" target="_blank">bat<wbr>ch.batch.bo</a>);<br>
> }<br>
><br>
> + if (unlikely(INTEL_DEBUG & DEBUG_OUT_OF_BOUND_CHK)) {<br>
> + bool detected_out_of_bounds_write = false;<br>
> +<br>
> + for (int i = 0; i < brw->batch.exec_count; i++) {<br>
> + struct brw_bo *bo = brw->batch.exec_bos[i];<br>
> +<br>
> + if (!brw_bo_padding_is_good(bo)) {<br>
> + detected_out_of_bounds_write = true;<br>
> + fprintf(stderr,<br>
> + "Detected buffer out-of-bounds write from brw_bo %p "<br>
> + "(GEM %u, label = \"%s\")\n",<br>
> + bo, bo->gem_handle, bo->name);<br>
> + }<br>
> + }<br>
> +<br>
> + if (unlikely(detected_out_of_<wbr>bounds_write)) {<br>
> + abort();<br>
> + }<br>
> + }<br>
> +<br>
> /* Start a new batch buffer. */<br>
> brw_new_batch(brw);<br>
><br>
> --<br>
> 2.15.1<br>
><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>