android_kernel_xiaomi_sm8350/drivers/gpu/msm/adreno_iommu.h
Jordan Crouse 7a6368ee0b msm: kgsl: Add support for the Adreno GPU
First take a snapshot of the Adreno GPU (KGSL) driver from msm-4.19
commit 963db0f98552 ("msm: ipa4: add generic header processing context").

Then copy the msm_adreno_devfreq.h header from its previous location in
include/linux and the user API header from include/uapi/linux into the
driver directory. Both these files no longer need to be in the "generic"
headers.

Next do cleanups, lots of cleanups. Remove a bunch of extra features that
are from long departed targets or that have otherwise been replaced and
improved.

And finally cleanup kernel APIs that are no longer used, remove the
exported symbols from the GPU driver since nobody depends on us and do a
few other minor bits to put us on a track to being friendly with a modern
kernel.

Change-Id: Ic0dedbad5200dd9359a7b2fc06de415d755934e9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2019-12-03 13:45:19 -07:00

40 lines
958 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2015-2016,2019 The Linux Foundation. All rights reserved.
*/
#ifndef __ADRENO_IOMMU_H
#define __ADRENO_IOMMU_H
#if IS_ENABLED(CONFIG_ARM_SMMU)
int adreno_iommu_set_pt_ctx(struct adreno_ringbuffer *rb,
struct kgsl_pagetable *new_pt,
struct adreno_context *drawctxt);
void adreno_iommu_init(struct adreno_device *adreno_dev);
unsigned int adreno_iommu_set_pt_generate_cmds(
struct adreno_ringbuffer *rb,
unsigned int *cmds,
struct kgsl_pagetable *pt);
#else
static inline void adreno_iommu_init(struct adreno_device *adreno_dev) { }
static inline int adreno_iommu_set_pt_ctx(struct adreno_ringbuffer *rb,
struct kgsl_pagetable *new_pt,
struct adreno_context *drawctxt)
{
return 0;
}
static inline unsigned int adreno_iommu_set_pt_generate_cmds(
struct adreno_ringbuffer *rb,
unsigned int *cmds,
struct kgsl_pagetable *pt)
{
return 0;
}
#endif
#endif