kgsl_debugfs.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2002,2008-2011,2013,2015,2017,2019, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  5. */
  6. #ifndef _KGSL_DEBUGFS_H
  7. #define _KGSL_DEBUGFS_H
  8. struct kgsl_device;
  9. struct kgsl_process_private;
  10. #ifdef CONFIG_DEBUG_FS
  11. void kgsl_core_debugfs_init(void);
  12. void kgsl_core_debugfs_close(void);
  13. void kgsl_device_debugfs_init(struct kgsl_device *device);
  14. void kgsl_device_debugfs_close(struct kgsl_device *device);
  15. extern struct dentry *kgsl_debugfs_dir;
  16. static inline struct dentry *kgsl_get_debugfs_dir(void)
  17. {
  18. return kgsl_debugfs_dir;
  19. }
  20. void kgsl_pool_init_debugfs(struct dentry *pool_debugfs,
  21. char *name, void *pool);
  22. void kgsl_process_init_debugfs(struct kgsl_process_private *priv);
  23. #else
  24. static inline void kgsl_core_debugfs_init(void) { }
  25. static inline void kgsl_device_debugfs_init(struct kgsl_device *device) { }
  26. static inline void kgsl_device_debugfs_close(struct kgsl_device *device) { }
  27. static inline void kgsl_core_debugfs_close(void) { }
  28. static inline struct dentry *kgsl_get_debugfs_dir(void) { return NULL; }
  29. static inline void kgsl_pool_init_debugfs(struct dentry *pool_debugfs,
  30. char *name, void *pool) { }
  31. static inline void kgsl_process_init_debugfs(struct kgsl_process_private *priv)
  32. {
  33. }
  34. #endif
  35. #endif