blob: 245115d49c46a1244ef3e460a03fde397f763de8 [file] [log] [blame]
Eric Anholtc8b75bc2015-03-02 13:01:12 -08001/*
2 * Copyright © 2014 Broadcom
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#include <linux/seq_file.h>
10#include <linux/circ_buf.h>
11#include <linux/ctype.h>
12#include <linux/debugfs.h>
13#include <drm/drmP.h>
14
15#include "vc4_drv.h"
16#include "vc4_regs.h"
17
18static const struct drm_info_list vc4_debugfs_list[] = {
Eric Anholtc826a6e2015-10-09 20:25:07 -070019 {"bo_stats", vc4_bo_stats_debugfs, 0},
Eric Anholt08302c32016-02-10 11:42:32 -080020 {"dpi_regs", vc4_dpi_debugfs_regs, 0},
Eric Anholtc8b75bc2015-03-02 13:01:12 -080021 {"hdmi_regs", vc4_hdmi_debugfs_regs, 0},
22 {"hvs_regs", vc4_hvs_debugfs_regs, 0},
23 {"crtc0_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)0},
24 {"crtc1_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)1},
25 {"crtc2_regs", vc4_crtc_debugfs_regs, 0, (void *)(uintptr_t)2},
Eric Anholtd3f51682015-03-02 13:01:12 -080026 {"v3d_ident", vc4_v3d_debugfs_ident, 0},
27 {"v3d_regs", vc4_v3d_debugfs_regs, 0},
Eric Anholtc8b75bc2015-03-02 13:01:12 -080028};
29
30#define VC4_DEBUGFS_ENTRIES ARRAY_SIZE(vc4_debugfs_list)
31
32int
33vc4_debugfs_init(struct drm_minor *minor)
34{
35 return drm_debugfs_create_files(vc4_debugfs_list, VC4_DEBUGFS_ENTRIES,
36 minor->debugfs_root, minor);
37}
38
39void
40vc4_debugfs_cleanup(struct drm_minor *minor)
41{
42 drm_debugfs_remove_files(vc4_debugfs_list, VC4_DEBUGFS_ENTRIES, minor);
43}