1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright (C) 2025 Icenowy Zheng <uwu@icenowy.me> 4 */ 5 6 #ifndef _VS_BRIDGE_H_ 7 #define _VS_BRIDGE_H_ 8 9 #include <linux/types.h> 10 11 #include <drm/drm_bridge.h> 12 #include <drm/drm_connector.h> 13 #include <drm/drm_encoder.h> 14 15 struct vs_crtc; 16 17 enum vs_bridge_output_interface { 18 VSDC_OUTPUT_INTERFACE_DPI = 0, 19 VSDC_OUTPUT_INTERFACE_DP = 1 20 }; 21 22 struct vs_bridge { 23 struct drm_bridge base; 24 struct drm_encoder *enc; 25 struct drm_connector *conn; 26 27 struct vs_crtc *crtc; 28 struct drm_bridge *next_bridge; 29 enum vs_bridge_output_interface intf; 30 }; 31 32 static inline struct vs_bridge *drm_bridge_to_vs_bridge(struct drm_bridge *bridge) 33 { 34 return container_of(bridge, struct vs_bridge, base); 35 } 36 37 struct vs_bridge *vs_bridge_init(struct drm_device *drm_dev, 38 struct vs_crtc *crtc); 39 #endif /* _VS_BRIDGE_H_ */ 40