loader: add dri_driver option to override dri driver to load
authorQiang Yu <Qiang.Yu@amd.com>
Mon, 6 Aug 2018 03:19:27 +0000 (11:19 +0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 17 Aug 2018 16:16:32 +0000 (17:16 +0100)
commit0aa80abf257edde027378b6826e60fa8088ac3df
tree874b616bdd6078d775106f58a70c99b34eb9f737
parent3bbe180b982639554685c997ff51a7cbbf3247e6
loader: add dri_driver option to override dri driver to load

drirc implementation of MESA_LOADER_DRIVER_OVERRIDE which can be
used to override dri driver to load.

Usage:

override dri driver for device with spec kernel driver name:

<device kernel_driver="kernel_driver_name">
  <option name="dri_driver" value="new_dri_driver" />
</device>

or

<device driver="loader" kernel_driver="kernel_driver_name">
  <option name="dri_driver" value="new_dri_driver" />
</device>

v2:
  add kernel_driver device attribute to specify kernel
  driver name instead of reuse driver attribute

v3:
  seperate loader_get_kernel_driver_name into another patch
  seperate add kernel_driver attribute into another patch

Suggested-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
Acked-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
[v4 Emil: add HAVE_LIBDRM guard around __driConfigOptionsLoader and
loader_get_dri_config_driver]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/loader/loader.c
src/util/xmlpool/t_options.h