]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: dc: don't pin buffers in propose
authorJon Mayo <jmayo@nvidia.com>
Wed, 19 Mar 2014 18:22:56 +0000 (11:22 -0700)
committerRiham Haidar <rhaidar@nvidia.com>
Thu, 27 Mar 2014 00:55:53 +0000 (17:55 -0700)
Don't pin buffers using TEGRA_DC_EXT_SET_PROPOSED_BW. The buffers don't
need to be accessed at all, they only need to be checked if they are
NULL or not. Setting a fake buffer for this call will now be valid, so
simply pass 1 or 0 for the buff_id to indicate which windows are enabled
or disabled.

Change-Id: I940c1ec4a708bfc38c7b5606782859017e51a0d2
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/383952
(cherry picked from commit a056f50049b89901bd3c0bb2335977002fc980eb)
Signed-off-by: Robert Shih <rshih@nvidia.com>
Reviewed-on: http://git-master/r/386570
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
drivers/video/tegra/dc/ext/dev.c

index 8e026b2e5a2de0a7d1dd9322f377d71c9e64f75b..803fe0f88f100d6f9bbbb38ee0f5dabfa7a48b7b 100644 (file)
@@ -1065,8 +1065,6 @@ static int tegra_dc_ext_negotiate_bw(struct tegra_dc_ext_user *user,
        int ret;
        struct tegra_dc_win *dc_wins[DC_N_WINDOWS];
        struct tegra_dc *dc = user->ext->dc;
-       struct tegra_dc_dmabuf *handle;
-       dma_addr_t phys_addr;
 
        /* If display has been disconnected return with error. */
        if (!dc->connected)
@@ -1075,16 +1073,7 @@ static int tegra_dc_ext_negotiate_bw(struct tegra_dc_ext_user *user,
        for (i = 0; i < win_num; i++) {
                int idx = wins[i].index;
 
-               ret = tegra_dc_ext_pin_window(user, wins[i].buff_id,
-                                             &handle, &phys_addr);
-               if (ret)
-                       return ret;
-
-               if (handle) {
-                       dma_buf_unmap_attachment(handle->attach,
-                               handle->sgt, DMA_TO_DEVICE);
-                       dma_buf_put(handle->buf);
-                       kfree(handle);
+               if (wins[i].buff_id > 0) {
                        tegra_dc_ext_set_windowattr_basic(&dc->tmp_wins[idx],
                                                          &wins[i]);
                }