blob: 5a5a786cc0e01480586ebd3f7ff1209c97686c50 [file] [log] [blame]
Samantha Tran2d1ed732017-07-31 17:30:14 -07001/*
Ajay Singh Parmar09e6af62018-01-19 17:56:21 -08002 * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
Samantha Tran2d1ed732017-07-31 17:30:14 -07003 *
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"
Ajay Singh Parmar09e6af62018-01-19 17:56:21 -080021#include "dp_aux.h"
Samantha Tran2d1ed732017-07-31 17:30:14 -070022
23/**
24 * struct dp_debug
25 * @debug_en: specifies whether debug mode enabled
26 * @vdisplay: used to filter out vdisplay value
27 * @hdisplay: used to filter out hdisplay value
28 * @vrefresh: used to filter out vrefresh value
Padmanabhan Komanduru04aa2a72017-11-06 17:59:24 +053029 * @tpg_state: specifies whether tpg feature is enabled
Samantha Tran2d1ed732017-07-31 17:30:14 -070030 */
31struct dp_debug {
32 bool debug_en;
Ajay Singh Parmar09e6af62018-01-19 17:56:21 -080033 bool sim_mode;
Ajay Singh Parmar25e2ee52017-10-20 23:50:53 -070034 bool psm_enabled;
Tatenda Chipeperekwa59510402017-09-28 12:50:58 -070035 int aspect_ratio;
Samantha Tran2d1ed732017-07-31 17:30:14 -070036 int vdisplay;
37 int hdisplay;
38 int vrefresh;
Padmanabhan Komanduru04aa2a72017-11-06 17:59:24 +053039 bool tpg_state;
Samantha Tran2d1ed732017-07-31 17:30:14 -070040};
41
42/**
43 * dp_debug_get() - configure and get the DisplayPlot debug module data
44 *
45 * @dev: device instance of the caller
46 * @panel: instance of panel module
47 * @usbpd: instance of usbpd module
48 * @link: instance of link module
49 * @connector: double pointer to display connector
50 * return: pointer to allocated debug module data
51 *
52 * This function sets up the debug module and provides a way
53 * for debugfs input to be communicated with existing modules
54 */
55struct dp_debug *dp_debug_get(struct device *dev, struct dp_panel *panel,
56 struct dp_usbpd *usbpd, struct dp_link *link,
Ajay Singh Parmar09e6af62018-01-19 17:56:21 -080057 struct dp_aux *aux, struct drm_connector **connector);
Samantha Tran2d1ed732017-07-31 17:30:14 -070058/**
59 * dp_debug_put()
60 *
61 * Cleans up dp_debug instance
62 *
63 * @dp_debug: instance of dp_debug
64 */
65void dp_debug_put(struct dp_debug *dp_debug);
66#endif /* _DP_DEBUG_H_ */