]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debugfs.h
gpu: vivante: Update driver from Freescale 3.10.53-1.1-ga BSP
[karo-tx-linux.git] / drivers / mxc / gpu-viv / hal / os / linux / kernel / gc_hal_kernel_debugfs.h
1 /****************************************************************************
2 *
3 *    Copyright (C) 2005 - 2014 by Vivante Corp.
4 *
5 *    This program is free software; you can redistribute it and/or modify
6 *    it under the terms of the GNU General Public License as published by
7 *    the Free Software Foundation; either version 2 of the license, or
8 *    (at your option) any later version.
9 *
10 *    This program is distributed in the hope that it will be useful,
11 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 *    GNU General Public License for more details.
14 *
15 *    You should have received a copy of the GNU General Public License
16 *    along with this program; if not write to the Free Software
17 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 *
19 *****************************************************************************/
20
21
22 #include <stdarg.h>
23
24 #ifndef __gc_hal_kernel_debugfs_h_
25 #define __gc_hal_kernel_debugfs_h_
26
27  #define MAX_LINE_SIZE 768           /* Max bytes for a line of debug info */
28
29
30  typedef struct _gcsDEBUGFS_Node gcsDEBUGFS_Node;
31
32 typedef struct _gcsDEBUGFS_DIR *gckDEBUGFS_DIR;
33 typedef struct _gcsDEBUGFS_DIR
34 {
35     struct dentry *     root;
36     struct list_head    nodeList;
37 }
38 gcsDEBUGFS_DIR;
39
40 typedef struct _gcsINFO
41 {
42     const char *        name;
43     int                 (*show)(struct seq_file*, void*);
44 }
45 gcsINFO;
46
47 typedef struct _gcsINFO_NODE
48 {
49     gcsINFO *          info;
50     gctPOINTER         device;
51     struct dentry *    entry;
52     struct list_head   head;
53 }
54 gcsINFO_NODE;
55
56 gceSTATUS
57 gckDEBUGFS_DIR_Init(
58     IN gckDEBUGFS_DIR Dir,
59     IN struct dentry *root,
60     IN gctCONST_STRING Name
61     );
62
63 gceSTATUS
64 gckDEBUGFS_DIR_CreateFiles(
65     IN gckDEBUGFS_DIR Dir,
66     IN gcsINFO * List,
67     IN int count,
68     IN gctPOINTER Data
69     );
70
71 gceSTATUS
72 gckDEBUGFS_DIR_RemoveFiles(
73     IN gckDEBUGFS_DIR Dir,
74     IN gcsINFO * List,
75     IN int count
76     );
77
78 void
79 gckDEBUGFS_DIR_Deinit(
80     IN gckDEBUGFS_DIR Dir
81     );
82
83 /*******************************************************************************
84  **
85  **                             System Related
86  **
87  *******************************************************************************/
88
89 gctINT gckDEBUGFS_IsEnabled(void);
90
91 gctINT gckDEBUGFS_Initialize(void);
92
93 gctINT gckDEBUGFS_Terminate(void);
94
95
96 /*******************************************************************************
97  **
98  **                             Node Related
99  **
100  *******************************************************************************/
101
102 gctINT
103 gckDEBUGFS_CreateNode(
104     IN gctPOINTER Device,
105     IN gctINT SizeInKB,
106     IN struct dentry * Root,
107     IN gctCONST_STRING NodeName,
108     OUT gcsDEBUGFS_Node **Node
109     );
110
111 void gckDEBUGFS_FreeNode(
112             IN gcsDEBUGFS_Node  * Node
113             );
114
115
116
117 void gckDEBUGFS_SetCurrentNode(
118             IN gcsDEBUGFS_Node  * Node
119             );
120
121
122
123 void gckDEBUGFS_GetCurrentNode(
124             OUT gcsDEBUGFS_Node  ** Node
125             );
126
127
128 ssize_t gckDEBUGFS_Print(
129                 IN gctCONST_STRING  Message,
130                 ...
131                 );
132
133 #endif
134
135