msm: kgsl: introduce CONFIG_CORESIGHT_ADRENO.
We want to build coresight drivers as builtin drivers. But adreno-coresight.c in msm_adreno.ko calls coresight functions. To avoid exporting new symbols in vmlinux and breaking the ABI, this patch separates adreno-coresight.c into CONFIG_CORESIGHT_ADRENO. CONFIG_CORESIGHT_ADRENO is only enabled when both coresight and adreno are builtin drivers. Bug: 167414982 Bug: 170753932 Signed-off-by: Yabin Cui <yabinc@google.com> Change-Id: I7488293445ade738ba03cc457320e0d74f910886
This commit is contained in:
committed by
Hridaya Prajapati
parent
c85851f935
commit
b3b4b3bcd6
@@ -26,3 +26,7 @@ config QCOM_ADRENO_DEFAULT_GOVERNOR
|
||||
config QCOM_KGSL_IOMMU
|
||||
bool
|
||||
default y if QCOM_KGSL && (MSM_IOMMU || ARM_SMMU)
|
||||
|
||||
config CORESIGHT_ADRENO
|
||||
bool
|
||||
default y if QCOM_KGSL=y && CORESIGHT=y
|
||||
|
||||
@@ -31,7 +31,6 @@ msm_adreno-y += \
|
||||
adreno_drawctxt.o \
|
||||
adreno_dispatch.o \
|
||||
adreno_snapshot.o \
|
||||
adreno_coresight.o \
|
||||
adreno_trace.o \
|
||||
adreno_a3xx.o \
|
||||
adreno_a5xx.o \
|
||||
@@ -51,6 +50,7 @@ msm_adreno-y += \
|
||||
msm_adreno-$(CONFIG_QCOM_KGSL_IOMMU) += adreno_iommu.o
|
||||
msm_adreno-$(CONFIG_DEBUG_FS) += adreno_debugfs.o adreno_profile.o
|
||||
msm_adreno-$(CONFIG_COMPAT) += adreno_compat.o
|
||||
msm_adreno-$(CONFIG_CORESIGHT_ADRENO) += adreno_coresight.o
|
||||
|
||||
msm_kgsl_core-objs = $(msm_kgsl_core-y)
|
||||
msm_adreno-objs = $(msm_adreno-y)
|
||||
|
||||
@@ -806,6 +806,7 @@ struct adreno_coresight_attr {
|
||||
struct adreno_coresight_register *reg;
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_CORESIGHT_ADRENO)
|
||||
ssize_t adreno_coresight_show_register(struct device *device,
|
||||
struct device_attribute *attr, char *buf);
|
||||
|
||||
@@ -818,6 +819,12 @@ ssize_t adreno_coresight_store_register(struct device *dev,
|
||||
adreno_coresight_show_register, \
|
||||
adreno_coresight_store_register), \
|
||||
(_reg), }
|
||||
#else
|
||||
#define ADRENO_CORESIGHT_ATTR(_attrname, _reg) \
|
||||
struct adreno_coresight_attr coresight_attr_##_attrname = { \
|
||||
__ATTR_NULL, \
|
||||
(_reg), }
|
||||
#endif /* CONFIG_CORESIGHT_ADRENO */
|
||||
|
||||
/**
|
||||
* struct adreno_coresight - GPU specific coresight definition
|
||||
@@ -1089,12 +1096,22 @@ void adreno_fault_skipcmd_detached(struct adreno_device *adreno_dev,
|
||||
struct adreno_context *drawctxt,
|
||||
struct kgsl_drawobj *drawobj);
|
||||
|
||||
#if IS_ENABLED(CONFIG_CORESIGHT_ADRENO)
|
||||
int adreno_coresight_init(struct adreno_device *adreno_dev);
|
||||
|
||||
void adreno_coresight_start(struct adreno_device *adreno_dev);
|
||||
void adreno_coresight_stop(struct adreno_device *adreno_dev);
|
||||
|
||||
void adreno_coresight_remove(struct adreno_device *adreno_dev);
|
||||
#else
|
||||
static inline int adreno_coresight_init(struct adreno_device *adreno_dev)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
static inline void adreno_coresight_start(struct adreno_device *adreno_dev) { }
|
||||
static inline void adreno_coresight_stop(struct adreno_device *adreno_dev) { }
|
||||
static inline void adreno_coresight_remove(struct adreno_device *adreno_dev) { }
|
||||
#endif /* CONFIG_CORESIGHT_ADRENO */
|
||||
|
||||
bool adreno_hw_isidle(struct adreno_device *adreno_dev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user