intel/perf: improve dynamic loading config detection
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 5 Jun 2019 08:20:23 +0000 (11:20 +0300)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 5 Jun 2019 20:16:23 +0000 (20:16 +0000)
commitc1621274401b4bd2de7db1f7a813f6bfce8307f8
tree4d3f78e9ab3e062be83348db0e65c7ad93a394a5
parent811c05dfe6189cabc6d8aa547a3463778f2d5249
intel/perf: improve dynamic loading config detection

We're currently trying to detect dynamic loading config support by
trying to remove to test config (hard coded in the i915 driver) and
checking we get ENOENT.

This can fail if the test config was updated in Mesa but not yet in
i915.

A better way to do this is to pick an invalid ID and check for ENOENT.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/perf/gen_perf.c