1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3 * Copyright (c) 2017, Linaro Limited
4 * All rights reserved.
5 */
6
7 #ifndef XTEST_SDP_BASIC_H
8 #define XTEST_SDP_BASIC_H
9
10 #include <linux/dma-buf.h>
11 #include <linux/version.h>
12 #include <linux/dma-heap.h>
13 #define DEFAULT_HEAP_NAME "/dev/dma_heap/sdp"
14
15 #include "ta_sdp_basic.h"
16
17 enum test_target_ta {
18 TEST_NS_TO_TA,
19 TEST_NS_TO_PTA,
20 TEST_TA_TO_TA,
21 TEST_TA_TO_PTA,
22 };
23
24 int allocate_dma_buffer(size_t size, const char *heap_name, int verbosity);
allocate_buffer(size_t size,const char * heap_name,int verbosity)25 static inline int allocate_buffer(size_t size, const char *heap_name,
26 int verbosity)
27 {
28 return allocate_dma_buffer(size, heap_name, verbosity);
29 }
30 int sdp_basic_test(enum test_target_ta ta,
31 size_t size, size_t loop, const char *heap_name,
32 int rnd_offset, int verbosity);
33
34 int sdp_out_of_bounds_memref_test(size_t size, const char *heap_name,
35 int verbosity);
36
37 #endif /* XTEST_SDP_BASIC_H */
38