[Mesa-dev] [PATCH 4/4] gbm: add gbm_bo_get_device() function

Ander Conselvan de Oliveira ander.conselvan.de.oliveira at intel.com
Mon Apr 30 03:27:53 PDT 2012


---
 src/gbm/main/gbm.c |   11 +++++++++++
 src/gbm/main/gbm.h |    3 +++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c
index be6bc66..09be1c3 100644
--- a/src/gbm/main/gbm.c
+++ b/src/gbm/main/gbm.c
@@ -231,6 +231,17 @@ gbm_bo_get_handle(struct gbm_bo *bo)
    return bo->handle;
 }
 
+/** Get the gbm device used to create the buffer object
+ *
+ * \param bo The buffer object
+ * \return Returns the gbm device with which the buffer object was created
+ */
+GBM_EXPORT struct gbm_device *
+gbm_bo_get_device(struct gbm_bo *bo)
+{
+	return bo->gbm;
+}
+
 /** Set the user data associated with a buffer object
  *
  * \param bo The buffer object
diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h
index 16489f3..cf3d475 100644
--- a/src/gbm/main/gbm.h
+++ b/src/gbm/main/gbm.h
@@ -242,6 +242,9 @@ gbm_bo_get_pitch(struct gbm_bo *bo);
 uint32_t
 gbm_bo_get_format(struct gbm_bo *bo);
 
+struct gbm_device *
+gbm_bo_get_device(struct gbm_bo *bo);
+
 union gbm_bo_handle
 gbm_bo_get_handle(struct gbm_bo *bo);
 
-- 
1.7.4.1



More information about the mesa-dev mailing list