diff options
author | Kenneth Graunke <[email protected]> | 2019-04-18 22:13:41 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-04-22 09:35:36 -0700 |
commit | faa52e328e3edf9b4596073eee3360aa29fd7252 (patch) | |
tree | c7c47dac53fee08b221c9cd19699793ee9055abb /src/gallium/auxiliary | |
parent | ccb25aaeafa4d5bc82da76774a3776e83638f211 (diff) |
iris: Add mechanism for iris-specific driconf options
Based on Nicolai's 0f8c5de8690e7c87aa2e24383065efaca7e6fe78.
Reviewed-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c | 2 | ||||
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper.h | 26 | ||||
-rw-r--r-- | src/gallium/auxiliary/target-helpers/drm_helper_public.h | 2 |
3 files changed, 28 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c index a9028394d4d..7aa733d5f59 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c @@ -74,7 +74,7 @@ static const struct drm_driver_descriptor driver_descriptors[] = { { .driver_name = "iris", .create_screen = pipe_iris_create_screen, - .configuration = pipe_default_configuration_query, + .configuration = pipe_iris_configuration_query, }, { .driver_name = "nouveau", diff --git a/src/gallium/auxiliary/target-helpers/drm_helper.h b/src/gallium/auxiliary/target-helpers/drm_helper.h index 3280312729e..b98e17c3d9a 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper.h @@ -68,10 +68,28 @@ pipe_iris_create_screen(int fd, const struct pipe_screen_config *config) { struct pipe_screen *screen; - screen = iris_drm_screen_create(fd); + screen = iris_drm_screen_create(fd, config); return screen ? debug_screen_wrap(screen) : NULL; } +const struct drm_conf_ret * +pipe_iris_configuration_query(enum drm_conf conf) +{ + static const struct drm_conf_ret xml_options_ret = { + .type = DRM_CONF_POINTER, + .val.val_pointer = +#include "iris/iris_driinfo.h" + }; + + switch (conf) { + case DRM_CONF_XML_OPTIONS: + return &xml_options_ret; + default: + break; + } + return pipe_default_configuration_query(conf); +} + #else struct pipe_screen * @@ -81,6 +99,12 @@ pipe_iris_create_screen(int fd, const struct pipe_screen_config *config) return NULL; } +const struct drm_conf_ret * +pipe_iris_configuration_query(enum drm_conf conf) +{ + return NULL; +} + #endif #ifdef GALLIUM_NOUVEAU diff --git a/src/gallium/auxiliary/target-helpers/drm_helper_public.h b/src/gallium/auxiliary/target-helpers/drm_helper_public.h index 2cf05eb4577..4b34d274926 100644 --- a/src/gallium/auxiliary/target-helpers/drm_helper_public.h +++ b/src/gallium/auxiliary/target-helpers/drm_helper_public.h @@ -12,6 +12,8 @@ pipe_i915_create_screen(int fd, const struct pipe_screen_config *config); struct pipe_screen * pipe_iris_create_screen(int fd, const struct pipe_screen_config *config); +const struct drm_conf_ret * +pipe_iris_configuration_query(enum drm_conf conf); struct pipe_screen * pipe_nouveau_create_screen(int fd, const struct pipe_screen_config *config); |