[Mesa-dev] [RFC] add a config file for dri loader to choose a different dri driver
Emil Velikov
emil.l.velikov at gmail.com
Wed Aug 1 11:07:55 UTC 2018
On 31 July 2018 at 14:35, Michel Dänzer <michel at daenzer.net> wrote:
> On 2018-07-31 10:03 AM, Yu, Qiang wrote:
>>
>> Seems the mesa driconf infrastructure is just what I need:
>> https://dri.freedesktop.org/wiki/ConfigurationInfrastructure/
>>
>> So I can reference the loader_get_dri_config_device_id implementation
>> for adding loader driver override functionality in /etc/drirc:
>> <driconf>
>> <device driver="loader">
>> <option name="amdgpu" value="amdgpu" />
>> </device>
>> </driconf>
>>
>> Thoughts?
>
> Using the driconf infrastructure is definitely better than creating a
> new mechanism. It'll even allow configuring the driver per application. :)
>
> Grepping for device_id in src/util/xmlpool/t_options.h and
> src/loader/loader.c might be useful.
>
> Here's an example of how I imagine general and per-application driver
> configuration could work:
>
> <driconf>
> <device kernel_driver="amdgpu">
>
> <!-- Use radeonsi by default -->
> <option name="dri_driver" value="radeonsi" />
>
> <!-- Use amdgpu for a specific application -->
> <application executable="fgl_glxgears">
> <option name="dri_driver" value="amdgpu" />
> </application>
>
> </device>
> </driconf>
>
Good suggestion Michel, I love it. I'm a fan of the full names -
kernel_driver/dri_driver.
There's plenty of inconsistencies in Mesa when using the shorthand "driver".
Thanks
Emil
More information about the mesa-dev
mailing list