OSDN Git Service

Use libdrm to get device id
authorZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 26 Dec 2014 07:04:11 +0000 (00:04 -0700)
committerZhao, Yakui <yakui.zhao@intel.com>
Mon, 29 Dec 2014 01:08:29 +0000 (09:08 +0800)
commit94cff41032e7e1e6719d9bc51719c2b7783314ae
treeefc5234ac24a316b45279af2d141db26597337ed
parent54ec3c6b86006790b3571358dc7af2e17529569f
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)
src/intel_driver.c