xref: /OK3568_Linux_fs/kernel/drivers/gpu/drm/msm/dp/dp_ctrl.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
4*4882a593Smuzhiyun  */
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun #ifndef _DP_CTRL_H_
7*4882a593Smuzhiyun #define _DP_CTRL_H_
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun #include "dp_aux.h"
10*4882a593Smuzhiyun #include "dp_panel.h"
11*4882a593Smuzhiyun #include "dp_link.h"
12*4882a593Smuzhiyun #include "dp_parser.h"
13*4882a593Smuzhiyun #include "dp_power.h"
14*4882a593Smuzhiyun #include "dp_catalog.h"
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun struct dp_ctrl {
17*4882a593Smuzhiyun 	bool orientation;
18*4882a593Smuzhiyun 	atomic_t aborted;
19*4882a593Smuzhiyun 	u32 pixel_rate;
20*4882a593Smuzhiyun };
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun int dp_ctrl_host_init(struct dp_ctrl *dp_ctrl, bool flip);
23*4882a593Smuzhiyun void dp_ctrl_host_deinit(struct dp_ctrl *dp_ctrl);
24*4882a593Smuzhiyun int dp_ctrl_on_link(struct dp_ctrl *dp_ctrl);
25*4882a593Smuzhiyun int dp_ctrl_on_stream(struct dp_ctrl *dp_ctrl);
26*4882a593Smuzhiyun int dp_ctrl_off(struct dp_ctrl *dp_ctrl);
27*4882a593Smuzhiyun void dp_ctrl_push_idle(struct dp_ctrl *dp_ctrl);
28*4882a593Smuzhiyun void dp_ctrl_isr(struct dp_ctrl *dp_ctrl);
29*4882a593Smuzhiyun void dp_ctrl_handle_sink_request(struct dp_ctrl *dp_ctrl);
30*4882a593Smuzhiyun struct dp_ctrl *dp_ctrl_get(struct device *dev, struct dp_link *link,
31*4882a593Smuzhiyun 			struct dp_panel *panel,	struct drm_dp_aux *aux,
32*4882a593Smuzhiyun 			struct dp_power *power, struct dp_catalog *catalog,
33*4882a593Smuzhiyun 			struct dp_parser *parser);
34*4882a593Smuzhiyun void dp_ctrl_put(struct dp_ctrl *dp_ctrl);
35*4882a593Smuzhiyun 
36*4882a593Smuzhiyun #endif /* _DP_CTRL_H_ */
37