blob: ba44c9b490eca3ae9b9497b901d62943edeb3169 [file] [log] [blame]
Inki Dae1c248b72011-10-04 19:19:01 +09001/* exynos_drm_crtc.c
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * Authors:
5 * Inki Dae <inki.dae@samsung.com>
6 * Joonyoung Shim <jy0922.shim@samsung.com>
7 * Seung-Woo Kim <sw0312.kim@samsung.com>
8 *
Inki Daed81aecb2012-12-18 02:30:17 +09009 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
Inki Dae1c248b72011-10-04 19:19:01 +090013 */
14
David Howells760285e2012-10-02 18:01:07 +010015#include <drm/drmP.h>
16#include <drm/drm_crtc_helper.h>
Inki Dae1c248b72011-10-04 19:19:01 +090017
Mark Browne30655d2013-08-13 00:46:40 +010018#include "exynos_drm_crtc.h"
Inki Dae1c248b72011-10-04 19:19:01 +090019#include "exynos_drm_drv.h"
Inki Dae1c248b72011-10-04 19:19:01 +090020#include "exynos_drm_encoder.h"
Joonyoung Shimb5d2eb32012-06-27 14:27:04 +090021#include "exynos_drm_plane.h"
Inki Dae1c248b72011-10-04 19:19:01 +090022
Inki Dae1c248b72011-10-04 19:19:01 +090023static void exynos_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
24{
Joonyoung Shimd2716c82011-11-04 17:04:45 +090025 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
Inki Dae1c248b72011-10-04 19:19:01 +090026
Joonyoung Shimd2716c82011-11-04 17:04:45 +090027 DRM_DEBUG_KMS("crtc[%d] mode[%d]\n", crtc->base.id, mode);
28
Inki Daeec05da92011-12-06 11:06:54 +090029 if (exynos_crtc->dpms == mode) {
30 DRM_DEBUG_KMS("desired dpms mode is same as previous one.\n");
31 return;
32 }
33
Inki Dae20cd2642013-05-21 16:55:58 +090034 if (mode > DRM_MODE_DPMS_ON) {
35 /* wait for the completion of page flip. */
YoungJun Choe35d7222014-07-17 18:01:17 +090036 if (!wait_event_timeout(exynos_crtc->pending_flip_queue,
Mandeep Singh Bainese7527472015-04-01 13:02:12 -030037 (exynos_crtc->event == NULL), HZ/20))
38 exynos_crtc->event = NULL;
Andrzej Hajdad6948b22014-10-10 14:31:55 +020039 drm_crtc_vblank_off(crtc);
Inki Dae20cd2642013-05-21 16:55:58 +090040 }
41
Gustavo Padovan93bca242015-01-18 18:16:23 +090042 if (exynos_crtc->ops->dpms)
43 exynos_crtc->ops->dpms(exynos_crtc, mode);
Sean Paul080be03d2014-02-19 21:02:55 +090044
Joonyoung Shimcf5188a2012-06-27 14:27:09 +090045 exynos_crtc->dpms = mode;
Andrzej Hajdad6948b22014-10-10 14:31:55 +020046
47 if (mode == DRM_MODE_DPMS_ON)
48 drm_crtc_vblank_on(crtc);
Inki Dae1c248b72011-10-04 19:19:01 +090049}
50
51static void exynos_drm_crtc_prepare(struct drm_crtc *crtc)
52{
Inki Dae1c248b72011-10-04 19:19:01 +090053 /* drm framework doesn't check NULL. */
54}
55
56static void exynos_drm_crtc_commit(struct drm_crtc *crtc)
57{
Joonyoung Shimd2716c82011-11-04 17:04:45 +090058 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
Gustavo Padovan9d5310c2014-11-13 22:17:46 -020059 struct exynos_drm_plane *exynos_plane = to_exynos_plane(crtc->primary);
Joonyoung Shimd2716c82011-11-04 17:04:45 +090060
Inki Dae50caf252012-08-20 21:29:25 +090061 exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_ON);
Sean Paul080be03d2014-02-19 21:02:55 +090062
Gustavo Padovan93bca242015-01-18 18:16:23 +090063 if (exynos_crtc->ops->win_commit)
64 exynos_crtc->ops->win_commit(exynos_crtc, exynos_plane->zpos);
Sean Paul080be03d2014-02-19 21:02:55 +090065
Gustavo Padovan93bca242015-01-18 18:16:23 +090066 if (exynos_crtc->ops->commit)
67 exynos_crtc->ops->commit(exynos_crtc);
Inki Dae1c248b72011-10-04 19:19:01 +090068}
69
70static bool
71exynos_drm_crtc_mode_fixup(struct drm_crtc *crtc,
Laurent Pincharte811f5a2012-07-17 17:56:50 +020072 const struct drm_display_mode *mode,
Inki Dae1c248b72011-10-04 19:19:01 +090073 struct drm_display_mode *adjusted_mode)
74{
Sean Paul4b405262014-01-30 16:19:19 -050075 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
Sean Paul4b405262014-01-30 16:19:19 -050076
Gustavo Padovan93bca242015-01-18 18:16:23 +090077 if (exynos_crtc->ops->mode_fixup)
78 return exynos_crtc->ops->mode_fixup(exynos_crtc, mode,
79 adjusted_mode);
Sean Paul4b405262014-01-30 16:19:19 -050080
Inki Dae1c248b72011-10-04 19:19:01 +090081 return true;
82}
83
84static int
85exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
86 struct drm_display_mode *adjusted_mode, int x, int y,
87 struct drm_framebuffer *old_fb)
88{
Andrzej Hajda72ed6cc2014-09-19 14:58:53 +020089 struct drm_framebuffer *fb = crtc->primary->fb;
Joonyoung Shim4070d212012-06-27 14:27:05 +090090 unsigned int crtc_w;
91 unsigned int crtc_h;
Gustavo Padovanadf56912014-11-27 14:56:09 -020092 int ret;
Joonyoung Shimaeb29222012-06-27 14:27:01 +090093
Inki Dae1de425b2012-03-16 18:47:04 +090094 /*
95 * copy the mode data adjusted by mode_fixup() into crtc->mode
96 * so that hardware can be seet to proper mode.
97 */
98 memcpy(&crtc->mode, adjusted_mode, sizeof(*adjusted_mode));
Inki Dae1c248b72011-10-04 19:19:01 +090099
Gustavo Padovanadf56912014-11-27 14:56:09 -0200100 ret = exynos_check_plane(crtc->primary, fb);
101 if (ret < 0)
102 return ret;
103
Andrzej Hajda72ed6cc2014-09-19 14:58:53 +0200104 crtc_w = fb->width - x;
105 crtc_h = fb->height - y;
Gustavo Padovanadf56912014-11-27 14:56:09 -0200106 exynos_plane_mode_set(crtc->primary, crtc, fb, 0, 0,
107 crtc_w, crtc_h, x, y, crtc_w, crtc_h);
108
109 return 0;
Inki Dae1c248b72011-10-04 19:19:01 +0900110}
111
Gustavo Padovanfd092d72014-11-13 22:30:00 -0200112static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
Inki Dae1c248b72011-10-04 19:19:01 +0900113 struct drm_framebuffer *old_fb)
114{
Joonyoung Shim4070d212012-06-27 14:27:05 +0900115 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
Andrzej Hajda72ed6cc2014-09-19 14:58:53 +0200116 struct drm_framebuffer *fb = crtc->primary->fb;
Joonyoung Shim4070d212012-06-27 14:27:05 +0900117 unsigned int crtc_w;
118 unsigned int crtc_h;
Gustavo Padovan43dbdad2015-06-01 12:04:41 -0300119 int ret;
Inki Dae1c248b72011-10-04 19:19:01 +0900120
Inki Dae32aeab12012-09-14 13:29:47 +0900121 /* when framebuffer changing is requested, crtc's dpms should be on */
122 if (exynos_crtc->dpms > DRM_MODE_DPMS_ON) {
123 DRM_ERROR("failed framebuffer changing request.\n");
124 return -EPERM;
125 }
126
Gustavo Padovan43dbdad2015-06-01 12:04:41 -0300127 ret = exynos_check_plane(crtc->primary, fb);
128 if (ret)
129 return ret;
130
Andrzej Hajda72ed6cc2014-09-19 14:58:53 +0200131 crtc_w = fb->width - x;
132 crtc_h = fb->height - y;
Gustavo Padovan43dbdad2015-06-01 12:04:41 -0300133 exynos_update_plane(crtc->primary, crtc, fb, 0, 0,
134 crtc_w, crtc_h, x << 16, y << 16,
135 crtc_w << 16, crtc_h << 16);
Joonyoung Shim4070d212012-06-27 14:27:05 +0900136
Gustavo Padovan43dbdad2015-06-01 12:04:41 -0300137 return 0;
Inki Dae1c248b72011-10-04 19:19:01 +0900138}
139
Joonyoung Shima365d9e2012-06-27 14:27:10 +0900140static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
141{
Sean Paula9c4cd22014-01-30 16:19:17 -0500142 struct drm_plane *plane;
143 int ret;
Joonyoung Shima365d9e2012-06-27 14:27:10 +0900144
Joonyoung Shima365d9e2012-06-27 14:27:10 +0900145 exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
Sean Paula9c4cd22014-01-30 16:19:17 -0500146
Matt Roper08863272014-04-01 15:22:31 -0700147 drm_for_each_legacy_plane(plane, &crtc->dev->mode_config.plane_list) {
Sean Paula9c4cd22014-01-30 16:19:17 -0500148 if (plane->crtc != crtc)
149 continue;
150
151 ret = plane->funcs->disable_plane(plane);
152 if (ret)
153 DRM_ERROR("Failed to disable plane %d\n", ret);
154 }
Joonyoung Shima365d9e2012-06-27 14:27:10 +0900155}
156
Inki Dae1c248b72011-10-04 19:19:01 +0900157static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
158 .dpms = exynos_drm_crtc_dpms,
159 .prepare = exynos_drm_crtc_prepare,
160 .commit = exynos_drm_crtc_commit,
161 .mode_fixup = exynos_drm_crtc_mode_fixup,
162 .mode_set = exynos_drm_crtc_mode_set,
163 .mode_set_base = exynos_drm_crtc_mode_set_base,
Joonyoung Shima365d9e2012-06-27 14:27:10 +0900164 .disable = exynos_drm_crtc_disable,
Inki Dae1c248b72011-10-04 19:19:01 +0900165};
166
167static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
Keith Packarded8d1972013-07-22 18:49:58 -0700168 struct drm_framebuffer *fb,
169 struct drm_pending_vblank_event *event,
170 uint32_t page_flip_flags)
Inki Dae1c248b72011-10-04 19:19:01 +0900171{
172 struct drm_device *dev = crtc->dev;
Inki Dae1c248b72011-10-04 19:19:01 +0900173 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
Gustavo Padovan8b9c4502014-11-25 16:18:34 -0200174 unsigned int crtc_w, crtc_h;
Mandeep Singh Bainese7527472015-04-01 13:02:12 -0300175 int ret;
Inki Dae1c248b72011-10-04 19:19:01 +0900176
Inki Daeef6223d2012-09-11 18:25:21 +0900177 /* when the page flip is requested, crtc's dpms should be on */
178 if (exynos_crtc->dpms > DRM_MODE_DPMS_ON) {
179 DRM_ERROR("failed page flip request.\n");
180 return -EINVAL;
181 }
182
Mandeep Singh Bainese7527472015-04-01 13:02:12 -0300183 if (!event)
184 return -EINVAL;
Inki Dae1c248b72011-10-04 19:19:01 +0900185
Mandeep Singh Bainese7527472015-04-01 13:02:12 -0300186 spin_lock_irq(&dev->event_lock);
187 if (exynos_crtc->event) {
188 ret = -EBUSY;
189 goto out;
Inki Dae1c248b72011-10-04 19:19:01 +0900190 }
Mandeep Singh Bainese7527472015-04-01 13:02:12 -0300191
Gustavo Padovan43dbdad2015-06-01 12:04:41 -0300192 ret = exynos_check_plane(crtc->primary, fb);
193 if (ret)
194 goto out;
195
Mandeep Singh Bainese7527472015-04-01 13:02:12 -0300196 ret = drm_vblank_get(dev, exynos_crtc->pipe);
197 if (ret) {
198 DRM_DEBUG("failed to acquire vblank counter\n");
199 goto out;
200 }
201
202 exynos_crtc->event = event;
203 spin_unlock_irq(&dev->event_lock);
204
205 /*
206 * the pipe from user always is 0 so we can set pipe number
207 * of current owner to event.
208 */
209 event->pipe = exynos_crtc->pipe;
210
211 crtc->primary->fb = fb;
212 crtc_w = fb->width - crtc->x;
213 crtc_h = fb->height - crtc->y;
Gustavo Padovan43dbdad2015-06-01 12:04:41 -0300214 exynos_update_plane(crtc->primary, crtc, fb, 0, 0,
215 crtc_w, crtc_h, crtc->x << 16, crtc->y << 16,
216 crtc_w << 16, crtc_h << 16);
Mandeep Singh Bainese7527472015-04-01 13:02:12 -0300217
218 return 0;
219
Inki Dae1c248b72011-10-04 19:19:01 +0900220out:
Mandeep Singh Bainese7527472015-04-01 13:02:12 -0300221 spin_unlock_irq(&dev->event_lock);
Inki Dae1c248b72011-10-04 19:19:01 +0900222 return ret;
223}
224
225static void exynos_drm_crtc_destroy(struct drm_crtc *crtc)
226{
227 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
228 struct exynos_drm_private *private = crtc->dev->dev_private;
229
Inki Dae1c248b72011-10-04 19:19:01 +0900230 private->crtc[exynos_crtc->pipe] = NULL;
231
232 drm_crtc_cleanup(crtc);
233 kfree(exynos_crtc);
234}
235
236static struct drm_crtc_funcs exynos_crtc_funcs = {
237 .set_config = drm_crtc_helper_set_config,
238 .page_flip = exynos_drm_crtc_page_flip,
239 .destroy = exynos_drm_crtc_destroy,
240};
241
Gustavo Padovan93bca242015-01-18 18:16:23 +0900242struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
Krzysztof Kozlowskif3aaf762015-05-07 09:04:45 +0900243 struct drm_plane *plane,
244 int pipe,
245 enum exynos_drm_output_type type,
246 const struct exynos_drm_crtc_ops *ops,
247 void *ctx)
Inki Dae1c248b72011-10-04 19:19:01 +0900248{
249 struct exynos_drm_crtc *exynos_crtc;
Gustavo Padovaneb88e422014-11-26 16:43:27 -0200250 struct exynos_drm_private *private = drm_dev->dev_private;
Inki Dae1c248b72011-10-04 19:19:01 +0900251 struct drm_crtc *crtc;
Andrzej Hajda72ed6cc2014-09-19 14:58:53 +0200252 int ret;
Inki Dae1c248b72011-10-04 19:19:01 +0900253
Inki Dae1c248b72011-10-04 19:19:01 +0900254 exynos_crtc = kzalloc(sizeof(*exynos_crtc), GFP_KERNEL);
Sachin Kamat38bb5252013-08-19 19:04:55 +0900255 if (!exynos_crtc)
Gustavo Padovan93bca242015-01-18 18:16:23 +0900256 return ERR_PTR(-ENOMEM);
Inki Dae1c248b72011-10-04 19:19:01 +0900257
Inki Dae20cd2642013-05-21 16:55:58 +0900258 init_waitqueue_head(&exynos_crtc->pending_flip_queue);
Sean Paul080be03d2014-02-19 21:02:55 +0900259
260 exynos_crtc->dpms = DRM_MODE_DPMS_OFF;
Gustavo Padovane09f2b02014-11-04 18:25:27 -0200261 exynos_crtc->pipe = pipe;
Gustavo Padovan5d1741a2014-11-05 19:51:35 -0200262 exynos_crtc->type = type;
Gustavo Padovan93bca242015-01-18 18:16:23 +0900263 exynos_crtc->ops = ops;
264 exynos_crtc->ctx = ctx;
Joonyoung Shimb5d2eb32012-06-27 14:27:04 +0900265
Gustavo Padovan357193c2014-11-03 18:20:29 -0200266 crtc = &exynos_crtc->base;
Inki Dae1c248b72011-10-04 19:19:01 +0900267
Gustavo Padovane09f2b02014-11-04 18:25:27 -0200268 private->crtc[pipe] = crtc;
Inki Dae1c248b72011-10-04 19:19:01 +0900269
Gustavo Padovaneb88e422014-11-26 16:43:27 -0200270 ret = drm_crtc_init_with_planes(drm_dev, crtc, plane, NULL,
Andrzej Hajda72ed6cc2014-09-19 14:58:53 +0200271 &exynos_crtc_funcs);
272 if (ret < 0)
273 goto err_crtc;
274
Inki Dae1c248b72011-10-04 19:19:01 +0900275 drm_crtc_helper_add(crtc, &exynos_crtc_helper_funcs);
276
Gustavo Padovan93bca242015-01-18 18:16:23 +0900277 return exynos_crtc;
Andrzej Hajda72ed6cc2014-09-19 14:58:53 +0200278
279err_crtc:
280 plane->funcs->destroy(plane);
Andrzej Hajda72ed6cc2014-09-19 14:58:53 +0200281 kfree(exynos_crtc);
Gustavo Padovan93bca242015-01-18 18:16:23 +0900282 return ERR_PTR(ret);
Inki Dae1c248b72011-10-04 19:19:01 +0900283}
284
Sean Paul080be03d2014-02-19 21:02:55 +0900285int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int pipe)
Inki Dae1c248b72011-10-04 19:19:01 +0900286{
287 struct exynos_drm_private *private = dev->dev_private;
Inki Daeec05da92011-12-06 11:06:54 +0900288 struct exynos_drm_crtc *exynos_crtc =
Sean Paul080be03d2014-02-19 21:02:55 +0900289 to_exynos_crtc(private->crtc[pipe]);
Inki Dae1c248b72011-10-04 19:19:01 +0900290
Inki Daeec05da92011-12-06 11:06:54 +0900291 if (exynos_crtc->dpms != DRM_MODE_DPMS_ON)
292 return -EPERM;
293
Gustavo Padovan93bca242015-01-18 18:16:23 +0900294 if (exynos_crtc->ops->enable_vblank)
295 exynos_crtc->ops->enable_vblank(exynos_crtc);
Inki Dae1c248b72011-10-04 19:19:01 +0900296
297 return 0;
298}
299
Sean Paul080be03d2014-02-19 21:02:55 +0900300void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int pipe)
Inki Dae1c248b72011-10-04 19:19:01 +0900301{
302 struct exynos_drm_private *private = dev->dev_private;
Inki Daeec05da92011-12-06 11:06:54 +0900303 struct exynos_drm_crtc *exynos_crtc =
Sean Paul080be03d2014-02-19 21:02:55 +0900304 to_exynos_crtc(private->crtc[pipe]);
Inki Dae1c248b72011-10-04 19:19:01 +0900305
Inki Daeec05da92011-12-06 11:06:54 +0900306 if (exynos_crtc->dpms != DRM_MODE_DPMS_ON)
307 return;
308
Gustavo Padovan93bca242015-01-18 18:16:23 +0900309 if (exynos_crtc->ops->disable_vblank)
310 exynos_crtc->ops->disable_vblank(exynos_crtc);
Inki Dae1c248b72011-10-04 19:19:01 +0900311}
Rahul Sharma663d8762013-01-03 05:44:04 -0500312
Sean Paul080be03d2014-02-19 21:02:55 +0900313void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int pipe)
Rahul Sharma663d8762013-01-03 05:44:04 -0500314{
315 struct exynos_drm_private *dev_priv = dev->dev_private;
Sean Paul080be03d2014-02-19 21:02:55 +0900316 struct drm_crtc *drm_crtc = dev_priv->crtc[pipe];
Inki Dae20cd2642013-05-21 16:55:58 +0900317 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(drm_crtc);
Rahul Sharma663d8762013-01-03 05:44:04 -0500318 unsigned long flags;
319
Rahul Sharma663d8762013-01-03 05:44:04 -0500320 spin_lock_irqsave(&dev->event_lock, flags);
Mandeep Singh Bainese7527472015-04-01 13:02:12 -0300321 if (exynos_crtc->event) {
Rahul Sharma663d8762013-01-03 05:44:04 -0500322
Mandeep Singh Bainese7527472015-04-01 13:02:12 -0300323 drm_send_vblank_event(dev, -1, exynos_crtc->event);
Sean Paul080be03d2014-02-19 21:02:55 +0900324 drm_vblank_put(dev, pipe);
Inki Dae20cd2642013-05-21 16:55:58 +0900325 wake_up(&exynos_crtc->pending_flip_queue);
Mandeep Singh Bainese7527472015-04-01 13:02:12 -0300326
Rahul Sharma663d8762013-01-03 05:44:04 -0500327 }
328
Mandeep Singh Bainese7527472015-04-01 13:02:12 -0300329 exynos_crtc->event = NULL;
Rahul Sharma663d8762013-01-03 05:44:04 -0500330 spin_unlock_irqrestore(&dev->event_lock, flags);
331}
Sean Paul080be03d2014-02-19 21:02:55 +0900332
Sean Paul080be03d2014-02-19 21:02:55 +0900333void exynos_drm_crtc_complete_scanout(struct drm_framebuffer *fb)
334{
Gustavo Padovan93bca242015-01-18 18:16:23 +0900335 struct exynos_drm_crtc *exynos_crtc;
Sean Paul080be03d2014-02-19 21:02:55 +0900336 struct drm_device *dev = fb->dev;
337 struct drm_crtc *crtc;
338
339 /*
340 * make sure that overlay data are updated to real hardware
341 * for all encoders.
342 */
343 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
Gustavo Padovan93bca242015-01-18 18:16:23 +0900344 exynos_crtc = to_exynos_crtc(crtc);
Sean Paul080be03d2014-02-19 21:02:55 +0900345
346 /*
347 * wait for vblank interrupt
348 * - this makes sure that overlay data are updated to
349 * real hardware.
350 */
Gustavo Padovan93bca242015-01-18 18:16:23 +0900351 if (exynos_crtc->ops->wait_for_vblank)
352 exynos_crtc->ops->wait_for_vblank(exynos_crtc);
Sean Paul080be03d2014-02-19 21:02:55 +0900353 }
354}
Inki Daef37cd5e2014-05-09 14:25:20 +0900355
356int exynos_drm_crtc_get_pipe_from_type(struct drm_device *drm_dev,
357 unsigned int out_type)
358{
359 struct drm_crtc *crtc;
360
361 list_for_each_entry(crtc, &drm_dev->mode_config.crtc_list, head) {
362 struct exynos_drm_crtc *exynos_crtc;
363
364 exynos_crtc = to_exynos_crtc(crtc);
Gustavo Padovan5d1741a2014-11-05 19:51:35 -0200365 if (exynos_crtc->type == out_type)
Gustavo Padovan8a326ed2014-11-04 18:44:47 -0200366 return exynos_crtc->pipe;
Inki Daef37cd5e2014-05-09 14:25:20 +0900367 }
368
369 return -EPERM;
370}
YoungJun Cho5595d4d2014-07-17 18:01:19 +0900371
372void exynos_drm_crtc_te_handler(struct drm_crtc *crtc)
373{
Gustavo Padovan93bca242015-01-18 18:16:23 +0900374 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
YoungJun Cho5595d4d2014-07-17 18:01:19 +0900375
Gustavo Padovan93bca242015-01-18 18:16:23 +0900376 if (exynos_crtc->ops->te_handler)
377 exynos_crtc->ops->te_handler(exynos_crtc);
YoungJun Cho5595d4d2014-07-17 18:01:19 +0900378}