xref: /openbmc/linux/drivers/gpu/drm/sun4i/sun4i_crtc.h (revision 87969338)
19026e0d1SMaxime Ripard /*
29026e0d1SMaxime Ripard  * Copyright (C) 2015 Free Electrons
39026e0d1SMaxime Ripard  * Copyright (C) 2015 NextThing Co
49026e0d1SMaxime Ripard  *
59026e0d1SMaxime Ripard  * Maxime Ripard <maxime.ripard@free-electrons.com>
69026e0d1SMaxime Ripard  *
79026e0d1SMaxime Ripard  * This program is free software; you can redistribute it and/or
89026e0d1SMaxime Ripard  * modify it under the terms of the GNU General Public License as
99026e0d1SMaxime Ripard  * published by the Free Software Foundation; either version 2 of
109026e0d1SMaxime Ripard  * the License, or (at your option) any later version.
119026e0d1SMaxime Ripard  */
129026e0d1SMaxime Ripard 
139026e0d1SMaxime Ripard #ifndef _SUN4I_CRTC_H_
149026e0d1SMaxime Ripard #define _SUN4I_CRTC_H_
159026e0d1SMaxime Ripard 
169026e0d1SMaxime Ripard struct sun4i_crtc {
179026e0d1SMaxime Ripard 	struct drm_crtc			crtc;
189026e0d1SMaxime Ripard 	struct drm_pending_vblank_event	*event;
199026e0d1SMaxime Ripard 
2087969338SIcenowy Zheng 	struct sunxi_engine		*engine;
213c64fb37SChen-Yu Tsai 	struct sun4i_tcon		*tcon;
229026e0d1SMaxime Ripard };
239026e0d1SMaxime Ripard 
249026e0d1SMaxime Ripard static inline struct sun4i_crtc *drm_crtc_to_sun4i_crtc(struct drm_crtc *crtc)
259026e0d1SMaxime Ripard {
269026e0d1SMaxime Ripard 	return container_of(crtc, struct sun4i_crtc, crtc);
279026e0d1SMaxime Ripard }
289026e0d1SMaxime Ripard 
2918c3b300SChen-Yu Tsai struct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm,
3087969338SIcenowy Zheng 				   struct sunxi_engine *engine,
3118c3b300SChen-Yu Tsai 				   struct sun4i_tcon *tcon);
329026e0d1SMaxime Ripard 
339026e0d1SMaxime Ripard #endif /* _SUN4I_CRTC_H_ */
34