intel/dev: Bail when INTEL_DEVID_OVERRIDE is not valid
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 30 Apr 2020 22:01:27 +0000 (15:01 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Fri, 1 May 2020 17:12:01 +0000 (10:12 -0700)
commit2a05ba541401ace1417aa57fab907abb4288baa2
tree9639268ad6d59afa856b8c422c92ec83444c9e43
parent65b05ebdda18c1cebd88c72cc8f50530addb80c6
intel/dev: Bail when INTEL_DEVID_OVERRIDE is not valid

Avoids surprises where you set an OVERRIDE but it gets ignored and the
system PCI ID is used.

Also fixes the bug that the error of invalid platform name being
printed too early, even when the passed platform was a PCI ID (which
is also supported).

For the case where euid != uid, a warning was added but the behavior
wasn't changed: it is still going to fallback to system PCI ID.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4841>
src/intel/dev/gen_device_info.c