[igt-dev] [PATCH i-g-t 1/1] tests/i915/gem_exec_reloc: free the spin in proper place
Bommu Krishnaiah
krishnaiah.bommu at intel.com
Wed Apr 29 06:12:27 UTC 2020
Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu at intel.com>
---
tests/i915/gem_exec_reloc.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c
index 4112e145..643ac4bf 100644
--- a/tests/i915/gem_exec_reloc.c
+++ b/tests/i915/gem_exec_reloc.c
@@ -453,6 +453,8 @@ static void basic_reloc(int fd, unsigned before, unsigned after, unsigned flags)
gem_execbuf(fd, &execbuf);
+ igt_spin_free(fd, spin);
+
if (after) {
char *wc;
@@ -479,8 +481,6 @@ static void basic_reloc(int fd, unsigned before, unsigned after, unsigned flags)
igt_assert_eq_u64(reloc.presumed_offset, offset);
igt_assert_eq_u64(obj.offset, offset);
- igt_spin_free(fd, spin);
-
/* Simulate relocation */
if (flags & NORELOC) {
obj.offset += OBJSZ;
@@ -521,6 +521,8 @@ static void basic_reloc(int fd, unsigned before, unsigned after, unsigned flags)
gem_execbuf(fd, &execbuf);
+ igt_spin_free(fd, spin);
+
if (after) {
char *wc;
@@ -547,7 +549,6 @@ static void basic_reloc(int fd, unsigned before, unsigned after, unsigned flags)
igt_assert_eq_u64(reloc.presumed_offset, offset);
igt_assert_eq_u64(obj.offset, offset);
- igt_spin_free(fd, spin);
if (trash)
gem_close(fd, trash);
}
--
2.25.1
More information about the igt-dev
mailing list