public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/i915/gem_lut_handle: Minor fixes
@ 2020-02-26  5:46 bhanuprakash.modem
  2020-02-26 12:48 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: bhanuprakash.modem @ 2020-02-26  5:46 UTC (permalink / raw)
  To: igt-dev, bhanuprakash.modem

From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>

Remove redundent logics.
After exec, destroy BO properly.
Remove unnecessary & unused macros.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/i915/gem_lut_handle.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/tests/i915/gem_lut_handle.c b/tests/i915/gem_lut_handle.c
index fec65dd8..367d8bdf 100644
--- a/tests/i915/gem_lut_handle.c
+++ b/tests/i915/gem_lut_handle.c
@@ -41,10 +41,6 @@
 IGT_TEST_DESCRIPTION("Exercises the basic execbuffer using the handle LUT"
 		     " interface.");
 
-#define BATCH_SIZE		(1024*1024)
-
-#define LOCAL_I915_EXEC_HANDLE_LUT (1<<12)
-
 #define NORMAL 0
 #define USE_LUT 0x1
 #define BROKEN 0x2
@@ -80,7 +76,7 @@ static int exec(int fd, uint32_t handle, unsigned int flags)
 	execbuf.num_cliprects = 0;
 	execbuf.DR1 = 0;
 	execbuf.DR4 = 0;
-	execbuf.flags = flags & USE_LUT ? LOCAL_I915_EXEC_HANDLE_LUT : 0;
+	execbuf.flags = flags & USE_LUT ? I915_EXEC_HANDLE_LUT : 0;
 	i915_execbuffer2_set_context_id(execbuf, 0);
 	execbuf.rsvd2 = 0;
 
@@ -147,7 +143,7 @@ static int many_exec(int fd, uint32_t batch, int num_exec, int num_reloc, unsign
 	execbuf.num_cliprects = 0;
 	execbuf.DR1 = 0;
 	execbuf.DR4 = 0;
-	execbuf.flags = flags & USE_LUT ? LOCAL_I915_EXEC_HANDLE_LUT : 0;
+	execbuf.flags = flags & USE_LUT ? I915_EXEC_HANDLE_LUT : 0;
 	i915_execbuffer2_set_context_id(execbuf, 0);
 	execbuf.rsvd2 = 0;
 
@@ -180,8 +176,6 @@ igt_simple_main
 	fail(exec(fd, handle, BROKEN));
 
 	igt_skip_on(exec(fd, handle, USE_LUT));
-
-	do_or_die(exec(fd, handle, USE_LUT));
 	fail(exec(fd, handle, USE_LUT | BROKEN));
 
 	for (i = 2; i <= SLOW_QUICK(65536, 8); i *= 2) {
@@ -228,4 +222,6 @@ igt_simple_main
 		fail(many_exec(fd, handle, i+1, i, USE_LUT | BROKEN));
 		fail(many_exec(fd, handle, i+1, i+1, USE_LUT | BROKEN));
 	}
+
+	gem_close(fd, handle);
 }
-- 
2.24.1.1.gb6d4d82bd5

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-26 20:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-26  5:46 [igt-dev] [PATCH i-g-t] tests/i915/gem_lut_handle: Minor fixes bhanuprakash.modem
2020-02-26 12:48 ` Chris Wilson
2020-02-26 12:59 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-02-26 20:15 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox