diff options
author | Jon Mayo <jmayo@nvidia.com> | 2014-04-29 12:47:21 -0700 |
---|---|---|
committer | Winnie Hsu <whsu@nvidia.com> | 2014-07-18 14:59:32 -0700 |
commit | 27bc57665c97914b9cb769eb113d76e84b06e4b7 (patch) | |
tree | 186833b4f511d477b3e862aa20c4ab7234be23ef /drivers/video | |
parent | 4648074654d7530be3c5651c04b35759382dc1c1 (diff) |
video: tegra: dc: remove low latency cursor support
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>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/tegra/dc/ext/cursor.c | 122 | ||||
-rw-r--r-- | drivers/video/tegra/dc/ext/dev.c | 22 | ||||
-rw-r--r-- | drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h | 7 |
3 files changed, 2 insertions, 149 deletions
diff --git a/drivers/video/tegra/dc/ext/cursor.c b/drivers/video/tegra/dc/ext/cursor.c index 7df6d6d63a97..9a646d7f435c 100644 --- a/drivers/video/tegra/dc/ext/cursor.c +++ b/drivers/video/tegra/dc/ext/cursor.c @@ -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; -} - - diff --git a/drivers/video/tegra/dc/ext/dev.c b/drivers/video/tegra/dc/ext/dev.c index 788d6c33d2a2..0560a8b49297 100644 --- a/drivers/video/tegra/dc/ext/dev.c +++ b/drivers/video/tegra/dc/ext/dev.c @@ -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; diff --git a/drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h b/drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h index 62b3338dada0..cb34047768f3 100644 --- a/drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h +++ b/drivers/video/tegra/dc/ext/tegra_dc_ext_priv.h @@ -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 *, |