1*dbf21777SIcenowy Zheng /* SPDX-License-Identifier: GPL-2.0-only */ 2*dbf21777SIcenowy Zheng /* 3*dbf21777SIcenowy Zheng * Copyright (C) 2025 Icenowy Zheng <uwu@icenowy.me> 4*dbf21777SIcenowy Zheng */ 5*dbf21777SIcenowy Zheng 6*dbf21777SIcenowy Zheng #ifndef _VS_CRTC_H_ 7*dbf21777SIcenowy Zheng #define _VS_CRTC_H_ 8*dbf21777SIcenowy Zheng 9*dbf21777SIcenowy Zheng #include <drm/drm_crtc.h> 10*dbf21777SIcenowy Zheng #include <drm/drm_vblank.h> 11*dbf21777SIcenowy Zheng 12*dbf21777SIcenowy Zheng #define VSDC_DISP_TIMING_VALUE_MAX BIT_MASK(15) 13*dbf21777SIcenowy Zheng 14*dbf21777SIcenowy Zheng struct vs_dc; 15*dbf21777SIcenowy Zheng 16*dbf21777SIcenowy Zheng struct vs_crtc { 17*dbf21777SIcenowy Zheng struct drm_crtc base; 18*dbf21777SIcenowy Zheng 19*dbf21777SIcenowy Zheng struct vs_dc *dc; 20*dbf21777SIcenowy Zheng unsigned int id; 21*dbf21777SIcenowy Zheng }; 22*dbf21777SIcenowy Zheng 23*dbf21777SIcenowy Zheng static inline struct vs_crtc *drm_crtc_to_vs_crtc(struct drm_crtc *crtc) 24*dbf21777SIcenowy Zheng { 25*dbf21777SIcenowy Zheng return container_of(crtc, struct vs_crtc, base); 26*dbf21777SIcenowy Zheng } 27*dbf21777SIcenowy Zheng 28*dbf21777SIcenowy Zheng struct vs_crtc *vs_crtc_init(struct drm_device *drm_dev, struct vs_dc *dc, 29*dbf21777SIcenowy Zheng unsigned int output); 30*dbf21777SIcenowy Zheng 31*dbf21777SIcenowy Zheng #endif /* _VS_CRTC_H_ */ 32