• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_atomic_enable(struct drm_bridge *drm_bridge,
27 			     struct drm_bridge_state *old_bridge_state);
28 void dp_bridge_atomic_disable(struct drm_bridge *drm_bridge,
29 			      struct drm_bridge_state *old_bridge_state);
30 void dp_bridge_atomic_post_disable(struct drm_bridge *drm_bridge,
31 				   struct drm_bridge_state *old_bridge_state);
32 enum drm_mode_status dp_bridge_mode_valid(struct drm_bridge *bridge,
33 					  const struct drm_display_info *info,
34 					  const struct drm_display_mode *mode);
35 void dp_bridge_mode_set(struct drm_bridge *drm_bridge,
36 			const struct drm_display_mode *mode,
37 			const struct drm_display_mode *adjusted_mode);
38 void dp_bridge_hpd_enable(struct drm_bridge *bridge);
39 void dp_bridge_hpd_disable(struct drm_bridge *bridge);
40 void dp_bridge_hpd_notify(struct drm_bridge *bridge,
41 			  enum drm_connector_status status);
42 
43 #endif /* _DP_DRM_H_ */
44