xref: /OK3568_Linux_fs/kernel/drivers/gpu/drm/sun4i/sun4i_crtc.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Copyright (C) 2015 Free Electrons
4*4882a593Smuzhiyun  * Copyright (C) 2015 NextThing Co
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * Maxime Ripard <maxime.ripard@free-electrons.com>
7*4882a593Smuzhiyun  */
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun #ifndef _SUN4I_CRTC_H_
10*4882a593Smuzhiyun #define _SUN4I_CRTC_H_
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun struct sun4i_crtc {
13*4882a593Smuzhiyun 	struct drm_crtc			crtc;
14*4882a593Smuzhiyun 	struct drm_pending_vblank_event	*event;
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun 	struct sunxi_engine		*engine;
17*4882a593Smuzhiyun 	struct sun4i_tcon		*tcon;
18*4882a593Smuzhiyun };
19*4882a593Smuzhiyun 
drm_crtc_to_sun4i_crtc(struct drm_crtc * crtc)20*4882a593Smuzhiyun static inline struct sun4i_crtc *drm_crtc_to_sun4i_crtc(struct drm_crtc *crtc)
21*4882a593Smuzhiyun {
22*4882a593Smuzhiyun 	return container_of(crtc, struct sun4i_crtc, crtc);
23*4882a593Smuzhiyun }
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun struct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm,
26*4882a593Smuzhiyun 				   struct sunxi_engine *engine,
27*4882a593Smuzhiyun 				   struct sun4i_tcon *tcon);
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun #endif /* _SUN4I_CRTC_H_ */
30