diff options
author | ranjeet kumar <ranjeet1.kumar@intel.com> | 2020-04-28 19:01:41 +0530 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-05-11 20:16:27 +0100 |
commit | 22d0955e019020f9ecda4124707801214e279a0c (patch) | |
tree | 6f43a7cc405399eb892e905bae59311f9f0ab8ae /tests/i915/gem_exec_nop.c | |
parent | 5a5a3162a7638b3ae38b6dc2545622c204d1b97c (diff) |
Macros fixes: Removed unused & redundant macros
Local macros were declared in several files as a prelude to upstream
implementations. Now that we ship include/drm-uapi, we can remove LOCAL
as we upstream.
Cc: Dixit, Ashutosh <ashutosh.dixit@intel.com>
Cc: Tahvanainen Jari <jari.tahvanainen@intel.com>
Signed-off-by: ranjeet kumar <ranjeet1.kumar@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/i915/gem_exec_nop.c')
-rw-r--r-- | tests/i915/gem_exec_nop.c | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/tests/i915/gem_exec_nop.c b/tests/i915/gem_exec_nop.c index 1c17d023..4051e0fd 100644 --- a/tests/i915/gem_exec_nop.c +++ b/tests/i915/gem_exec_nop.c @@ -47,16 +47,10 @@ #include "igt_sysfs.h" -#define LOCAL_I915_EXEC_NO_RELOC (1<<11) -#define LOCAL_I915_EXEC_HANDLE_LUT (1<<12) +#define ENGINE_FLAGS (I915_EXEC_RING_MASK | I915_EXEC_BSD_MASK) -#define LOCAL_I915_EXEC_BSD_SHIFT (13) -#define LOCAL_I915_EXEC_BSD_MASK (3 << LOCAL_I915_EXEC_BSD_SHIFT) - -#define ENGINE_FLAGS (I915_EXEC_RING_MASK | LOCAL_I915_EXEC_BSD_MASK) - -#define MAX_PRIO LOCAL_I915_CONTEXT_MAX_USER_PRIORITY -#define MIN_PRIO LOCAL_I915_CONTEXT_MIN_USER_PRIORITY +#define MAX_PRIO I915_CONTEXT_MAX_USER_PRIORITY +#define MIN_PRIO I915_CONTEXT_MIN_USER_PRIORITY #define MAX_ENGINES (I915_EXEC_RING_MASK + 1) #define FORKED (1 << 0) @@ -85,8 +79,8 @@ static double nop_on_ring(int fd, uint32_t handle, execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; execbuf.flags = e->flags; - execbuf.flags |= LOCAL_I915_EXEC_HANDLE_LUT; - execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; + execbuf.flags |= I915_EXEC_HANDLE_LUT; + execbuf.flags |= I915_EXEC_NO_RELOC; if (__gem_execbuf(fd, &execbuf)) { execbuf.flags = e->flags; gem_execbuf(fd, &execbuf); @@ -463,8 +457,8 @@ static void parallel(int fd, uint32_t handle, int timeout) memset(&execbuf, 0, sizeof(execbuf)); execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; - execbuf.flags |= LOCAL_I915_EXEC_HANDLE_LUT; - execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; + execbuf.flags |= I915_EXEC_HANDLE_LUT; + execbuf.flags |= I915_EXEC_NO_RELOC; if (__gem_execbuf(fd, &execbuf)) { execbuf.flags = 0; gem_execbuf(fd, &execbuf); @@ -525,8 +519,8 @@ static void independent(int fd, uint32_t handle, int timeout) memset(&execbuf, 0, sizeof(execbuf)); execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; - execbuf.flags |= LOCAL_I915_EXEC_HANDLE_LUT; - execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; + execbuf.flags |= I915_EXEC_HANDLE_LUT; + execbuf.flags |= I915_EXEC_NO_RELOC; if (__gem_execbuf(fd, &execbuf)) { execbuf.flags = 0; gem_execbuf(fd, &execbuf); @@ -580,8 +574,8 @@ static void multiple(int fd, execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; execbuf.flags = e->flags; - execbuf.flags |= LOCAL_I915_EXEC_HANDLE_LUT; - execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; + execbuf.flags |= I915_EXEC_HANDLE_LUT; + execbuf.flags |= I915_EXEC_NO_RELOC; if (__gem_execbuf(fd, &execbuf)) { execbuf.flags = e->flags; gem_execbuf(fd, &execbuf); @@ -652,8 +646,8 @@ static void series(int fd, uint32_t handle, int timeout) memset(&execbuf, 0, sizeof(execbuf)); execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; - execbuf.flags |= LOCAL_I915_EXEC_HANDLE_LUT; - execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; + execbuf.flags |= I915_EXEC_HANDLE_LUT; + execbuf.flags |= I915_EXEC_NO_RELOC; if (__gem_execbuf(fd, &execbuf)) { execbuf.flags = 0; gem_execbuf(fd, &execbuf); @@ -729,8 +723,8 @@ static void sequential(int fd, uint32_t handle, unsigned flags, int timeout) memset(&execbuf, 0, sizeof(execbuf)); execbuf.buffers_ptr = to_user_pointer(obj); execbuf.buffer_count = 2; - execbuf.flags |= LOCAL_I915_EXEC_HANDLE_LUT; - execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; + execbuf.flags |= I915_EXEC_HANDLE_LUT; + execbuf.flags |= I915_EXEC_NO_RELOC; igt_require(__gem_execbuf(fd, &execbuf) == 0); if (flags & CONTEXT) { @@ -800,7 +794,6 @@ static void sequential(int fd, uint32_t handle, unsigned flags, int timeout) munmap(results, 4096); } -#define LOCAL_EXEC_FENCE_OUT (1 << 17) static bool fence_enable_signaling(int fence) { return poll(&(struct pollfd){fence, POLLIN}, 1, 0) == 0; @@ -846,7 +839,7 @@ static void fence_signal(int fd, uint32_t handle, memset(&execbuf, 0, sizeof(execbuf)); execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; - execbuf.flags = LOCAL_EXEC_FENCE_OUT; + execbuf.flags = I915_EXEC_FENCE_OUT; n = 0; count = 0; @@ -909,8 +902,8 @@ static void preempt(int fd, uint32_t handle, execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; execbuf.flags = e->flags; - execbuf.flags |= LOCAL_I915_EXEC_HANDLE_LUT; - execbuf.flags |= LOCAL_I915_EXEC_NO_RELOC; + execbuf.flags |= I915_EXEC_HANDLE_LUT; + execbuf.flags |= I915_EXEC_NO_RELOC; if (__gem_execbuf(fd, &execbuf)) { execbuf.flags = e->flags; gem_execbuf(fd, &execbuf); |