summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/target-helpers/drm_helper.h
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-06-29 17:48:28 +0200
committerNicolai Hähnle <[email protected]>2017-08-02 09:50:58 +0200
commit1e334a396c3bfac6d2ea2871db9bf5e9abc42934 (patch)
tree86f2b856059b5ce39b2a658cbbe7d5dd5d88ba59 /src/gallium/auxiliary/target-helpers/drm_helper.h
parentb4ff5e90e9ab3471a5f5c7a403826c9af952b594 (diff)
pipe-loader: move configuration_query into drm_helper
Having it inline is pointless anyway, since it's only called via a function pointer. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/target-helpers/drm_helper.h')
-rw-r--r--src/gallium/auxiliary/target-helpers/drm_helper.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/target-helpers/drm_helper.h b/src/gallium/auxiliary/target-helpers/drm_helper.h
index 2a2f57d20db..a4fcde385f2 100644
--- a/src/gallium/auxiliary/target-helpers/drm_helper.h
+++ b/src/gallium/auxiliary/target-helpers/drm_helper.h
@@ -4,6 +4,31 @@
#include <stdio.h>
#include "target-helpers/inline_debug_helper.h"
#include "target-helpers/drm_helper_public.h"
+#include "state_tracker/drm_driver.h"
+
+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_bool = true,
+};
+
+const struct drm_conf_ret *
+pipe_default_configuration_query(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;
+}
#ifdef GALLIUM_I915
#include "i915/drm/i915_drm_public.h"