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> -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev