[Beignet] [Intel-gfx] Preventing zero GPU virtual address allocation

Daniel Vetter daniel at ffwll.ch
Thu Mar 5 04:52:51 PST 2015


On Thu, Mar 05, 2015 at 02:56:52AM +0000, Song, Ruiling wrote:
> Hi Daniel,
> 
> OpenCL language support NULL pointer, using zero as the NULL pointer is
> the obvious way. That is zero will be treated as invalid address.  Then
> it requires drm won't allocate zero to drm buffer. And David in CC
> list has help us make a patch, please see attached. The logic is only
> for ppgtt, and he said zero offset is used under ggtt. My question is
> what is offset zero used under ggtt? Will it make sure zero is not
> allocatable to drm buffer object?

The code in i915_gem_execbuf.c already supports an optional bias to avoid
putting a buffer into the first few kb. See __EXEC_OBJECT_NEEDS_BIAS. I
suggest you expose this to userspace, which also address your issue that
you didn't add an abi revision flag.

And since this is abi I need open-source userspace and all that.

Thanks, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the Beignet mailing list