video: tegra: dc: remove low latency cursor support
Jon Mayo [Tue, 29 Apr 2014 19:47:21 +0000 (12:47 -0700)]
There is no difference in latency.

Bug 1333484

Change-Id: I8c1acb14d62df51cac535b2b78df0070744a5b66
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/436700
(cherry picked from commit 6eff7bd5a3a858e92c1088c102b21e86e12bf35b)
Reviewed-on: http://git-master/r/439915
Tested-by: Jong Kim <jongk@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

drivers/video/tegra/dc/ext/cursor.c
drivers/video/tegra/dc/ext/dev.c
drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h

index 7df6d6d..9a646d7 100644 (file)
@@ -211,125 +211,3 @@ unlock:
 
        return ret;
 }
-
-int tegra_dc_ext_set_cursor_image_low_latency(struct tegra_dc_ext_user *user,
-                       struct tegra_dc_ext_cursor_image *args)
-{
-       struct tegra_dc_ext *ext = user->ext;
-       struct tegra_dc *dc = ext->dc;
-       int ret;
-       int need_general_update = 0;
-
-       mutex_lock(&ext->cursor.lock);
-       if (ext->cursor.user != user) {
-               ret = -EACCES;
-               goto unlock;
-       }
-
-       if (!ext->enabled) {
-               ret = -ENXIO;
-               goto unlock;
-       }
-
-       mutex_lock(&dc->lock);
-
-       tegra_dc_get(dc);
-
-       need_general_update |= set_cursor_fg_bg(dc, args);
-
-       need_general_update |= set_cursor_blend(dc, !!args->mode);
-
-       if (need_general_update) {
-               tegra_dc_writel(dc, GENERAL_ACT_REQ << 8, DC_CMD_STATE_CONTROL);
-               tegra_dc_writel(dc, GENERAL_ACT_REQ, DC_CMD_STATE_CONTROL);
-       }
-
-       tegra_dc_put(dc);
-       mutex_unlock(&dc->lock);
-
-       mutex_unlock(&ext->cursor.lock);
-
-       return 0;
-
-unlock:
-       mutex_unlock(&ext->cursor.lock);
-
-       return ret;
-}
-
-int tegra_dc_ext_set_cursor_low_latency(struct tegra_dc_ext_user *user,
-                       struct tegra_dc_ext_cursor_image *args)
-{
-       struct tegra_dc_ext *ext = user->ext;
-       struct tegra_dc *dc = ext->dc;
-       u32 size;
-       int ret;
-       struct tegra_dc_dmabuf *handle, *old_handle;
-       dma_addr_t phys_addr;
-       bool enable = !!(args->vis & TEGRA_DC_EXT_CURSOR_FLAGS_VISIBLE);
-       int need_general_update = 0;
-
-       size = TEGRA_DC_EXT_CURSOR_IMAGE_FLAGS_SIZE(args->flags);
-
-       if (!check_cursor_size(dc, size))
-               return -EINVAL;
-
-       mutex_lock(&ext->cursor.lock);
-
-       if (ext->cursor.user != user) {
-               ret = -EACCES;
-               goto unlock;
-       }
-
-       if (!ext->enabled) {
-               ret = -ENXIO;
-               goto unlock;
-       }
-
-       old_handle = ext->cursor.cur_handle;
-
-       ret = tegra_dc_ext_pin_window(user, args->buff_id, &handle, &phys_addr);
-
-       if (ret)
-               goto unlock;
-
-       ext->cursor.cur_handle = handle;
-
-       mutex_lock(&dc->lock);
-
-       tegra_dc_get(dc);
-
-       need_general_update |= set_cursor_start_addr(dc, size, phys_addr);
-
-       need_general_update |= set_cursor_position(dc, args->x, args->y);
-
-       need_general_update |= set_cursor_activation_control(dc);
-
-       need_general_update |= set_cursor_enable(dc, enable);
-
-       if (need_general_update) {
-               tegra_dc_writel(dc, GENERAL_ACT_REQ << 8, DC_CMD_STATE_CONTROL);
-               tegra_dc_writel(dc, GENERAL_ACT_REQ, DC_CMD_STATE_CONTROL);
-       }
-
-       tegra_dc_put(dc);
-
-       mutex_unlock(&dc->lock);
-
-       mutex_unlock(&ext->cursor.lock);
-
-       if (old_handle) {
-               dma_buf_unmap_attachment(old_handle->attach,
-                       old_handle->sgt, DMA_TO_DEVICE);
-               dma_buf_detach(old_handle->buf, handle->attach);
-               dma_buf_put(old_handle->buf);
-               kfree(old_handle);
-       }
-       return 0;
-
-unlock:
-       mutex_unlock(&ext->cursor.lock);
-       return ret;
-}
-
-
index 788d6c3..0560a8b 100644 (file)
@@ -1391,6 +1391,7 @@ static long tegra_dc_ioctl(struct file *filp, unsigned int cmd,
                return tegra_dc_ext_get_cursor(user);
        case TEGRA_DC_EXT_PUT_CURSOR:
                return tegra_dc_ext_put_cursor(user);
+       case TEGRA_DC_EXT_SET_CURSOR_IMAGE_LOW_LATENCY:
        case TEGRA_DC_EXT_SET_CURSOR_IMAGE:
        {
                struct tegra_dc_ext_cursor_image args;
@@ -1400,6 +1401,7 @@ static long tegra_dc_ioctl(struct file *filp, unsigned int cmd,
 
                return tegra_dc_ext_set_cursor_image(user, &args);
        }
+       case TEGRA_DC_EXT_SET_CURSOR_LOW_LATENCY:
        case TEGRA_DC_EXT_SET_CURSOR:
        {
                struct tegra_dc_ext_cursor args;
@@ -1410,26 +1412,6 @@ static long tegra_dc_ioctl(struct file *filp, unsigned int cmd,
                return tegra_dc_ext_set_cursor(user, &args);
        }
 
-       case TEGRA_DC_EXT_SET_CURSOR_IMAGE_LOW_LATENCY:
-       {
-               struct tegra_dc_ext_cursor_image args;
-
-               if (copy_from_user(&args, user_arg, sizeof(args)))
-                       return -EFAULT;
-
-               return tegra_dc_ext_set_cursor_image_low_latency(user, &args);
-       }
-
-       case TEGRA_DC_EXT_SET_CURSOR_LOW_LATENCY:
-       {
-               struct tegra_dc_ext_cursor_image args;
-
-               if (copy_from_user(&args, user_arg, sizeof(args)))
-                       return -EFAULT;
-
-               return tegra_dc_ext_set_cursor_low_latency(user, &args);
-       }
-
        case TEGRA_DC_EXT_SET_CSC:
        {
                struct tegra_dc_ext_csc args;
index 62b3338..cb34047 100644 (file)
@@ -143,13 +143,6 @@ extern int tegra_dc_ext_set_cursor(struct tegra_dc_ext_user *user,
 extern int tegra_dc_ext_cursor_clip(struct tegra_dc_ext_user *user,
                                        int *args);
 
-extern int tegra_dc_ext_set_cursor_image_low_latency(
-               struct tegra_dc_ext_user *user,
-               struct tegra_dc_ext_cursor_image *);
-
-extern int tegra_dc_ext_set_cursor_low_latency(struct tegra_dc_ext_user *user,
-                                       struct tegra_dc_ext_cursor_image *);
-
 extern int tegra_dc_ext_control_init(void);
 
 extern int tegra_dc_ext_queue_hotplug(struct tegra_dc_ext_control *,