summaryrefslogtreecommitdiff
path: root/debugger
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2019-03-27 20:52:52 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2019-03-29 22:23:27 +0200
commite408d569973b610ba4aafdba016c48b25e563468 (patch)
treee3e1050d63918d053369c7669b62097d501a0451 /debugger
parent1ac3264e0370134d06e2cff211c0da4aa5c7d83b (diff)
Revert "lib/igt_device: Move intel_get_pci_device under igt_device"
One significant usecase for intel_reg/etc. is to be able to examine the hardware state *before* loading the driver. If the tool forces the driver to load we've totally lost that capability. This reverts commit 8ae86621d6fff60b6e20c6b0f9b336785c935b0f. Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Michał Winiarski <michal.winiarski@intel.com>
Diffstat (limited to 'debugger')
-rw-r--r--debugger/debug_rdata.c7
-rw-r--r--debugger/eudb.c8
2 files changed, 5 insertions, 10 deletions
diff --git a/debugger/debug_rdata.c b/debugger/debug_rdata.c
index fea95029..61d82d9e 100644
--- a/debugger/debug_rdata.c
+++ b/debugger/debug_rdata.c
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "intel_io.h"
+#include "intel_chipset.h"
struct eu_rdata {
union {
@@ -132,11 +133,7 @@ find_stuck_threads(void)
int main(int argc, char *argv[]) {
struct pci_device *pci_dev;
- int fd;
-
- fd = drm_open_driver(DRIVER_INTEL);
- pci_dev = igt_device_get_pci_device(fd);
- close(fd);
+ pci_dev = intel_get_pci_device();
intel_register_access_init(pci_dev, 1);
find_stuck_threads();
diff --git a/debugger/eudb.c b/debugger/eudb.c
index b5784148..866d4b52 100644
--- a/debugger/eudb.c
+++ b/debugger/eudb.c
@@ -42,6 +42,7 @@
#include "drm.h"
#include "i915_drm.h"
#include "drmtest.h"
+#include "intel_chipset.h"
#include "intel_bufmgr.h"
#include "intel_io.h"
#include "intel_batchbuffer.h"
@@ -505,7 +506,7 @@ int main(int argc, char* argv[]) {
struct pci_device *pci_dev;
volatile uint8_t *scratch = NULL;
int bits[64];
- int devid = -1, opt, fd;
+ int devid = -1, opt;
while ((opt = getopt(argc, argv, "cdr:pf?h")) != -1) {
switch (opt) {
@@ -532,10 +533,7 @@ int main(int argc, char* argv[]) {
}
}
- fd = drm_open_driver(DRIVER_INTEL);
- pci_dev = igt_device_get_pci_device(fd);
- close(fd);
-
+ pci_dev = intel_get_pci_device();
if (devid == -1)
devid = pci_dev->device_id;
if (identify_device(devid)) {