blob: 7fd533082cc29aaa2a38611ec21466f1dc6e63ef [file] [log] [blame]
Samantha Tran2d1ed732017-07-31 17:30:14 -07001/*
2 * Copyright (c) 2017, The Linux Foundation. All rights reserved.
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 and
6 * only version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 */
14
15#ifndef _DP_DEBUG_H_
16#define _DP_DEBUG_H_
17
18#include "dp_panel.h"
19#include "dp_link.h"
20#include "dp_usbpd.h"
21
22/**
23 * struct dp_debug
24 * @debug_en: specifies whether debug mode enabled
25 * @vdisplay: used to filter out vdisplay value
26 * @hdisplay: used to filter out hdisplay value
27 * @vrefresh: used to filter out vrefresh value
28 */
29struct dp_debug {
30 bool debug_en;
31 int vdisplay;
32 int hdisplay;
33 int vrefresh;
34};
35
36/**
37 * dp_debug_get() - configure and get the DisplayPlot debug module data
38 *
39 * @dev: device instance of the caller
40 * @panel: instance of panel module
41 * @usbpd: instance of usbpd module
42 * @link: instance of link module
43 * @connector: double pointer to display connector
44 * return: pointer to allocated debug module data
45 *
46 * This function sets up the debug module and provides a way
47 * for debugfs input to be communicated with existing modules
48 */
49struct dp_debug *dp_debug_get(struct device *dev, struct dp_panel *panel,
50 struct dp_usbpd *usbpd, struct dp_link *link,
51 struct drm_connector **connector);
52/**
53 * dp_debug_put()
54 *
55 * Cleans up dp_debug instance
56 *
57 * @dp_debug: instance of dp_debug
58 */
59void dp_debug_put(struct dp_debug *dp_debug);
60#endif /* _DP_DEBUG_H_ */