xref: /linux/drivers/gpu/drm/msm/dp/dp_drm.h (revision 4359a011e259a4608afc7fb3635370c9d4ba5943)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
4  */
5 
6 #ifndef _DP_DRM_H_
7 #define _DP_DRM_H_
8 
9 #include <linux/types.h>
10 #include <drm/drm_bridge.h>
11 
12 #include "msm_drv.h"
13 #include "dp_display.h"
14 
15 struct msm_dp_bridge {
16 	struct drm_bridge bridge;
17 	struct msm_dp *dp_display;
18 };
19 
20 #define to_dp_bridge(x)     container_of((x), struct msm_dp_bridge, bridge)
21 
22 struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct drm_encoder *encoder);
23 struct drm_bridge *dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev,
24 			struct drm_encoder *encoder);
25 
26 void dp_bridge_enable(struct drm_bridge *drm_bridge);
27 void dp_bridge_disable(struct drm_bridge *drm_bridge);
28 void dp_bridge_post_disable(struct drm_bridge *drm_bridge);
29 enum drm_mode_status dp_bridge_mode_valid(struct drm_bridge *bridge,
30 					  const struct drm_display_info *info,
31 					  const struct drm_display_mode *mode);
32 void dp_bridge_mode_set(struct drm_bridge *drm_bridge,
33 			const struct drm_display_mode *mode,
34 			const struct drm_display_mode *adjusted_mode);
35 
36 #endif /* _DP_DRM_H_ */
37