]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: deinit cdma at channel_unmap()
authorDeepak Nibade <dnibade@nvidia.com>
Tue, 6 May 2014 09:08:46 +0000 (14:38 +0530)
committerMandar Padmawar <mpadmawar@nvidia.com>
Mon, 19 May 2014 14:46:31 +0000 (07:46 -0700)
during channel_unmap() when channel refcount is zero,
stop the cdma and call its deinit() to free the memory
resource allocated at pushbuffer_init()

Bug 1504624

Change-Id: I851e3eb1c9041a812bf298740a7798be15c872f6
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/405735
(cherry picked from commit fc1cd0354f49451829368015792885c1975670f5)
Reviewed-on: http://git-master/r/410688
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
drivers/video/tegra/host/nvhost_channel.c

index 33e93520301762907dcb10ee7bbfcfba443f1a2c..bf666bfabe762c5fe943fe82a0b6a05bf99296c5 100644 (file)
@@ -171,6 +171,9 @@ int nvhost_channel_unmap(struct nvhost_channel *ch)
         * nvhost_module_enable_poweroff
         */
        if (!pdata->num_mapped_chs) {
+               channel_cdma_op().stop(&ch->cdma);
+               nvhost_cdma_deinit(&ch->cdma);
+
                if (pdata->keepalive)
                        nvhost_module_enable_poweroff(pdata->pdev);