summaryrefslogtreecommitdiffstats
path: root/src/gbm/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/gbm/main')
-rw-r--r--src/gbm/main/gbm.c14
-rw-r--r--src/gbm/main/gbm.h5
-rw-r--r--src/gbm/main/gbmint.h3
3 files changed, 22 insertions, 0 deletions
diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c
index df61ff67748..0bf2922bacd 100644
--- a/src/gbm/main/gbm.c
+++ b/src/gbm/main/gbm.c
@@ -85,6 +85,20 @@ gbm_device_is_format_supported(struct gbm_device *gbm,
return gbm->is_format_supported(gbm, format, usage);
}
+/** Get the number of planes that are required for a given format+modifier
+ *
+ * \param gbm The gbm device returned from gbm_create_device()
+ * \param format The format to query
+ * \param modifier The modifier to query
+ */
+GBM_EXPORT int
+gbm_device_get_format_modifier_plane_count(struct gbm_device *gbm,
+ uint32_t format,
+ uint64_t modifier)
+{
+ return gbm->get_format_modifier_plane_count(gbm, format, modifier);
+}
+
/** Destroy the gbm device and free all resources associated with it.
*
* \param gbm The device created using gbm_create_device()
diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h
index aed26a01621..7710e61b132 100644
--- a/src/gbm/main/gbm.h
+++ b/src/gbm/main/gbm.h
@@ -238,6 +238,11 @@ int
gbm_device_is_format_supported(struct gbm_device *gbm,
uint32_t format, uint32_t usage);
+int
+gbm_device_get_format_modifier_plane_count(struct gbm_device *gbm,
+ uint32_t format,
+ uint64_t modifier);
+
void
gbm_device_destroy(struct gbm_device *gbm);
diff --git a/src/gbm/main/gbmint.h b/src/gbm/main/gbmint.h
index c27a7a560ae..9220a4ae87d 100644
--- a/src/gbm/main/gbmint.h
+++ b/src/gbm/main/gbmint.h
@@ -61,6 +61,9 @@ struct gbm_device {
int (*is_format_supported)(struct gbm_device *gbm,
uint32_t format,
uint32_t usage);
+ int (*get_format_modifier_plane_count)(struct gbm_device *device,
+ uint32_t format,
+ uint64_t modifier);
struct gbm_bo *(*bo_create)(struct gbm_device *gbm,
uint32_t width, uint32_t height,