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 22*efc76170SStephen 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 2613ea4799SDmitry Baryshkov void dp_bridge_enable(struct drm_bridge *drm_bridge); 2713ea4799SDmitry Baryshkov void dp_bridge_disable(struct drm_bridge *drm_bridge); 2813ea4799SDmitry Baryshkov void dp_bridge_post_disable(struct drm_bridge *drm_bridge); 2913ea4799SDmitry Baryshkov enum drm_mode_status dp_bridge_mode_valid(struct drm_bridge *bridge, 3013ea4799SDmitry Baryshkov const struct drm_display_info *info, 3113ea4799SDmitry Baryshkov const struct drm_display_mode *mode); 3213ea4799SDmitry Baryshkov void dp_bridge_mode_set(struct drm_bridge *drm_bridge, 3313ea4799SDmitry Baryshkov const struct drm_display_mode *mode, 3413ea4799SDmitry Baryshkov const struct drm_display_mode *adjusted_mode); 35c943b494SChandan Uddaraju 36c943b494SChandan Uddaraju #endif /* _DP_DRM_H_ */ 37