summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/exynos/exynos_drm_crtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_crtc.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c101
1 files changed, 0 insertions, 101 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index e4f187d6285..1ea248c032b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -22,8 +22,6 @@
#include "exynos_drm_fb.h"
#include "exynos_drm_gem.h"
-#include <linux/dmabuf-sync.h>
-
#define to_exynos_crtc(x) container_of(x, struct exynos_drm_crtc,\
drm_crtc)
@@ -57,18 +55,6 @@ struct exynos_drm_crtc {
enum exynos_crtc_mode mode;
wait_queue_head_t pending_flip_queue;
atomic_t pending_flip;
- struct list_head sync_committed;
-};
-
-static void exynos_drm_dmabuf_sync_free(void *priv)
-{
- struct drm_pending_vblank_event *event = priv;
-
- event->event.reserved = 0;
-}
-
-static struct dmabuf_sync_priv_ops dmabuf_sync_ops = {
- .free = exynos_drm_dmabuf_sync_free,
};
static void exynos_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
@@ -139,7 +125,6 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
{
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
struct drm_plane *plane = exynos_crtc->plane;
- struct dmabuf_sync *sync;
unsigned int crtc_w;
unsigned int crtc_h;
int ret;
@@ -161,15 +146,6 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
plane->crtc = crtc;
plane->fb = crtc->fb;
- if (!dmabuf_sync_is_supported())
- return 0;
-
- sync = (struct dmabuf_sync *)exynos_drm_dmabuf_sync_work(crtc->fb);
- if (IS_ERR(sync)) {
- /* just ignore buffer synchronization this time. */
- return 0;
- }
-
return 0;
}
@@ -214,21 +190,12 @@ static void exynos_drm_crtc_load_lut(struct drm_crtc *crtc)
static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
struct drm_framebuffer *old_fb)
{
- struct dmabuf_sync *sync;
int ret;
ret = exynos_drm_crtc_mode_set_commit(crtc, x, y, old_fb);
if (ret < 0)
return ret;
- if (!dmabuf_sync_is_supported())
- return 0;
-
- sync = (struct dmabuf_sync *)exynos_drm_dmabuf_sync_work(crtc->fb);
- if (IS_ERR(sync))
- /* just ignore buffer synchronization this time. */
- return 0;
-
return 0;
}
@@ -277,11 +244,6 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
}
if (event) {
- struct exynos_drm_fb *exynos_fb;
- struct drm_gem_object *obj;
- struct dmabuf_sync *sync;
- unsigned int i;
-
mutex_lock(&dev->struct_mutex);
/*
@@ -297,45 +259,6 @@ static int exynos_drm_crtc_page_flip(struct drm_crtc *crtc,
return ret;
}
- if (!dmabuf_sync_is_supported())
- goto out_fence;
-
- sync = dmabuf_sync_init("DRM", &dmabuf_sync_ops, event);
- if (IS_ERR(sync)) {
- WARN_ON(1);
- goto out_fence;
- }
-
- exynos_fb = to_exynos_fb(fb);
-
- for (i = 0; i < exynos_fb->buf_cnt; i++) {
- if (!exynos_fb->exynos_gem_obj[i]) {
- WARN_ON(1);
- continue;
- }
-
- obj = &exynos_fb->exynos_gem_obj[i]->base;
- if (!obj->dma_buf)
- continue;
-
- ret = dmabuf_sync_get(sync,
- obj->dma_buf, (unsigned int)crtc,
- DMA_BUF_ACCESS_DMA_R);
- if (WARN_ON(ret < 0))
- continue;
- }
-
- ret = dmabuf_sync_wait_all(sync);
- if (ret < 0) {
- dmabuf_sync_put_all(sync);
- dmabuf_sync_fini(sync);
- goto out_fence;
- }
-
- event->event.reserved = (unsigned long)sync;
-
-out_fence:
-
spin_lock_irq(&dev->event_lock);
list_add_tail(&event->base.link,
&dev_priv->pageflip_event_list);
@@ -463,8 +386,6 @@ int exynos_drm_crtc_create(struct exynos_drm_manager *manager)
return -ENOMEM;
}
- INIT_LIST_HEAD(&exynos_crtc->sync_committed);
-
crtc = &exynos_crtc->drm_crtc;
private->crtc[manager->pipe] = crtc;
@@ -515,19 +436,6 @@ void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int pipe)
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(drm_crtc);
unsigned long flags;
- if (!list_empty(&exynos_crtc->sync_committed) &&
- dmabuf_sync_is_supported()) {
- struct dmabuf_sync *sync;
-
- sync = list_first_entry(&exynos_crtc->sync_committed,
- struct dmabuf_sync, list);
- if (!dmabuf_sync_signal_all(sync)) {
- list_del_init(&sync->list);
- dmabuf_sync_put_all(sync);
- dmabuf_sync_fini(sync);
- }
- }
-
spin_lock_irqsave(&dev->event_lock, flags);
list_for_each_entry_safe(e, t, &dev_priv->pageflip_event_list,
@@ -536,15 +444,6 @@ void exynos_drm_crtc_finish_pageflip(struct drm_device *dev, int pipe)
if (pipe != e->pipe)
continue;
- if (e->event.reserved && dmabuf_sync_is_supported()) {
- struct dmabuf_sync *sync;
-
- sync = (struct dmabuf_sync *)e->event.reserved;
- e->event.reserved = 0;
- list_add_tail(&sync->list,
- &exynos_crtc->sync_committed);
- }
-
list_del(&e->base.link);
drm_send_vblank_event(dev, -1, e);
drm_vblank_put(dev, pipe);