XenevaOS
Loading...
Searching...
No Matches
drm_debugfs.h
Go to the documentation of this file.
1/*
2 * Internal Header for the Direct Rendering Manager
3 *
4 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
5 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
6 * Copyright (c) 2009-2010, Code Aurora Forum.
7 * All rights reserved.
8 *
9 * Author: Rickard E. (Rik) Faith <faith@valinux.com>
10 * Author: Gareth Hughes <gareth@valinux.com>
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice (including the next
20 * paragraph) shall be included in all copies or substantial portions of the
21 * Software.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
27 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
28 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29 * OTHER DEALINGS IN THE SOFTWARE.
30 */
31
32#ifndef _DRM_DEBUGFS_H_
33#define _DRM_DEBUGFS_H_
34
35#include <linux/types.h>
36#include <linux/seq_file.h>
37
38#include <drm/drm_gpuvm.h>
39
51#define DRM_DEBUGFS_GPUVA_INFO(show, data) {"gpuvas", show, DRIVER_GEM_GPUVA, data}
52
61 const char *name;
69 int (*show)(struct seq_file*, void*);
73 void *data;
74};
75
92 const struct drm_info_list *info_ent;
93 /* private: */
95 struct dentry *dent;
96};
97
106 const char *name;
107
115 int (*show)(struct seq_file*, void*);
116
119
121 void *data;
122};
123
133
136
139};
140
141#if defined(CONFIG_DEBUG_FS)
142void drm_debugfs_create_files(const struct drm_info_list *files,
143 int count, struct dentry *root,
144 struct drm_minor *minor);
145int drm_debugfs_remove_files(const struct drm_info_list *files, int count,
146 struct dentry *root, struct drm_minor *minor);
147
148void drm_debugfs_add_file(struct drm_device *dev, const char *name,
149 int (*show)(struct seq_file*, void*), void *data);
150
151void drm_debugfs_add_files(struct drm_device *dev,
152 const struct drm_debugfs_info *files, int count);
153
154int drm_debugfs_gpuva_info(struct seq_file *m,
155 struct drm_gpuvm *gpuvm);
156
157void drm_debugfs_clients_add(struct drm_file *file);
158void drm_debugfs_clients_remove(struct drm_file *file);
159#else
160static inline void drm_debugfs_create_files(const struct drm_info_list *files,
161 int count, struct dentry *root,
162 struct drm_minor *minor)
163{}
164
165static inline int drm_debugfs_remove_files(const struct drm_info_list *files,
166 int count, struct dentry *root,
167 struct drm_minor *minor)
168{
169 return 0;
170}
171
172static inline void drm_debugfs_add_file(struct drm_device *dev, const char *name,
173 int (*show)(struct seq_file*, void*),
174 void *data)
175{}
176
177static inline void drm_debugfs_add_files(struct drm_device *dev,
178 const struct drm_debugfs_info *files,
179 int count)
180{}
181
182static inline int drm_debugfs_gpuva_info(struct seq_file *m,
183 struct drm_gpuvm *gpuvm)
184{
185 return 0;
186}
187
188static inline void drm_debugfs_clients_add(struct drm_file *file)
189{
190}
191
192static inline void drm_debugfs_clients_remove(struct drm_file *file)
193{
194}
195#endif
196
197#endif /* _DRM_DEBUGFS_H_ */
struct drm_crtc struct drm_plane struct drm_plane const struct drm_crtc_funcs const char * name
Definition drm_crtc.h:1242
const struct device * dev
Definition drm_print.h:519
void * data
Definition kthread.h:30
uint32_t u32
Definition kernel.h:16
Definition drm_debugfs.h:130
struct drm_device * dev
Definition drm_debugfs.h:132
struct list_head list
Definition drm_debugfs.h:138
Definition drm_debugfs.h:104
int(* show)(struct seq_file *, void *)
Definition drm_debugfs.h:115
u32 driver_features
Definition drm_debugfs.h:118
void * data
Definition drm_debugfs.h:121
const char * name
Definition drm_debugfs.h:106
Definition drm_device.h:75
Definition drm_file.h:165
Definition drm_gpuvm.h:229
Definition drm_debugfs.h:59
int(* show)(struct seq_file *, void *)
Definition drm_debugfs.h:69
const char * name
Definition drm_debugfs.h:61
u32 driver_features
Definition drm_debugfs.h:71
void * data
Definition drm_debugfs.h:73
Definition drm_debugfs.h:88
const struct drm_info_list * info_ent
Definition drm_debugfs.h:92
struct dentry * dent
Definition drm_debugfs.h:95
struct list_head list
Definition drm_debugfs.h:94
struct drm_minor * minor
Definition drm_debugfs.h:90
Definition drm_file.h:78
Definition fs.h:142
Definition list.h:11
Definition seq_file.h:47
TTY * root
Definition tty.cpp:47