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>
* 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);