mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 02:01:36 +03:00
Drivers, such as the PVA and DLA driver, that call nvhost_syncpt_unit_interface_init() during probe are missing a call to clean-up the DMA mappings this function may create if the driver probe fails or if the driver is removed. The function nvhost_syncpt_unit_interface_init() may make a call to dma_map_sg_attrs() and we need to ensure that dma_unmap_sg_attrs() is called if the probe of the driver fails or if the driver is unloaded. Add a new function, nvhost_syncpt_unit_interface_deinit(), that calls dma_unmap_sg_attrs() if needed for drivers to call. Bug 3800349 Change-Id: I62a4e19cd42878dac54fa623509440596ffdf17f Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801280 (cherry picked from commit cee12fb989186611aa9deb5ada45831ab5f783aa) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801934 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>