Questions about libdrm_intel and way to share physical memory between CPU and GPU
Segovia, Benjamin
benjamin.segovia at intel.com
Fri May 27 14:37:45 PDT 2011
Hello gurus,
I have two question mostly regarding libdrm_intel
1/ What is the difference between drm_intel_bo_map and drm_intel_gem_bo_map_gtt ?
2/ Will it be possible (or is it already possible) to directly share a regularly allocated piece of physical memory? Typical use case is the following one using OpenCL API:
char *ptr = malloc(sz);
cl_mem buf = clCreateBuffer(ctx, CL_MEM_USE_HOST_PTR, sz, ptr, &err);
Here, you create a buffer which directly uses the physical memory you are going to use for ptr. The idea, I guess, is to give GTT pages for this piece of memory. Today, I get a similar functionnality the other way using mostly:
drm_intel_bo *bo = drm_intel_bo_alloc(..)
char *ptr = drm_intel_bo_map(...)
Thanks!
Ben
More information about the dri-devel
mailing list