driconfig: Add support for device specific config
Add support for driconf overrides on a per-device level, for cases where we don't want to override behavior for all devices supported by a particular driver. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12135>
This commit is contained in:
+2
-2
@@ -195,7 +195,7 @@ static char *loader_get_dri_config_driver(int fd)
|
||||
driParseOptionInfo(&defaultInitOptions, __driConfigOptionsLoader,
|
||||
ARRAY_SIZE(__driConfigOptionsLoader));
|
||||
driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0,
|
||||
"loader", kernel_driver, NULL, 0, NULL, 0);
|
||||
"loader", kernel_driver, NULL, NULL, 0, NULL, 0);
|
||||
if (driCheckOption(&userInitOptions, "dri_driver", DRI_STRING)) {
|
||||
char *opt = driQueryOptionstr(&userInitOptions, "dri_driver");
|
||||
/* not an empty string */
|
||||
@@ -218,7 +218,7 @@ static char *loader_get_dri_config_device_id(void)
|
||||
driParseOptionInfo(&defaultInitOptions, __driConfigOptionsLoader,
|
||||
ARRAY_SIZE(__driConfigOptionsLoader));
|
||||
driParseConfigFiles(&userInitOptions, &defaultInitOptions, 0,
|
||||
"loader", NULL, NULL, 0, NULL, 0);
|
||||
"loader", NULL, NULL, NULL, 0, NULL, 0);
|
||||
if (driCheckOption(&userInitOptions, "device_id", DRI_STRING))
|
||||
prime = strdup(driQueryOptionstr(&userInitOptions, "device_id"));
|
||||
driDestroyOptionCache(&userInitOptions);
|
||||
|
||||
Reference in New Issue
Block a user