Use libdrm to get device id
Instead of call ioctl by ourself, use libdrm interface to get device id.
This not only saves one ioctl call as is done when gem bufmgr init. It
also allows to use libdrm's device id override helper envionment "INTEL_DEVID_OVERRIDE".
If you override device id combined with aub dump enable, you can get aub
file to debug it under emulator for any device that you might not have real
HW metal.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit
1879d37119ef65aaf0fbb63c7f5a60390ae64f27)