summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/pipe-loader
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2014-09-16 19:10:23 -0400
committerRob Clark <[email protected]>2014-09-21 15:35:53 -0400
commit18291ee17a36ea700108b85d679444efa262a312 (patch)
tree5457c46effa7992f647f7eff3598a1b073b40285 /src/gallium/targets/pipe-loader
parent41f072a4f8fd3f3347789ee4186af0d4fcf69622 (diff)
freedreno: add DRM_CONF_SHARE_FD
And config query and DRM_CONF_SHARE_FD to both mega-driver and traditional build configs, so that EGL_EXT_image_dma_buf_import works. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/targets/pipe-loader')
-rw-r--r--src/gallium/targets/pipe-loader/pipe_msm.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/gallium/targets/pipe-loader/pipe_msm.c b/src/gallium/targets/pipe-loader/pipe_msm.c
index 76e402302d8..8a44edd22a6 100644
--- a/src/gallium/targets/pipe-loader/pipe_msm.c
+++ b/src/gallium/targets/pipe-loader/pipe_msm.c
@@ -17,5 +17,28 @@ create_screen(int fd)
return screen;
}
+static const struct drm_conf_ret throttle_ret = {
+ .type = DRM_CONF_INT,
+ .val.val_int = 2,
+};
+
+static const struct drm_conf_ret share_fd_ret = {
+ .type = DRM_CONF_BOOL,
+ .val.val_int = true,
+};
+
+static const struct drm_conf_ret *drm_configuration(enum drm_conf conf)
+{
+ switch (conf) {
+ case DRM_CONF_THROTTLE:
+ return &throttle_ret;
+ case DRM_CONF_SHARE_FD:
+ return &share_fd_ret;
+ default:
+ break;
+ }
+ return NULL;
+}
+
PUBLIC
-DRM_DRIVER_DESCRIPTOR("msm", "freedreno", create_screen, NULL)
+DRM_DRIVER_DESCRIPTOR("msm", "freedreno", create_screen, drm_configuration)