forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/gpu/drm/exynos/exynos_drm_crtc.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* exynos_drm_crtc.c
23 *
34 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
....@@ -5,18 +6,13 @@
56 * Inki Dae <inki.dae@samsung.com>
67 * Joonyoung Shim <jy0922.shim@samsung.com>
78 * Seung-Woo Kim <sw0312.kim@samsung.com>
8
- *
9
- * 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.
139 */
1410
15
-#include <drm/drmP.h>
16
-#include <drm/drm_crtc_helper.h>
1711 #include <drm/drm_atomic.h>
1812 #include <drm/drm_atomic_helper.h>
1913 #include <drm/drm_encoder.h>
14
+#include <drm/drm_probe_helper.h>
15
+#include <drm/drm_vblank.h>
2016
2117 #include "exynos_drm_crtc.h"
2218 #include "exynos_drm_drv.h"
....@@ -27,8 +23,8 @@
2723 {
2824 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
2925
30
- if (exynos_crtc->ops->enable)
31
- exynos_crtc->ops->enable(exynos_crtc);
26
+ if (exynos_crtc->ops->atomic_enable)
27
+ exynos_crtc->ops->atomic_enable(exynos_crtc);
3228
3329 drm_crtc_vblank_on(crtc);
3430 }
....@@ -40,16 +36,15 @@
4036
4137 drm_crtc_vblank_off(crtc);
4238
43
- if (exynos_crtc->ops->disable)
44
- exynos_crtc->ops->disable(exynos_crtc);
39
+ if (exynos_crtc->ops->atomic_disable)
40
+ exynos_crtc->ops->atomic_disable(exynos_crtc);
4541
42
+ spin_lock_irq(&crtc->dev->event_lock);
4643 if (crtc->state->event && !crtc->state->active) {
47
- spin_lock_irq(&crtc->dev->event_lock);
4844 drm_crtc_send_vblank_event(crtc, crtc->state->event);
49
- spin_unlock_irq(&crtc->dev->event_lock);
50
-
5145 crtc->state->event = NULL;
5246 }
47
+ spin_unlock_irq(&crtc->dev->event_lock);
5348 }
5449
5550 static int exynos_crtc_atomic_check(struct drm_crtc *crtc,