From: Ville Syrjälä <ville.syrj...@linux.intel.com>

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.syrj...@linux.intel.com>
---
 tools/intel_display_poller.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tools/intel_display_poller.c b/tools/intel_display_poller.c
index eab17c52428e..2129c613652d 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
-- 
2.10.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to