gbm: add gbm_bo_get_device() function
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Mon, 30 Apr 2012 10:27:53 +0000 (13:27 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 30 Apr 2012 17:09:39 +0000 (13:09 -0400)
src/gbm/main/gbm.c
src/gbm/main/gbm.h

index 0b5b9ff0b7091a97f6f19e409be049515f36176b..987e96500f845811fcafa9f4068077adf8a11de1 100644 (file)
@@ -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
index 16489f36bba6c8261cf56013516ddba761bc7afc..cf3d4752c36486dc51b139da6b848eeba0a472f3 100644 (file)
@@ -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);