meson: Add a "prefer_iris" build option
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 23 Nov 2019 06:18:58 +0000 (22:18 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 2 Dec 2019 20:56:27 +0000 (12:56 -0800)
commitdbe923bff99cfca4f192db3b9ea88cd19ee7af85
tree5bdc2993203ffa9654bbdef7d5d72ac1b6ed23f4
parentbebfb17a2b50f9890262e9c713cbb138796a1819
meson: Add a "prefer_iris" build option

Enabling this option makes Intel Gen8-11 hardware load the 'iris'
driver by default instead of the older 'i965' driver.

Regardless of how this option is set, users can still override which
driver the loader selects via two methods.  The first is to create a
~/.drirc or /etc/drirc file with the following snippet:

   <driconf>
     <device driver="loader" kernel_driver="i915">
       <option name="dri_driver" value="i965" />
     </device>
   </driconf>

The other option is to set an environment variable:

   export MESA_LOADER_DRIVER_OVERRIDE=i965

For now, "prefer_iris" defaults to i965 (the historical choice).
A separate future patch will change the default driver to iris.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1893
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
include/pci_ids/i965_pci_ids.h
meson_options.txt
src/loader/meson.build