blob: 5f8d89aadaf0fe43b3286a465f8a92a825ec4cbc [file] [log] [blame]
Harsh Vardhan Dwivediff6dc292012-02-23 16:38:30 -07001/* Copyright (c) 2002,2008-2012, Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13#ifndef __ADRENO_DEBUGFS_H
14#define __ADRENO_DEBUGFS_H
15
16#ifdef CONFIG_DEBUG_FS
17
18int adreno_debugfs_init(struct kgsl_device *device);
19
Harsh Vardhan Dwivediff6dc292012-02-23 16:38:30 -070020extern int adreno_pm_regs_enabled;
21extern int adreno_pm_ib_enabled;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070022
Harsh Vardhan Dwivediff6dc292012-02-23 16:38:30 -070023static inline int is_adreno_pm_regs_enabled(void)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070024{
Harsh Vardhan Dwivediff6dc292012-02-23 16:38:30 -070025 return adreno_pm_regs_enabled;
26}
27
28static inline int is_adreno_pm_ib_enabled(void)
29{
30 return adreno_pm_ib_enabled;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070031}
32
33#else
34static inline int adreno_debugfs_init(struct kgsl_device *device)
35{
36 return 0;
37}
38
39static inline int kgsl_pmregs_enabled(void)
40{
41 /* If debugfs is turned off, then always print registers */
42 return 1;
43}
44#endif
45
46#endif /* __ADRENO_DEBUGFS_H */