diff options
author | Petri Latvala <petri.latvala@intel.com> | 2018-12-18 14:19:42 +0200 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2018-12-20 11:01:34 +0200 |
commit | 47f5a57a81b66c21d06695e263a22b87f5a33009 (patch) | |
tree | d44ffa68a4097e8cc32c766fd782136a8044b89b /lib/igt_core.c | |
parent | f05c8c2739dce89185349703062784a7745cab14 (diff) |
Add support for forcing a specific driver
This commit adds a new option for forcing the use of a specific driver
indicated via an environment variable.
v2 (Petri):
- Use an environment variable instead of command line
- Refactor the loop in __open_device
- Don't try to load kernel modules
v3 (Petri):
- Rebase and adjust to the driver loading changes
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: gustavo@padovan.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r-- | lib/igt_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index 64883d64..50d6008f 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -647,6 +647,11 @@ static void common_init_env(void) igt_frame_dump_path = getenv("IGT_FRAME_DUMP_PATH"); stderr_needs_sentinel = getenv("IGT_SENTINEL_ON_STDERR") != NULL; + + env = getenv("IGT_FORCE_DRIVER"); + if (env) { + __set_forced_driver(env); + } } static int common_init(int *argc, char **argv, |