summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/intel/tools/intel_dump_gpu.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/src/intel/tools/intel_dump_gpu.c b/src/intel/tools/intel_dump_gpu.c
index 09b8db39aa2..f9a5668be53 100644
--- a/src/intel/tools/intel_dump_gpu.c
+++ b/src/intel/tools/intel_dump_gpu.c
@@ -172,21 +172,6 @@ gem_mmap(int fd, uint32_t handle, uint64_t offset, uint64_t size)
return (void *)(uintptr_t) mmap.addr_ptr;
}
-static int
-gem_get_param(int fd, uint32_t param)
-{
- int value;
- drm_i915_getparam_t gp = {
- .param = param,
- .value = &value
- };
-
- if (gem_ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp) == -1)
- return 0;
-
- return value;
-}
-
static enum drm_i915_gem_engine_class
engine_class_from_ring_flag(uint32_t ring_flag)
{
@@ -219,13 +204,9 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2)
/* We can't do this at open time as we're not yet authenticated. */
if (device == 0) {
- device = gem_get_param(fd, I915_PARAM_CHIPSET_ID);
- fail_if(device == 0 || devinfo.gen == 0, "failed to identify chipset\n");
- }
- if (devinfo.gen == 0) {
- fail_if(!gen_get_device_info(device, &devinfo),
- "failed to identify chipset=0x%x\n", device);
-
+ fail_if(!gen_get_device_info_from_fd(fd, &devinfo),
+ "failed to identify chipset.\n");
+ device = devinfo.chipset_id;
aub_file_init(&aub_file, output_file,
verbose == 2 ? stdout : NULL,
device, program_invocation_short_name);