1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
14 * @debug_en: specifies whether debug mode enabled
15 * @vdisplay: used to filter out vdisplay value
16 * @hdisplay: used to filter out hdisplay value
17 * @vrefresh: used to filter out vrefresh value
18 * @tpg_state: specifies whether tpg feature is enabled
28 #if defined(CONFIG_DEBUG_FS)
31 * dp_debug_get() - configure and get the DisplayPlot debug module data
33 * @dev: device instance of the caller
34 * @panel: instance of panel module
35 * @usbpd: instance of usbpd module
36 * @link: instance of link module
37 * @connector: double pointer to display connector
38 * @minor: pointer to drm minor number after device registration
39 * return: pointer to allocated debug module data
41 * This function sets up the debug module and provides a way
42 * for debugfs input to be communicated with existing modules
44 struct dp_debug *dp_debug_get(struct device *dev, struct dp_panel *panel,
45 struct dp_usbpd *usbpd, struct dp_link *link,
46 struct drm_connector **connector,
47 struct drm_minor *minor);
52 * Cleans up dp_debug instance
54 * @dp_debug: instance of dp_debug
56 void dp_debug_put(struct dp_debug *dp_debug);
61 struct dp_debug *dp_debug_get(struct device *dev, struct dp_panel *panel,
62 struct dp_usbpd *usbpd, struct dp_link *link,
63 struct drm_connector **connector, struct drm_minor *minor)
65 return ERR_PTR(-EINVAL);
68 static inline void dp_debug_put(struct dp_debug *dp_debug)
72 #endif /* defined(CONFIG_DEBUG_FS) */
74 #endif /* _DP_DEBUG_H_ */