kselftests: Add dma-heap test
authorJohn Stultz <john.stultz@linaro.org>
Tue, 3 Dec 2019 17:26:41 +0000 (17:26 +0000)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:34:02 +0000 (16:34 +0100)
commit3806fe724c22042de8597077150ef87f1a7e4e51
treeae3f68f58a784808bf5301e65e6d5e2990c97121
parent0aadce63cdff19591cf9de839380f1416954eff4
kselftests: Add dma-heap test

Commit a8779927fd86c91f5400bfcbccfa018a667d8350 upstream.

Add very trivial allocation and import test for dma-heaps,
utilizing the vgem driver as a test importer.

A good chunk of this code taken from:
  tools/testing/selftests/android/ion/ionmap_test.c
  Originally by Laura Abbott <labbott@redhat.com>

Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Liam Mark <lmark@codeaurora.org>
Cc: Pratik Patel <pratikp@codeaurora.org>
Cc: Brian Starkey <Brian.Starkey@arm.com>
Cc: Vincent Donnefort <Vincent.Donnefort@arm.com>
Cc: Sudipto Paul <Sudipto.Paul@arm.com>
Cc: Andrew F. Davis <afd@ti.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Chenbo Feng <fengc@google.com>
Cc: Alistair Strachan <astrachan@google.com>
Cc: Hridya Valsaraju <hridya@google.com>
Cc: Sandeep Patil <sspatil@google.com>
Cc: Hillf Danton <hdanton@sina.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
Acked-by: Sandeep Patil <sspatil@android.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Tested-by: Ayan Kumar Halder <ayan.halder@arm.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191203172641.66642-6-john.stultz@linaro.org
tools/testing/selftests/dmabuf-heaps/Makefile [new file with mode: 0644]
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c [new file with mode: 0644]