[PATCH i-g-t 4/4] tools/intel_display_poller: Allow the tool to be used without i915 loaded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux