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 bool yuv_supported); 24 int dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev, 25 struct drm_encoder *encoder); 26 27 void dp_bridge_atomic_enable(struct drm_bridge *drm_bridge, 28 struct drm_bridge_state *old_bridge_state); 29 void dp_bridge_atomic_disable(struct drm_bridge *drm_bridge, 30 struct drm_bridge_state *old_bridge_state); 31 void dp_bridge_atomic_post_disable(struct drm_bridge *drm_bridge, 32 struct drm_bridge_state *old_bridge_state); 33 enum drm_mode_status dp_bridge_mode_valid(struct drm_bridge *bridge, 34 const struct drm_display_info *info, 35 const struct drm_display_mode *mode); 36 void dp_bridge_mode_set(struct drm_bridge *drm_bridge, 37 const struct drm_display_mode *mode, 38 const struct drm_display_mode *adjusted_mode); 39 void dp_bridge_hpd_enable(struct drm_bridge *bridge); 40 void dp_bridge_hpd_disable(struct drm_bridge *bridge); 41 void dp_bridge_hpd_notify(struct drm_bridge *bridge, 42 enum drm_connector_status status); 43 44 #endif /* _DP_DRM_H_ */ 45