top | item 22477153

(no title)

ambrop7 | 6 years ago

This is quite unclear to me. Is DMA-BUF so generic that the memory it refers to can be in different types of RAM, including GPU RAM and CPU RAM?

discuss

order

floatboth|6 years ago

That is the whole point, one of the original use cases was passing around buffers between different GPUs on dual-graphics laptops (PRIME)

ambrop7|6 years ago

Do you maybe know, when frames rendered by GPU 1 (e.g. fast GPU) need to be sent to GPU 2 (e.g. slow GPU doing the compositing and outputting to the monitor), how does the data actually get transferred? I can imagine the following possibilities:

1) GPU 1 writes to CPU RAM, GPU 2 reads from CPU RAM

2) GPU 1 writes to GPU 2 RAM via PCI Express (DMA between devices)

3) GPU 2 reads from GPU 1 RAM via PCI Express (DMA between devices)

cycloptic|6 years ago

It's supposed to refer to an object that is in GPU RAM. You can map it to CPU RAM to access it, but obviously that is slow. The userspace function you normally want to call to do this is "gbm_bo_map".