The runtime check is more about my second patch, to modify the 
host_unified_memory, will modify my these 2 patches as:

- add runtime check for userptr to decide the value of 
CL_DEVICE_HOST_UNIFIED_MEMORY

- if runtime shows userptr is supported, and the host_ptr is page aligned
   call drm_intel_bo_alloc_userptr to allocate bo,
   report CL_MEM_OBJECT_ALLOCATION_FAILURE if the allocated bo is NULL.
- otherwise
   use the old method.

-----Original Message-----
From: Zhenyu Wang [mailto:[email protected]] 
Sent: Friday, November 07, 2014 1:43 PM
To: Zhigang Gong
Cc: Guo, Yejun; [email protected]
Subject: Re: [Beignet] [PATCH V2 1/3] support CL_MEM_USE_HOST_PTR with userptr 
for cl buffer

On 2014.11.07 11:51:08 +0800, Zhigang Gong wrote:
> I have one major comment, what if the running system doesn't support userptr?
> We may need to check whether we can use userptr feature at runtime 
> rather than compile time, right?

It's already handled by libdrm interface that if you run old kernel without 
userptr support, you won't get bo alloc from libdrm, as in current method just 
fallback to copy case.

--
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet

Reply via email to