xref: /linux/drivers/gpu/drm/sun4i/sun4i_crtc.h (revision 9026e0d122ac87d329b76a9b631622b03941af64)
1*9026e0d1SMaxime Ripard /*
2*9026e0d1SMaxime Ripard  * Copyright (C) 2015 Free Electrons
3*9026e0d1SMaxime Ripard  * Copyright (C) 2015 NextThing Co
4*9026e0d1SMaxime Ripard  *
5*9026e0d1SMaxime Ripard  * Maxime Ripard <maxime.ripard@free-electrons.com>
6*9026e0d1SMaxime Ripard  *
7*9026e0d1SMaxime Ripard  * This program is free software; you can redistribute it and/or
8*9026e0d1SMaxime Ripard  * modify it under the terms of the GNU General Public License as
9*9026e0d1SMaxime Ripard  * published by the Free Software Foundation; either version 2 of
10*9026e0d1SMaxime Ripard  * the License, or (at your option) any later version.
11*9026e0d1SMaxime Ripard  */
12*9026e0d1SMaxime Ripard 
13*9026e0d1SMaxime Ripard #ifndef _SUN4I_CRTC_H_
14*9026e0d1SMaxime Ripard #define _SUN4I_CRTC_H_
15*9026e0d1SMaxime Ripard 
16*9026e0d1SMaxime Ripard struct sun4i_crtc {
17*9026e0d1SMaxime Ripard 	struct drm_crtc			crtc;
18*9026e0d1SMaxime Ripard 	struct drm_pending_vblank_event	*event;
19*9026e0d1SMaxime Ripard 
20*9026e0d1SMaxime Ripard 	struct sun4i_drv		*drv;
21*9026e0d1SMaxime Ripard };
22*9026e0d1SMaxime Ripard 
23*9026e0d1SMaxime Ripard static inline struct sun4i_crtc *drm_crtc_to_sun4i_crtc(struct drm_crtc *crtc)
24*9026e0d1SMaxime Ripard {
25*9026e0d1SMaxime Ripard 	return container_of(crtc, struct sun4i_crtc, crtc);
26*9026e0d1SMaxime Ripard }
27*9026e0d1SMaxime Ripard 
28*9026e0d1SMaxime Ripard struct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm);
29*9026e0d1SMaxime Ripard 
30*9026e0d1SMaxime Ripard #endif /* _SUN4I_CRTC_H_ */
31