dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Questions about libdrm_intel and way to share physical memory between CPU and GPU
@ 2011-05-27 21:37 Segovia, Benjamin
  2011-05-28  8:54 ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Segovia, Benjamin @ 2011-05-27 21:37 UTC (permalink / raw)
  To: dri-devel@lists.freedesktop.org

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-06-04  9:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27 21:37 Questions about libdrm_intel and way to share physical memory between CPU and GPU Segovia, Benjamin
2011-05-28  8:54 ` Chris Wilson
2011-05-31 23:14   ` Segovia, Benjamin
2011-06-02 18:42   ` Alan Cox
2011-06-04  3:32     ` Eric Anholt
2011-06-04 10:00       ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox