mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
Revert "gpu: nvgpu: use nvmap exported APIs for dma_alloc|free_attrs on kstable"
This reverts commit 4bf47b32fc.
JIRA LS-458
Bug 200754700
Change-Id: Icd4ea0ea16e3c3aa5e6d6620dababe2366f410ec
Signed-off-by: Omprakash Shewale <oshewale@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2652862
This commit is contained in:
@@ -42,13 +42,6 @@ ifeq ($(CONFIG_TEGRA_GK20A_NVHOST_HOST1X),y)
|
||||
ccflags-y += -I$(srctree.host1x)/include
|
||||
endif
|
||||
|
||||
# When using the upstream nvmap driver, the Makefile must define the
|
||||
# srctree.nvmap path in order to find the necessary header files for
|
||||
# the upstream nvmap driver.
|
||||
ifeq ($(CONFIG_NVGPU_NVMAP_NEXT),y)
|
||||
ccflags-y += -I$(srctree.nvmap)/include
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_NVGPU_DEBUGGER),y)
|
||||
ccflags-y += -DCONFIG_NVGPU_DEBUGGER
|
||||
ccflags-y += -DCONFIG_NVGPU_ENGINE_RESET
|
||||
|
||||
@@ -94,10 +94,6 @@ CONFIG_TEGRA_GK20A_NVHOST := y
|
||||
CONFIG_TEGRA_GK20A_NVHOST_HOST1X := y
|
||||
endif
|
||||
|
||||
ifdef CONFIG_TEGRA_NVMAP_NEXT
|
||||
CONFIG_NVGPU_NVMAP_NEXT := y
|
||||
endif
|
||||
|
||||
# Enable support for GPUs on PCIe bus.
|
||||
ifeq ($(CONFIG_PCI),y)
|
||||
# Support for NVGPU DGPU
|
||||
@@ -223,9 +219,6 @@ endif
|
||||
ifeq ($(CONFIG_TEGRA_GK20A_NVHOST_HOST1X),y)
|
||||
ccflags-y += -DCONFIG_TEGRA_GK20A_NVHOST_HOST1X
|
||||
endif
|
||||
ifeq ($(CONFIG_NVGPU_NVMAP_NEXT),y)
|
||||
ccflags-y += -DCONFIG_NVGPU_NVMAP_NEXT
|
||||
endif
|
||||
ifeq ($(CONFIG_NVGPU_DGPU),y)
|
||||
ccflags-y += -DCONFIG_NVGPU_DGPU
|
||||
endif
|
||||
|
||||
@@ -28,10 +28,6 @@
|
||||
#include <linux/platform/tegra/common.h>
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NVGPU_NVMAP_NEXT)
|
||||
#include <linux/nvmap_exports.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NV_TEGRA_MC
|
||||
#include <linux/platform/tegra/mc.h>
|
||||
#endif /* CONFIG_NV_TEGRA_MC */
|
||||
@@ -113,15 +109,9 @@ struct gk20a_emc_params {
|
||||
static void gk20a_tegra_secure_page_destroy(struct gk20a *g,
|
||||
struct secure_page_buffer *secure_buffer)
|
||||
{
|
||||
#if defined(CONFIG_NVGPU_NVMAP_NEXT)
|
||||
nvmap_dma_free_attrs(&tegra_vpr_dev, secure_buffer->size,
|
||||
(void *)(uintptr_t)secure_buffer->phys,
|
||||
secure_buffer->phys, DMA_ATTR_NO_KERNEL_MAPPING);
|
||||
#else
|
||||
dma_free_attrs(&tegra_vpr_dev, secure_buffer->size,
|
||||
(void *)(uintptr_t)secure_buffer->phys,
|
||||
secure_buffer->phys, DMA_ATTR_NO_KERNEL_MAPPING);
|
||||
#endif
|
||||
|
||||
secure_buffer->destroy = NULL;
|
||||
}
|
||||
@@ -705,14 +695,8 @@ int gk20a_tegra_init_secure_alloc(struct gk20a_platform *platform)
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
|
||||
tegra_vpr_dev.coherent_dma_mask = DMA_BIT_MASK(32);
|
||||
#endif
|
||||
#if defined(CONFIG_NVGPU_NVMAP_NEXT)
|
||||
(void)nvmap_dma_alloc_attrs(&tegra_vpr_dev,
|
||||
platform->secure_buffer_size, &iova,
|
||||
GFP_KERNEL, DMA_ATTR_NO_KERNEL_MAPPING);
|
||||
#else
|
||||
(void)dma_alloc_attrs(&tegra_vpr_dev, platform->secure_buffer_size, &iova,
|
||||
GFP_KERNEL, DMA_ATTR_NO_KERNEL_MAPPING);
|
||||
#endif
|
||||
/* Some platforms disable VPR. In that case VPR allocations always
|
||||
* fail. Just disable VPR usage in nvgpu in that case. */
|
||||
if (dma_mapping_error(&tegra_vpr_dev, iova)) {
|
||||
|
||||
Reference in New Issue
Block a user