xref: /netbsd-src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_debugfs.h (revision 41ec02673d281bbb3d38e6c78504ce6e30c228c1)
1*41ec0267Sriastradh /*	$NetBSD: amdgpu_debugfs.h,v 1.2 2021/12/18 23:44:58 riastradh Exp $	*/
24e390cabSriastradh 
34e390cabSriastradh /*
44e390cabSriastradh  * Copyright 2008 Advanced Micro Devices, Inc.
54e390cabSriastradh  * Copyright 2008 Red Hat Inc.
64e390cabSriastradh  * Copyright 2009 Jerome Glisse.
74e390cabSriastradh  *
84e390cabSriastradh  * Permission is hereby granted, free of charge, to any person obtaining a
94e390cabSriastradh  * copy of this software and associated documentation files (the "Software"),
104e390cabSriastradh  * to deal in the Software without restriction, including without limitation
114e390cabSriastradh  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
124e390cabSriastradh  * and/or sell copies of the Software, and to permit persons to whom the
134e390cabSriastradh  * Software is furnished to do so, subject to the following conditions:
144e390cabSriastradh  *
154e390cabSriastradh  * The above copyright notice and this permission notice shall be included in
164e390cabSriastradh  * all copies or substantial portions of the Software.
174e390cabSriastradh  *
184e390cabSriastradh  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
194e390cabSriastradh  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
204e390cabSriastradh  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
214e390cabSriastradh  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
224e390cabSriastradh  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
234e390cabSriastradh  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
244e390cabSriastradh  * OTHER DEALINGS IN THE SOFTWARE.
254e390cabSriastradh  *
264e390cabSriastradh  */
274e390cabSriastradh 
284e390cabSriastradh /*
294e390cabSriastradh  * Debugfs
304e390cabSriastradh  */
314e390cabSriastradh struct amdgpu_debugfs {
324e390cabSriastradh 	const struct drm_info_list	*files;
334e390cabSriastradh 	unsigned		num_files;
344e390cabSriastradh };
354e390cabSriastradh 
364e390cabSriastradh int amdgpu_debugfs_regs_init(struct amdgpu_device *adev);
374e390cabSriastradh void amdgpu_debugfs_regs_cleanup(struct amdgpu_device *adev);
384e390cabSriastradh int amdgpu_debugfs_init(struct amdgpu_device *adev);
394e390cabSriastradh void amdgpu_debugfs_preempt_cleanup(struct amdgpu_device *adev);
404e390cabSriastradh int amdgpu_debugfs_add_files(struct amdgpu_device *adev,
414e390cabSriastradh 			     const struct drm_info_list *files,
424e390cabSriastradh 			     unsigned nfiles);
434e390cabSriastradh int amdgpu_debugfs_fence_init(struct amdgpu_device *adev);
444e390cabSriastradh int amdgpu_debugfs_firmware_init(struct amdgpu_device *adev);
454e390cabSriastradh int amdgpu_debugfs_gem_init(struct amdgpu_device *adev);
46