1c943b494SChandan Uddaraju /* SPDX-License-Identifier: GPL-2.0-only */ 2c943b494SChandan Uddaraju /* 3c943b494SChandan Uddaraju * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. 4c943b494SChandan Uddaraju */ 5c943b494SChandan Uddaraju 6c943b494SChandan Uddaraju #ifndef _DP_DRM_H_ 7c943b494SChandan Uddaraju #define _DP_DRM_H_ 8c943b494SChandan Uddaraju 9c943b494SChandan Uddaraju #include <linux/types.h> 1013ea4799SDmitry Baryshkov #include <drm/drm_bridge.h> 11c943b494SChandan Uddaraju 12c943b494SChandan Uddaraju #include "msm_drv.h" 13c943b494SChandan Uddaraju #include "dp_display.h" 14c943b494SChandan Uddaraju 1513ea4799SDmitry Baryshkov struct msm_dp_bridge { 1613ea4799SDmitry Baryshkov struct drm_bridge bridge; 1713ea4799SDmitry Baryshkov struct msm_dp *dp_display; 1813ea4799SDmitry Baryshkov }; 1913ea4799SDmitry Baryshkov 2013ea4799SDmitry Baryshkov #define to_dp_bridge(x) container_of((x), struct msm_dp_bridge, bridge) 2113ea4799SDmitry Baryshkov 22efc76170SStephen Boyd struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct drm_encoder *encoder); 2313ea4799SDmitry Baryshkov struct drm_bridge *dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev, 2413ea4799SDmitry Baryshkov struct drm_encoder *encoder); 2513ea4799SDmitry Baryshkov 26*cdfd0e62SVinod Polimera void dp_bridge_atomic_enable(struct drm_bridge *drm_bridge, 27*cdfd0e62SVinod Polimera struct drm_bridge_state *old_bridge_state); 28*cdfd0e62SVinod Polimera void dp_bridge_atomic_disable(struct drm_bridge *drm_bridge, 29*cdfd0e62SVinod Polimera struct drm_bridge_state *old_bridge_state); 30*cdfd0e62SVinod Polimera void dp_bridge_atomic_post_disable(struct drm_bridge *drm_bridge, 31*cdfd0e62SVinod Polimera struct drm_bridge_state *old_bridge_state); 3213ea4799SDmitry Baryshkov enum drm_mode_status dp_bridge_mode_valid(struct drm_bridge *bridge, 3313ea4799SDmitry Baryshkov const struct drm_display_info *info, 3413ea4799SDmitry Baryshkov const struct drm_display_mode *mode); 3513ea4799SDmitry Baryshkov void dp_bridge_mode_set(struct drm_bridge *drm_bridge, 3613ea4799SDmitry Baryshkov const struct drm_display_mode *mode, 3713ea4799SDmitry Baryshkov const struct drm_display_mode *adjusted_mode); 38cd198cadSBjorn Andersson void dp_bridge_hpd_enable(struct drm_bridge *bridge); 39cd198cadSBjorn Andersson void dp_bridge_hpd_disable(struct drm_bridge *bridge); 40542b37efSBjorn Andersson void dp_bridge_hpd_notify(struct drm_bridge *bridge, 41542b37efSBjorn Andersson enum drm_connector_status status); 42c943b494SChandan Uddaraju 43c943b494SChandan Uddaraju #endif /* _DP_DRM_H_ */ 44