File: vc4_debugfs.c

package info (click to toggle)
linux 4.9.25-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 794,052 kB
  • ctags: 3,033,799
  • sloc: ansic: 14,481,780; asm: 287,385; makefile: 35,234; perl: 27,553; sh: 15,791; python: 13,364; cpp: 6,087; yacc: 4,337; lex: 2,439; awk: 1,212; pascal: 231; lisp: 218; sed: 21
file content (43 lines) | stat: -rw-r--r-- 1,246 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 *  Copyright © 2014 Broadcom
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <linux/seq_file.h>
#include <linux/circ_buf.h>
#include <linux/ctype.h>
#include <linux/debugfs.h>
#include <drm/drmP.h>

#include "vc4_drv.h"
#include "vc4_regs.h"

static const struct drm_info_list vc4_debugfs_list[] = {
	{"bo_stats", vc4_bo_stats_debugfs, 0},
	{"dpi_regs", vc4_dpi_debugfs_regs, 0},
	{"hdmi_regs", vc4_hdmi_debugfs_regs, 0},
	{"hvs_regs", vc4_hvs_debugfs_regs, 0},
	{"crtc0_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)0},
	{"crtc1_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)1},
	{"crtc2_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)2},
	{"v3d_ident", vc4_v3d_debugfs_ident, 0},
	{"v3d_regs", vc4_v3d_debugfs_regs, 0},
};

#define VC4_DEBUGFS_ENTRIES ARRAY_SIZE(vc4_debugfs_list)

int
vc4_debugfs_init(struct drm_minor *minor)
{
	return drm_debugfs_create_files(vc4_debugfs_list, VC4_DEBUGFS_ENTRIES,
					minor->debugfs_root, minor);
}

void
vc4_debugfs_cleanup(struct drm_minor *minor)
{
	drm_debugfs_remove_files(vc4_debugfs_list, VC4_DEBUGFS_ENTRIES, minor);
}