[Beignet] [PATCH v2] Remove intel_gpgpu_check_binded_buf_address()
Zhigang Gong
zhigang.gong at linux.intel.com
Fri Oct 31 03:40:34 PDT 2014
LGTM, pushed, thanks.
On Fri, Oct 31, 2014 at 03:11:59PM +0800, Zhenyu Wang wrote:
> On recent kernel with full PPGTT support, we can possibly bind buffer
> offset with 0, but intel_gpgpu_check_binded_buf_address() always thinks
> it's invalid, which is not true. So simply remove the check.
>
> v2: Add comment on why this was added and leads to failure. Use FIXME tag
> on issue that needs to be fixed otherwise.
>
> Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> ---
> src/intel/intel_gpgpu.c | 19 ++++++++++---------
> 1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/src/intel/intel_gpgpu.c b/src/intel/intel_gpgpu.c
> index d6ef3e9..724ce63 100644
> --- a/src/intel/intel_gpgpu.c
> +++ b/src/intel/intel_gpgpu.c
> @@ -739,14 +739,6 @@ intel_gpgpu_batch_reset(intel_gpgpu_t *gpgpu, size_t sz)
> {
> return intel_batchbuffer_reset(gpgpu->batch, sz);
> }
> -/* check we do not get a 0 starting address for binded buf */
> -static void
> -intel_gpgpu_check_binded_buf_address(intel_gpgpu_t *gpgpu)
> -{
> - uint32_t i;
> - for (i = 0; i < gpgpu->binded_n; ++i)
> - assert(gpgpu->binded_buf[i]->offset != 0);
> -}
>
> static void
> intel_gpgpu_flush_batch_buffer(intel_batchbuffer_t *batch)
> @@ -762,7 +754,16 @@ intel_gpgpu_flush(intel_gpgpu_t *gpgpu)
> if (!gpgpu->batch || !gpgpu->batch->buffer)
> return;
> intel_gpgpu_flush_batch_buffer(gpgpu->batch);
> - intel_gpgpu_check_binded_buf_address(gpgpu);
> + /* FIXME:
> + Remove old assert here for binded buffer offset 0 which
> + tried to guard possible NULL buffer pointer check in kernel, as
> + in case like "runtime_null_kernel_arg", but that's wrong to just
> + take buffer offset 0 as NULL, and cause failure for normal
> + kernels which has no such NULL ptr check but with buffer offset 0
> + (which is possible now and will be normal if full PPGTT is on).
> +
> + Need to fix NULL ptr check otherwise.
> + */
> }
>
> static int
> --
> 2.1.1
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list