xref: /linux/drivers/gpu/drm/sun4i/sun4i_crtc.h (revision 75bf465f0bc33e9b776a46d6a1b9b990f5fb7c37)
1*2874c5fdSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
29026e0d1SMaxime Ripard /*
39026e0d1SMaxime Ripard  * Copyright (C) 2015 Free Electrons
49026e0d1SMaxime Ripard  * Copyright (C) 2015 NextThing Co
59026e0d1SMaxime Ripard  *
69026e0d1SMaxime Ripard  * Maxime Ripard <maxime.ripard@free-electrons.com>
79026e0d1SMaxime Ripard  */
89026e0d1SMaxime Ripard 
99026e0d1SMaxime Ripard #ifndef _SUN4I_CRTC_H_
109026e0d1SMaxime Ripard #define _SUN4I_CRTC_H_
119026e0d1SMaxime Ripard 
129026e0d1SMaxime Ripard struct sun4i_crtc {
139026e0d1SMaxime Ripard 	struct drm_crtc			crtc;
149026e0d1SMaxime Ripard 	struct drm_pending_vblank_event	*event;
159026e0d1SMaxime Ripard 
1687969338SIcenowy Zheng 	struct sunxi_engine		*engine;
173c64fb37SChen-Yu Tsai 	struct sun4i_tcon		*tcon;
189026e0d1SMaxime Ripard };
199026e0d1SMaxime Ripard 
drm_crtc_to_sun4i_crtc(struct drm_crtc * crtc)209026e0d1SMaxime Ripard static inline struct sun4i_crtc *drm_crtc_to_sun4i_crtc(struct drm_crtc *crtc)
219026e0d1SMaxime Ripard {
229026e0d1SMaxime Ripard 	return container_of(crtc, struct sun4i_crtc, crtc);
239026e0d1SMaxime Ripard }
249026e0d1SMaxime Ripard 
2518c3b300SChen-Yu Tsai struct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm,
2687969338SIcenowy Zheng 				   struct sunxi_engine *engine,
2718c3b300SChen-Yu Tsai 				   struct sun4i_tcon *tcon);
289026e0d1SMaxime Ripard 
299026e0d1SMaxime Ripard #endif /* _SUN4I_CRTC_H_ */
30