MALI: bifrost: fix compilation errors when CONFIG_DEBUG_FS is disabled

Such as involving non_debuggable.config.

Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
Change-Id: I4224a31169c2ce224d8cc2d6993f4ac3cd40d675
This commit is contained in:
Zhen Chen
2021-10-28 18:00:11 +08:00
parent 26595250be
commit d0b95bb73b
3 changed files with 29 additions and 0 deletions

View File

@@ -395,6 +395,7 @@ void kbase_device_vinstr_term(struct kbase_device *kbdev)
kbase_vinstr_term(kbdev->vinstr_ctx);
}
#if defined(CONFIG_DEBUG_FS) && !IS_ENABLED(CONFIG_MALI_BIFROST_NO_MALI)
int kbase_device_io_history_init(struct kbase_device *kbdev)
{
return kbase_io_history_init(&kbdev->io_history,
@@ -405,6 +406,7 @@ void kbase_device_io_history_term(struct kbase_device *kbdev)
{
kbase_io_history_term(&kbdev->io_history);
}
#endif
int kbase_device_misc_register(struct kbase_device *kbdev)
{

View File

@@ -51,8 +51,18 @@ void kbase_device_hwcnt_virtualizer_term(struct kbase_device *kbdev);
int kbase_device_list_init(struct kbase_device *kbdev);
void kbase_device_list_term(struct kbase_device *kbdev);
#if defined(CONFIG_DEBUG_FS) && !IS_ENABLED(CONFIG_MALI_BIFROST_NO_MALI)
int kbase_device_io_history_init(struct kbase_device *kbdev);
void kbase_device_io_history_term(struct kbase_device *kbdev);
#else
static inline int kbase_device_io_history_init(struct kbase_device *kbdev)
{
return 0;
}
static inline void kbase_device_io_history_term(struct kbase_device *kbdev)
{
}
#endif
int kbase_device_misc_register(struct kbase_device *kbdev);
void kbase_device_misc_deregister(struct kbase_device *kbdev);

View File

@@ -70,6 +70,23 @@ void kbase_io_history_dump(struct kbase_device *kbdev);
void kbasep_regs_history_debugfs_init(struct kbase_device *kbdev);
#else /* defined(CONFIG_DEBUG_FS) && !IS_ENABLED(CONFIG_MALI_BIFROST_NO_MALI) */
static inline int kbase_io_history_init(struct kbase_io_history *h, u16 n)
{
return 0;
}
static inline void kbase_io_history_term(struct kbase_io_history *h)
{
}
static inline void kbase_io_history_dump(struct kbase_device *kbdev)
{
}
static inline void kbasep_regs_history_debugfs_init(struct kbase_device *kbdev)
{
}
#endif /* defined(CONFIG_DEBUG_FS) && !IS_ENABLED(CONFIG_MALI_BIFROST_NO_MALI) */
#endif /*_KBASE_REGS_HISTORY_DEBUGFS_H*/