loader: slim down loader_get_pci_id_for_fd implementation(s)
Currently mesa has three code paths in the loader - libudev, manual
sysfs and drm ioctl one.
Considering the issues we had with libudev - strip those down in favour
of the libdrm drm device API. The latter can be implemented in any way
depending on the platform and can be reused by others.
v2: Use correct message on drmGetDevice failure. (Nicolai)
Cc: Jonathan Gray <jsg@jsg.id.au>
Cc: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>