mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
nvgpu does map attachment with DMA_BIDIRECTIONAL direction for buffers irrespective of the GPU mapping type. nvmap will allow map attachment with only DMA_TO_DEVICE direction for RO buffers for secure buffer access. nvgpu does RO GPU mapping if the buffer is RO for CPU or user requests to map as RO. In both cases the dma_buf map attachment should be done with DMA_TO_DEVICE direction as the intent for accessing the SGT is reading from GPU. Also, map the gpfifo buffer as read_only as it is intended to be read only. The userd buffer is accessed by the GPU through iova and is not GMMU mapped. Bug 200731819 Change-Id: Ifc60973f298f7cacab16c5dedecbb40c5f33ed1d Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2539312 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
19 KiB
19 KiB