Files
linux-nvgpu/drivers/gpu/nvgpu/os/linux
Nicolin Chen ac3c3e2b69 gpu: nvgpu: Simplify nvgpu_dma_free_sys()
The original free routine has three options:
    if (NVGPU_DMA_NO_KERNEL_MAPPING)
        dma_free_attrs(d, mem->aligned_size, mem->priv.pages,
    else if (other flags)
        dma_free_attrs(d, mem->aligned_size, mem->cpu_va,
    else /* No flags */
        dma_free_coherent(d, mem->aligned_size, mem->cpu_va,

The last dma_free_coherent() can be unwrapped to dma_free_attrs
with its dma_attrs=0, while the former two are identical except
cpu_addr. So this patch merges these three into one single call
but differentiate the cpu_addr and dma_attrs parameters.

Note that the dma_free_attrs returns 0 when flags is not set.

Bug 200444660

Change-Id: I92ec0390138c79c5109973e476ea0ea719d4e2b9
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2029679
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-03-14 03:38:08 -07:00
..
2019-03-08 16:24:35 -08:00
2018-06-27 07:30:06 -07:00
2019-02-11 03:27:26 -08:00
2019-02-01 09:45:57 -08:00
2019-02-01 09:45:57 -08:00
2018-07-05 21:48:44 -07:00
2019-03-12 13:34:21 -07:00
2019-02-22 03:47:38 -08:00
2018-11-25 23:54:10 -08:00
2019-03-12 11:44:59 -07:00
2019-02-11 20:55:07 -08:00
2019-02-11 20:55:07 -08:00
2018-12-13 04:56:14 -08:00
2019-01-28 00:05:46 -08:00
2018-10-24 23:16:20 -07:00
2019-02-27 23:24:21 -08:00