tests/dumb_buffer: Tests for creation and map
Subsystems (2)
PATCH v3 1/2 tests/dumb_buffer: Tests for creation and map
Dumb buffer creation and mapping are covered with test cases.
v2:
Made as a generic test for dumb buffer creation [Chris]
v3:
dumb_map is used [Chris]
Added two tests for map.
Signed-off-by Ramalingam C <[email protected]>
cc Chris Wilson <[email protected]>
--- tests/Makefile.am | 2 + tests/Makefile.sources | 1 + tests/gem_dumb_buffer.c | 317 ++++++++++++++++++++++++++++++++++++++++ tests/meson.build | 9 ++ 4 files changed, 329 insertions(+) create mode 100644 tests/gem_dumb_buffer.c
tests/Makefile.am +2 -0
@@ -96,6 +96,8 @@ gem_close_race_LDADD = $(LDADD) -lpthread gem_ctx_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) gem_ctx_thrash_LDADD = $(LDADD) -lpthread gem_ctx_sseu_LDADD = $(LDADD) $(top_builddir)/lib/libigt_perf.la +gem_dumb_buffer_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS) +gem_dumb_buffer_LDADD = $(LDADD) -lpthread -latomic gem_exec_balancer_LDADD = $(LDADD) $(top_builddir)/lib/libigt_perf.la gem_exec_capture_LDADD = $(LDADD) -lz gem_exec_parallel_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
tests/Makefile.sources +1 -0
@@ -99,6 +99,7 @@ TESTS_progs = \ tools_test \ vgem_basic \ vgem_slow \ + gem_dumb_buffer \ $(NULL) TESTS_progs += gem_bad_reloc
tests/gem_dumb_buffer.c new file +317 -0
317 lines not on this page · raw message
tests/meson.build +9 -0
@@ -97,6 +97,7 @@ test_progs = [ 'vc4_wait_seqno', 'vgem_basic', 'vgem_slow', + 'gem_dumb_buffer' ] i915_progs = [
@@ -291,6 +292,14 @@ test_executables += executable('gem_create', install : true) test_list += 'gem_create' +# test_executables += executable('gem_dumb_buffer', +# join_paths('i915', 'gem_dumb_buffer.c'), +# dependencies : test_deps + [ libatomic ], +# install_dir : libexecdir, +# install_rpath : libexecdir_rpathdir, +# install : true) +#test_list += 'gem_dumb_buffer' + test_executables += executable('gem_ctx_sseu', join_paths('i915', 'gem_ctx_sseu.c'), dependencies : test_deps + [ lib_igt_perf ],
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v3 2/2 lib/kmstest_dumb_map_buffer: docs update
Added the need for munmapping the returned pointer, after its usage.
Signed-off-by Ramalingam C <[email protected]>
--- lib/igt_kms.c | 1 + 1 file changed, 1 insertion(+)
lib/igt_kms.c +1 -0
@@ -837,6 +837,7 @@ uint32_t kmstest_dumb_create(int fd, int width, int height, int bpp,* @size: Length of the mapping, must be greater than 0 * @prot: Describes the memory protection of the mapping * Returns: A pointer representing the start of the virtual mapping +* Caller of this function should munmap the pointer returned, after its usage. */ void *kmstest_dumb_map_buffer (int fd,uint32_t handle,uint64_t size,unsigned prot)
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev