diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-12-13 18:56:13 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-12-19 15:11:44 +0200 |
commit | 5eae2f9495059de6ffa906998dec153ab2725d63 (patch) | |
tree | 873f8c563da87329abd1b1b6a1f24c8cd783750d /tools/intel_display_poller.c | |
parent | fec5cbad4a77d680da5ebb7b0dfd49b737dcc47f (diff) |
tools/intel_display_poller: Allow the tool to be used without i915 loaded
We don't need the drm fd to find out the PCI device ID. So let's drop
the drm stuff, which allows the tool to work without i915 loaded.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tools/intel_display_poller.c')
-rw-r--r-- | tools/intel_display_poller.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/intel_display_poller.c b/tools/intel_display_poller.c index eab17c524..2129c6136 100644 --- a/tools/intel_display_poller.c +++ b/tools/intel_display_poller.c @@ -961,7 +961,7 @@ static void __attribute__((noreturn)) usage(const char *name) int main(int argc, char *argv[]) { - int fd, i; + int i; int pipe = 0, bit = 0, target_scanline = 0, target_fuzz = 1; bool test_pixelcount = false; uint32_t devid; @@ -1045,9 +1045,7 @@ int main(int argc, char *argv[]) } } - fd = drm_open_driver(DRIVER_INTEL); - devid = intel_get_drm_devid(fd); - close(fd); + devid = intel_get_pci_device()->device_id; /* * check if the requires registers are |