Commit Graph

3 Commits

Author SHA1 Message Date
Vedashree Vidwans
dd4f96e5c9 tegra: hwpm: fix kernel crash on TOT
Currently on TOT, stream buffer map functions results in kernel crash.
The kernel crash is an effect of incorrect conditions in the mapping
function. Fix the code logic to use correct kernel version conditions to
use appropriate DMA buffer structures.

Bug 3893741

Change-Id: I3888ec01fdb2025f6d9c3a22296ca9d1abbcadb0
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
(cherry picked from commit 5a3476cfb6574eb5ace29801a4f428ce9d694ce9)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2853211
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-08 03:16:11 -08:00
Vedashree Vidwans
f010cf5956 tegra: hwpm: update dma vmap for kernel > 5.10
Kernel version beyond 5.10 introduces dma_buf_map structure (called
iosys_map in later versions). Kernel virtual address corresponding to a
dma_buf is stored in the dma_buf_map structure.
- This patch updates memory management function to use correct mem bytes
buffer kernel virtual address stored in the corresponding dma_buf_map
structure.
- Use dma_buf_map structure pointer to unmap kernel virtual address.
- During release, poll mem bytes buffer with finite timeout value.
- Add description for use of dma_set_mask_and_coherent.

Bug 3893741

Change-Id: I42ace2fe70b36d7d5d1a4c5fee21786826f24a07
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
(cherry picked from commit ce852be6b39ef39affccdee41ad436fc70bf86b5)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2847007
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-08 03:15:58 -08:00
Vedashree Vidwans
7c1ae11f78 tegra: hwpm: move files to appropriate path
HWPM files are copied from the previous source in linux-nvidia repo
withgit history. Create folders and move files to obtain expected folder
structure.

Bug 3787076

Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
2022-10-05 16:05:20 -07:00