162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (C) 2015 Free Electrons
462306a36Sopenharmony_ci * Copyright (C) 2015 NextThing Co
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * Maxime Ripard <maxime.ripard@free-electrons.com>
762306a36Sopenharmony_ci */
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#ifndef _SUN4I_CRTC_H_
1062306a36Sopenharmony_ci#define _SUN4I_CRTC_H_
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_cistruct sun4i_crtc {
1362306a36Sopenharmony_ci	struct drm_crtc			crtc;
1462306a36Sopenharmony_ci	struct drm_pending_vblank_event	*event;
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci	struct sunxi_engine		*engine;
1762306a36Sopenharmony_ci	struct sun4i_tcon		*tcon;
1862306a36Sopenharmony_ci};
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_cistatic inline struct sun4i_crtc *drm_crtc_to_sun4i_crtc(struct drm_crtc *crtc)
2162306a36Sopenharmony_ci{
2262306a36Sopenharmony_ci	return container_of(crtc, struct sun4i_crtc, crtc);
2362306a36Sopenharmony_ci}
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_cistruct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm,
2662306a36Sopenharmony_ci				   struct sunxi_engine *engine,
2762306a36Sopenharmony_ci				   struct sun4i_tcon *tcon);
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci#endif /* _SUN4I_CRTC_H_ */
30