18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (C) 2015 Free Electrons
48c2ecf20Sopenharmony_ci * Copyright (C) 2015 NextThing Co
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Maxime Ripard <maxime.ripard@free-electrons.com>
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef _SUN4I_CRTC_H_
108c2ecf20Sopenharmony_ci#define _SUN4I_CRTC_H_
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cistruct sun4i_crtc {
138c2ecf20Sopenharmony_ci	struct drm_crtc			crtc;
148c2ecf20Sopenharmony_ci	struct drm_pending_vblank_event	*event;
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci	struct sunxi_engine		*engine;
178c2ecf20Sopenharmony_ci	struct sun4i_tcon		*tcon;
188c2ecf20Sopenharmony_ci};
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_cistatic inline struct sun4i_crtc *drm_crtc_to_sun4i_crtc(struct drm_crtc *crtc)
218c2ecf20Sopenharmony_ci{
228c2ecf20Sopenharmony_ci	return container_of(crtc, struct sun4i_crtc, crtc);
238c2ecf20Sopenharmony_ci}
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_cistruct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm,
268c2ecf20Sopenharmony_ci				   struct sunxi_engine *engine,
278c2ecf20Sopenharmony_ci				   struct sun4i_tcon *tcon);
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci#endif /* _SUN4I_CRTC_H_ */
30