Mesa (master): gbm: add API to to import FD with modifier
Emil Velikov
evelikov at kemper.freedesktop.org
Thu Jun 15 09:51:43 UTC 2017
Module: Mesa
Branch: master
Commit: 71b78b6b0c8f42f09d4f9d3a0e72004bded4fbe8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=71b78b6b0c8f42f09d4f9d3a0e72004bded4fbe8
Author: Lucas Stach <l.stach at pengutronix.de>
Date: Thu Jun 8 20:56:16 2017 +0200
gbm: add API to to import FD with modifier
This allows to import an FD with an explicit modifier passed through
userspace protocols.
Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
Tested-by: Robert Foss <robert.foss at collabora.com>
Reviewed-by: Daniel Stone <daniels at collabora.com>
---
src/gbm/main/gbm.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h
index b52137ed01..6a9bf1fc2a 100644
--- a/src/gbm/main/gbm.h
+++ b/src/gbm/main/gbm.h
@@ -252,6 +252,7 @@ gbm_bo_create_with_modifiers(struct gbm_device *gbm,
#define GBM_BO_IMPORT_WL_BUFFER 0x5501
#define GBM_BO_IMPORT_EGL_IMAGE 0x5502
#define GBM_BO_IMPORT_FD 0x5503
+#define GBM_BO_IMPORT_FD_MODIFIER 0x5504
struct gbm_import_fd_data {
int fd;
@@ -261,6 +262,17 @@ struct gbm_import_fd_data {
uint32_t format;
};
+struct gbm_import_fd_modifier_data {
+ uint32_t width;
+ uint32_t height;
+ uint32_t format;
+ uint32_t num_fds;
+ int fds[4];
+ int strides[4];
+ int offsets[4];
+ uint64_t modifier;
+};
+
struct gbm_bo *
gbm_bo_import(struct gbm_device *gbm, uint32_t type,
void *buffer, uint32_t usage);
More information about the mesa-commit
mailing list