[Libva] [PATCH] Use libdrm to get device id
Zhenyu Wang
zhenyuw at linux.intel.com
Thu Dec 25 01:15:46 PST 2014
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 at linux.intel.com>
---
src/intel_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/intel_driver.c b/src/intel_driver.c
index 994e64c..ff201bd 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -101,7 +101,8 @@ intel_driver_init(VADriverContextP ctx)
intel->locked = 0;
pthread_mutex_init(&intel->ctxmutex, NULL);
- intel_driver_get_param(intel, I915_PARAM_CHIPSET_ID, &intel->device_id);
+ intel_memman_init(intel);
+ intel->device_id = drm_intel_bufmgr_gem_get_devid(intel->bufmgr);
intel->device_info = i965_get_device_info(intel->device_id);
if (!intel->device_info)
@@ -117,7 +118,6 @@ intel_driver_init(VADriverContextP ctx)
intel->has_vebox = !!has_vebox;
intel_driver_get_revid(intel, &intel->revision);
- intel_memman_init(intel);
return true;
}
--
2.1.4
More information about the Libva
mailing list