|
35 | 35 | #include <drm/exynos_drm.h> |
36 | 36 |
|
37 | 37 | #include "exynos_drm_drv.h" |
| 38 | +#include "exynos_drm_crtc.h" |
38 | 39 | #include "exynos_drm_hdmi.h" |
39 | 40 | #include "exynos_drm_iommu.h" |
40 | 41 |
|
@@ -949,35 +950,6 @@ static struct exynos_mixer_ops mixer_ops = { |
949 | 950 | .win_disable = mixer_win_disable, |
950 | 951 | }; |
951 | 952 |
|
952 | | -/* for pageflip event */ |
953 | | -static void mixer_finish_pageflip(struct drm_device *drm_dev, int crtc) |
954 | | -{ |
955 | | - struct exynos_drm_private *dev_priv = drm_dev->dev_private; |
956 | | - struct drm_pending_vblank_event *e, *t; |
957 | | - struct timeval now; |
958 | | - unsigned long flags; |
959 | | - |
960 | | - spin_lock_irqsave(&drm_dev->event_lock, flags); |
961 | | - |
962 | | - list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list, |
963 | | - base.link) { |
964 | | - /* if event's pipe isn't same as crtc then ignore it. */ |
965 | | - if (crtc != e->pipe) |
966 | | - continue; |
967 | | - |
968 | | - do_gettimeofday(&now); |
969 | | - e->event.sequence = 0; |
970 | | - e->event.tv_sec = now.tv_sec; |
971 | | - e->event.tv_usec = now.tv_usec; |
972 | | - |
973 | | - list_move_tail(&e->base.link, &e->base.file_priv->event_list); |
974 | | - wake_up_interruptible(&e->base.file_priv->event_wait); |
975 | | - drm_vblank_put(drm_dev, crtc); |
976 | | - } |
977 | | - |
978 | | - spin_unlock_irqrestore(&drm_dev->event_lock, flags); |
979 | | -} |
980 | | - |
981 | 953 | static irqreturn_t mixer_irq_handler(int irq, void *arg) |
982 | 954 | { |
983 | 955 | struct exynos_drm_hdmi_context *drm_hdmi_ctx = arg; |
@@ -1006,7 +978,8 @@ static irqreturn_t mixer_irq_handler(int irq, void *arg) |
1006 | 978 | } |
1007 | 979 |
|
1008 | 980 | drm_handle_vblank(drm_hdmi_ctx->drm_dev, ctx->pipe); |
1009 | | - mixer_finish_pageflip(drm_hdmi_ctx->drm_dev, ctx->pipe); |
| 981 | + exynos_drm_crtc_finish_pageflip(drm_hdmi_ctx->drm_dev, |
| 982 | + ctx->pipe); |
1010 | 983 |
|
1011 | 984 | /* set wait vsync event to zero and wake up queue. */ |
1012 | 985 | if (atomic_read(&ctx->wait_vsync_event)) { |
|
0 commit comments