diff options
author | Martin Peres <martin.peres@labri.fr> | 2012-09-18 15:53:31 +0200 |
---|---|---|
committer | Stéphane Marchesin <marcheu@chromium.org> | 2012-10-08 15:30:34 -0700 |
commit | 4eb8d83b3394d4a4ca98c2cfbba22004522b6617 (patch) | |
tree | d9ddb852f2b93f1a7400b82283af97a2800e075e | |
parent | 4e8d1d601ba246065bf8552e4b96dd0174cc87a8 (diff) |
rework the buffer management style + talk about dma-buf
-rw-r--r-- | linuxgraphicsdrivers.lyx | 60 |
1 files changed, 53 insertions, 7 deletions
diff --git a/linuxgraphicsdrivers.lyx b/linuxgraphicsdrivers.lyx index f2c148a..3826847 100644 --- a/linuxgraphicsdrivers.lyx +++ b/linuxgraphicsdrivers.lyx @@ -5580,7 +5580,7 @@ To prevent access to arbitrary GPU memory, the command submission ioctl \end_layout \begin_layout Subsubsection -Buffer management +GEM Buffer management \end_layout \begin_layout Standard @@ -5602,7 +5602,7 @@ ent libdrm calls to manage your buffers. However, the general outline of the interface remains fairly constant. \end_layout -\begin_layout Paragraph* +\begin_layout Subsubsection* \lang english Object Allocation & Destruction @@ -5615,7 +5615,7 @@ Object allocation is done by calling the GEM_CREATE function. This handle will be used later on as a buffer identifier. \end_layout -\begin_layout Paragraph* +\begin_layout Subsubsection* \lang english Reading and writing from/to a buffer object @@ -5638,7 +5638,7 @@ mapping the BO : it is possible for the userspace to map the BO in his memory It then returns the address of the BO in the user's virtual address space. \end_layout -\begin_layout Paragraph* +\begin_layout Subsubsection* Sharing buffer objects between applications \end_layout @@ -5689,16 +5689,62 @@ the authenticated client calls drm_authmagic to authenticate the cookie and thus, the original client \end_layout -\begin_layout Paragraph* +\begin_layout Subsubsection* +Learning more about GEM +\end_layout + +\begin_layout Standard +The best documentation for GEM is the source code the drivers exposing it + (libdrm for the userspace, the drm driver for the kernelspace). + However, it is worth reading the initial proposal called +\begin_inset CommandInset href +LatexCommand href +name "GEM - the Graphics Execution Manager" +target "https://lwn.net/Articles/283798/" + +\end_inset + + from Intel. + +\end_layout + +\begin_layout Subsubsection + +\lang english +DMA-Buf : Sharing buffer objects between drivers +\end_layout + +\begin_layout Standard + +\lang english +DMA-Buf is a driver-independent buffer-sharing mechanism for clients. +\end_layout + +\begin_layout Standard \lang english -Sharing buffer objects between drivers +Contrarily to GEM buffer sharing, a fd is returned to the client willing + to export a buffer. + It is then the client's responsability to export this fd to the other clients + using a UNIX socket as explained by this +\begin_inset CommandInset href +LatexCommand href +name "email from Greg A. Woods" +target "http://archives.neohapsis.com/archives/postfix/2000-09/1476.html" + +\end_inset + +. + This sharing solution is more secure since clients cannot access to buffers + unless explicitely allowed by the exporter contrarily to GEM where names + are guessable. \end_layout \begin_layout Standard \lang english -dma_buf +For more information, look at /Documentation/dma-buf-sharing.txt in your + kernel tree. \end_layout \begin_layout Section |