diff options
author | Michał Winiarski <michal.winiarski@intel.com> | 2019-03-12 13:48:13 +0100 |
---|---|---|
committer | Michał Winiarski <michal.winiarski@intel.com> | 2019-03-20 10:36:36 +0100 |
commit | 8ae86621d6fff60b6e20c6b0f9b336785c935b0f (patch) | |
tree | 12d83d267f5dafb16bcef5edec173ff57cf4dfbd /tests/i915/gem_concurrent_all.c | |
parent | 1bbe0b11a40cbb8433a3863745b7023e54c36ae3 (diff) |
lib/igt_device: Move intel_get_pci_device under igt_device
It allows us to make things a little bit more generic. Also, we now
require fd rather than doing guesswork when it comes to pci address.
v2: Use readlinkat rather than string concat, move stuff around, provide
a version that does not assert. (Chris)
v3: Print addr on failure, avoid assignment in conditionals. (Chris)
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/i915/gem_concurrent_all.c')
-rw-r--r-- | tests/i915/gem_concurrent_all.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/i915/gem_concurrent_all.c b/tests/i915/gem_concurrent_all.c index 6049372d..f719b0a1 100644 --- a/tests/i915/gem_concurrent_all.c +++ b/tests/i915/gem_concurrent_all.c @@ -1850,7 +1850,7 @@ igt_main c->name, s->name, "small"); igt_subtest_group { igt_fixture { - count = num_buffers(gem_mappable_aperture_size()/4, + count = num_buffers(gem_mappable_aperture_size(fd)/4, s, c, CHECK_RAM); } run_modes(name, c, modes, s, count); @@ -1861,7 +1861,7 @@ igt_main c->name, s->name, "thrash"); igt_subtest_group { igt_fixture { - count = num_buffers(gem_mappable_aperture_size(), + count = num_buffers(gem_mappable_aperture_size(fd), s, c, CHECK_RAM); } run_modes(name, c, modes, s, count); @@ -1893,7 +1893,7 @@ igt_main c->name, s->name, "shrink"); igt_subtest_group { igt_fixture { - count = num_buffers(gem_mappable_aperture_size(), + count = num_buffers(gem_mappable_aperture_size(fd), s, c, CHECK_RAM); igt_fork_shrink_helper(fd); @@ -1909,8 +1909,8 @@ igt_main c->name, s->name, "swap"); igt_subtest_group { igt_fixture { - if (intel_get_avail_ram_mb() > gem_mappable_aperture_size()/(1024*1024)) { - pin_sz = intel_get_avail_ram_mb() - gem_mappable_aperture_size()/(1024*1024); + if (intel_get_avail_ram_mb() > gem_mappable_aperture_size(fd)/(1024*1024)) { + pin_sz = intel_get_avail_ram_mb() - gem_mappable_aperture_size(fd)/(1024*1024); igt_debug("Pinning %lld MiB\n", (long long)pin_sz); pin_sz *= 1024 * 1024; @@ -1924,7 +1924,7 @@ igt_main igt_require(pinned); } - count = num_buffers(gem_mappable_aperture_size(), + count = num_buffers(gem_mappable_aperture_size(fd), s, c, CHECK_RAM | CHECK_SWAP); } run_modes(name, c, modes, s, count); |