mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-21 13:23:02 +00:00
Replace __gem_mmap__{cpu,gtt,wc}() + igt_assert() with gem_mmap__{cpu,gtt,wc}()
gem_mmap__{cpu,gtt,wc}() already has the assert built in, so replace
__gem_mmap__{cpu,gtt,wc}() + igt_assert() with it.
Mostly done with coccinelle, with some manual help:
@@
identifier I;
expression E1, E2, E3, E4, E5, E6;
@@
(
- I = __gem_mmap__gtt(E1, E2, E3, E4);
+ I = gem_mmap__gtt(E1, E2, E3, E4);
...
- igt_assert(I);
|
- I = __gem_mmap__cpu(E1, E2, E3, E4, E5);
+ I = gem_mmap__cpu(E1, E2, E3, E4, E5);
...
- igt_assert(I);
|
- I = __gem_mmap__wc(E1, E2, E3, E4, E5);
+ I = gem_mmap__wc(E1, E2, E3, E4, E5);
...
- igt_assert(I);
)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
@@ -162,9 +162,8 @@ static void reloc_and_emit(int fd, drm_intel_bo *target_bo, bool faulting_reloc)
|
||||
|
||||
handle_relocs = gem_create(fd, 4096);
|
||||
gem_write(fd, handle_relocs, 0, reloc, sizeof(reloc));
|
||||
gtt_relocs = __gem_mmap__gtt(fd, handle_relocs, 4096,
|
||||
PROT_READ | PROT_WRITE);
|
||||
igt_assert(gtt_relocs);
|
||||
gtt_relocs = gem_mmap__gtt(fd, handle_relocs, 4096,
|
||||
PROT_READ | PROT_WRITE);
|
||||
|
||||
exec[1].handle = special_bo->handle;
|
||||
exec[1].relocation_count = 1;
|
||||
|
||||
Reference in New Issue
Block a user