msm: kgsl: Fix compilation errors when CONFIG_QCOM_KGSL is disabled
Some of the external modules use the symbols exported by kgsl. When CONFIG_QCOM_KGSL is disabled, currently compilation breaks because some functions are not defined. Fix this by adding dummy definitions for the functions used by others. Change-Id: I652c30319dde21d911806a83e42cf632d7141712 Signed-off-by: Puranam V G Tejaswi <quic_pvgtejas@quicinc.com>
This commit is contained in:
parent
704c1e1e55
commit
231dd18deb
@ -1,7 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
#ifndef _MSM_KGSL_H
|
||||
#define _MSM_KGSL_H
|
||||
@ -18,6 +18,23 @@ struct kgsl_gpu_freq_stat {
|
||||
u64 idle_time;
|
||||
};
|
||||
|
||||
/**
|
||||
* enum kgsl_srcu_events - kgsl srcu notify events for listeners
|
||||
* @GPU_GMU_READY - GMU initialized to handle other requests
|
||||
* @GPU_GMU_STOP - GMU is not ready to handle other requests
|
||||
* @GPU_SSR_BEGIN - GPU/GMU fault detected to start recovery
|
||||
* @GPU_SSR_END - GPU/GMU fault recovery end
|
||||
* @GPU_SSR_FATAL - LSR context invalidated
|
||||
*/
|
||||
enum kgsl_srcu_events {
|
||||
GPU_GMU_READY,
|
||||
GPU_GMU_STOP,
|
||||
GPU_SSR_BEGIN,
|
||||
GPU_SSR_END,
|
||||
GPU_SSR_FATAL,
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_QCOM_KGSL)
|
||||
/**
|
||||
* kgsl_gpu_num_freqs - Get number of available GPU frequencies
|
||||
*
|
||||
@ -61,22 +78,6 @@ int kgsl_gpu_frame_count(pid_t pid, u64 *frame_count);
|
||||
*/
|
||||
u64 kgsl_get_stats(pid_t pid);
|
||||
|
||||
/**
|
||||
* enum kgsl_srcu_events - kgsl srcu notify events for listeners
|
||||
* @GPU_GMU_READY - GMU initialized to handle other requests
|
||||
* @GPU_GMU_STOP - GMU is not ready to handle other requests
|
||||
* @GPU_SSR_BEGIN - GPU/GMU fault detected to start recovery
|
||||
* @GPU_SSR_END - GPU/GMU fault recovery end
|
||||
* @GPU_SSR_FATAL - LSR context invalidated
|
||||
*/
|
||||
enum kgsl_srcu_events {
|
||||
GPU_GMU_READY,
|
||||
GPU_GMU_STOP,
|
||||
GPU_SSR_BEGIN,
|
||||
GPU_SSR_END,
|
||||
GPU_SSR_FATAL,
|
||||
};
|
||||
|
||||
/**
|
||||
* kgsl_add_rcu_notifier - Adds a notifier to an SRCU notifier chain.
|
||||
* @nb: Notifier block new entry to add in notifier chain
|
||||
@ -93,4 +94,35 @@ int kgsl_add_rcu_notifier(struct notifier_block *nb);
|
||||
*/
|
||||
int kgsl_del_rcu_notifier(struct notifier_block *nb);
|
||||
|
||||
#else /* !CONFIG_QCOM_KGSL */
|
||||
static inline int kgsl_gpu_num_freqs(void)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int kgsl_gpu_stat(struct kgsl_gpu_freq_stat *stats, u32 numfreq)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int kgsl_gpu_frame_count(pid_t pid, u64 *frame_count)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline u64 kgsl_get_stats(pid_t pid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int kgsl_add_rcu_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static inline int kgsl_del_rcu_notifier(struct notifier_block *nb)
|
||||
{
|
||||
return -ENOENT;
|
||||
}
|
||||
#endif /* CONFIG_QCOM_KGSL */
|
||||
#endif /* _MSM_KGSL_H */
|
||||
|
Loading…
Reference in New Issue
Block a user