blob: 5a6c2c54937073c60329dce7ad3ae3738977118c [file] [log] [blame]
Shrenuj Bansala419c792016-10-20 14:05:11 -07001/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#ifndef __ADRENO_IOMMU_H
15#define __ADRENO_IOMMU_H
16
17#ifdef CONFIG_QCOM_KGSL_IOMMU
18int adreno_iommu_set_pt_ctx(struct adreno_ringbuffer *rb,
19 struct kgsl_pagetable *new_pt,
20 struct adreno_context *drawctxt,
21 unsigned long flags);
22
23int adreno_iommu_init(struct adreno_device *adreno_dev);
24
25unsigned int adreno_iommu_set_pt_generate_cmds(
26 struct adreno_ringbuffer *rb,
27 unsigned int *cmds,
28 struct kgsl_pagetable *pt);
29#else
30static inline int adreno_iommu_init(struct adreno_device *adreno_dev)
31{
32 return 0;
33}
34
35static inline int adreno_iommu_set_pt_ctx(struct adreno_ringbuffer *rb,
36 struct kgsl_pagetable *new_pt,
37 struct adreno_context *drawctxt,
38 unsigned long flags)
39{
40 return 0;
41}
42
43static inline unsigned int adreno_iommu_set_pt_generate_cmds(
44 struct adreno_ringbuffer *rb,
45 unsigned int *cmds,
46 struct kgsl_pagetable *pt)
47{
48 return 0;
49}
50
51#endif
52#endif