diff options
author | Nicolai Hähnle <[email protected]> | 2017-06-29 17:48:28 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-08-02 09:50:58 +0200 |
commit | 1e334a396c3bfac6d2ea2871db9bf5e9abc42934 (patch) | |
tree | 86f2b856059b5ce39b2a658cbbe7d5dd5d88ba59 /src/gallium/auxiliary/target-helpers | |
parent | b4ff5e90e9ab3471a5f5c7a403826c9af952b594 (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')
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper.h | 25 | ||||
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper_public.h | 5 |
2 files changed, 30 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" diff --git a/src/gallium/auxiliary/target-helpers/drm_helper_public.h b/src/gallium/auxiliary/target-helpers/drm_helper_public.h index 5746e08554b..c540d7c58a6 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper_public.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper_public.h @@ -1,6 +1,8 @@ #ifndef _DRM_HELPER_PUBLIC_H #define _DRM_HELPER_PUBLIC_H +enum drm_conf; +struct drm_conf_ret; struct pipe_screen; struct pipe_screen_config; @@ -44,4 +46,7 @@ pipe_etna_create_screen(int fd, const struct pipe_screen_config *config); struct pipe_screen * pipe_imx_drm_create_screen(int fd, const struct pipe_screen_config *config); +const struct drm_conf_ret * +pipe_default_configuration_query(enum drm_conf conf); + #endif /* _DRM_HELPER_PUBLIC_H */ |