xref: /OK3568_Linux_fs/kernel/drivers/gpu/drm/exynos/exynos_drm_crtc.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /* exynos_drm_crtc.h
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
5*4882a593Smuzhiyun  * Authors:
6*4882a593Smuzhiyun  *	Inki Dae <inki.dae@samsung.com>
7*4882a593Smuzhiyun  *	Joonyoung Shim <jy0922.shim@samsung.com>
8*4882a593Smuzhiyun  *	Seung-Woo Kim <sw0312.kim@samsung.com>
9*4882a593Smuzhiyun  */
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun #ifndef _EXYNOS_DRM_CRTC_H_
12*4882a593Smuzhiyun #define _EXYNOS_DRM_CRTC_H_
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun 
15*4882a593Smuzhiyun #include "exynos_drm_drv.h"
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
18*4882a593Smuzhiyun 					struct drm_plane *plane,
19*4882a593Smuzhiyun 					enum exynos_drm_output_type out_type,
20*4882a593Smuzhiyun 					const struct exynos_drm_crtc_ops *ops,
21*4882a593Smuzhiyun 					void *context);
22*4882a593Smuzhiyun void exynos_drm_crtc_wait_pending_update(struct exynos_drm_crtc *exynos_crtc);
23*4882a593Smuzhiyun void exynos_drm_crtc_finish_update(struct exynos_drm_crtc *exynos_crtc,
24*4882a593Smuzhiyun 				   struct exynos_drm_plane *exynos_plane);
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun /* This function gets crtc device matched with out_type. */
27*4882a593Smuzhiyun struct exynos_drm_crtc *exynos_drm_crtc_get_by_type(struct drm_device *drm_dev,
28*4882a593Smuzhiyun 				       enum exynos_drm_output_type out_type);
29*4882a593Smuzhiyun 
30*4882a593Smuzhiyun int exynos_drm_set_possible_crtcs(struct drm_encoder *encoder,
31*4882a593Smuzhiyun 		enum exynos_drm_output_type out_type);
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun /*
34*4882a593Smuzhiyun  * This function calls the crtc device(manager)'s te_handler() callback
35*4882a593Smuzhiyun  * to trigger to transfer video image at the tearing effect synchronization
36*4882a593Smuzhiyun  * signal.
37*4882a593Smuzhiyun  */
38*4882a593Smuzhiyun void exynos_drm_crtc_te_handler(struct drm_crtc *crtc);
39*4882a593Smuzhiyun 
40*4882a593Smuzhiyun void exynos_crtc_handle_event(struct exynos_drm_crtc *exynos_crtc);
41*4882a593Smuzhiyun 
42*4882a593Smuzhiyun #endif
43