summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorDaniel Mrzyglod <daniel.t.mrzyglod@intel.com>2019-08-29 15:10:37 +0200
committerChris Wilson <chris@chris-wilson.co.uk>2019-08-29 17:05:29 +0100
commitd38950f2c0ca846816c9b0e6601181cc7e1982de (patch)
treed0693ca7e6bb61d387f4ca2e75c93fa4e265e235 /benchmarks
parent6e3af15a9e9dcd6159a74e5e66aec3e1c1347d51 (diff)
lib/intel_mmio: add additional api for multiple devices
Library was limited for reading registers for only one device at a time in igt tests. Changes in this patch give as oportunity to test multiple devices in the same time. v8: pack and rename structure, remove unnecessary field v7: remove unnecessary code v6: Reword patch. Cosmetic changes. Cc: Antonio Argenziano <antonio.argenziano@intel.com> Cc: Daniele Spurio Ceraolo <daniele.ceraolospurio@intel.com> Cc: Katarzyna Dec <katarzyna.dec@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Zbigniew KempczyƄski <zbigniew.kempczynski@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Mrzyglod <daniel.t.mrzyglod@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/gem_latency.c3
-rw-r--r--benchmarks/gem_wsim.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/benchmarks/gem_latency.c b/benchmarks/gem_latency.c
index c3fc4bf0..0fc4b05e 100644
--- a/benchmarks/gem_latency.c
+++ b/benchmarks/gem_latency.c
@@ -55,6 +55,7 @@
static int done;
static int fd;
static volatile uint32_t *timestamp_reg;
+static struct intel_mmio_data mmio_data;
#define REG(x) (volatile uint32_t *)((volatile char *)igt_global_mmio + x)
#define REG_OFFSET(x) ((volatile char *)(x) - (volatile char *)igt_global_mmio)
@@ -456,7 +457,7 @@ static int run(int seconds,
if (gen < 6)
return IGT_EXIT_SKIP; /* Needs BCS timestamp */
- intel_register_access_init(intel_get_pci_device(), false, fd);
+ intel_register_access_init(&mmio_data, intel_get_pci_device(), false, fd);
if (gen == 6)
timestamp_reg = REG(RCS_TIMESTAMP);
diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
index b8e22b3f..87f873b0 100644
--- a/benchmarks/gem_wsim.c
+++ b/benchmarks/gem_wsim.c
@@ -238,6 +238,7 @@ struct workload
} busy_balancer;
};
+struct intel_mmio_data mmio_data;
static const unsigned int nop_calibration_us = 1000;
static unsigned long nop_calibration;
@@ -3071,7 +3072,7 @@ static void init_clocks(void)
uint32_t rcs_start, rcs_end;
double overhead, t;
- intel_register_access_init(intel_get_pci_device(), false, fd);
+ intel_register_access_init(&mmio_data, intel_get_pci_device(), false, fd);
if (verbose <= 1)
return;