Samantha Tran | 2d1ed73 | 2017-07-31 17:30:14 -0700 | [diff] [blame] | 1 | /* |
Ajay Singh Parmar | 09e6af6 | 2018-01-19 17:56:21 -0800 | [diff] [blame] | 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. |
Samantha Tran | 2d1ed73 | 2017-07-31 17:30:14 -0700 | [diff] [blame] | 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" |
Ajay Singh Parmar | 09e6af6 | 2018-01-19 17:56:21 -0800 | [diff] [blame] | 21 | #include "dp_aux.h" |
Samantha Tran | 2d1ed73 | 2017-07-31 17:30:14 -0700 | [diff] [blame] | 22 | |
| 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 Komanduru | 04aa2a7 | 2017-11-06 17:59:24 +0530 | [diff] [blame] | 29 | * @tpg_state: specifies whether tpg feature is enabled |
Samantha Tran | 2d1ed73 | 2017-07-31 17:30:14 -0700 | [diff] [blame] | 30 | */ |
| 31 | struct dp_debug { |
| 32 | bool debug_en; |
Ajay Singh Parmar | 09e6af6 | 2018-01-19 17:56:21 -0800 | [diff] [blame] | 33 | bool sim_mode; |
Ajay Singh Parmar | 25e2ee5 | 2017-10-20 23:50:53 -0700 | [diff] [blame] | 34 | bool psm_enabled; |
Tatenda Chipeperekwa | 5951040 | 2017-09-28 12:50:58 -0700 | [diff] [blame] | 35 | int aspect_ratio; |
Samantha Tran | 2d1ed73 | 2017-07-31 17:30:14 -0700 | [diff] [blame] | 36 | int vdisplay; |
| 37 | int hdisplay; |
| 38 | int vrefresh; |
Padmanabhan Komanduru | 04aa2a7 | 2017-11-06 17:59:24 +0530 | [diff] [blame] | 39 | bool tpg_state; |
Samantha Tran | 2d1ed73 | 2017-07-31 17:30:14 -0700 | [diff] [blame] | 40 | }; |
| 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 |
Samantha Tran | b6a5cd8 | 2018-02-01 14:47:16 -0800 | [diff] [blame] | 50 | * @catalog: instance of catalog module |
Samantha Tran | 2d1ed73 | 2017-07-31 17:30:14 -0700 | [diff] [blame] | 51 | * return: pointer to allocated debug module data |
| 52 | * |
| 53 | * This function sets up the debug module and provides a way |
| 54 | * for debugfs input to be communicated with existing modules |
| 55 | */ |
| 56 | struct dp_debug *dp_debug_get(struct device *dev, struct dp_panel *panel, |
| 57 | struct dp_usbpd *usbpd, struct dp_link *link, |
Samantha Tran | b6a5cd8 | 2018-02-01 14:47:16 -0800 | [diff] [blame] | 58 | struct dp_aux *aux, struct drm_connector **connector, |
| 59 | struct dp_catalog *catalog); |
Samantha Tran | 2d1ed73 | 2017-07-31 17:30:14 -0700 | [diff] [blame] | 60 | /** |
| 61 | * dp_debug_put() |
| 62 | * |
| 63 | * Cleans up dp_debug instance |
| 64 | * |
| 65 | * @dp_debug: instance of dp_debug |
| 66 | */ |
| 67 | void dp_debug_put(struct dp_debug *dp_debug); |
| 68 | #endif /* _DP_DEBUG_H_ */ |