mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
Revert "gpu: nvgpu: enable CONFIG_NVGPU_VPR for all kernels"
This reverts commit 6b72b2a4e7.
JIRA LS-458
Bug 200754700
Change-Id: I920431d82364f50c25c16fe6af6a084240f6a0ec
Signed-off-by: Omprakash Shewale <oshewale@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2652864
This commit is contained in:
@@ -127,7 +127,10 @@ ifeq ($(CONFIG_TEGRA_GR_VIRTUALIZATION),y)
|
||||
CONFIG_NVGPU_GR_VIRTUALIZATION := y
|
||||
endif
|
||||
|
||||
# Support for NVGPU VPR
|
||||
ifeq ($(CONFIG_TEGRA_VPR),y)
|
||||
CONFIG_NVGPU_VPR := y
|
||||
endif
|
||||
|
||||
# Support Tegra fuse
|
||||
ifeq ($(CONFIG_TEGRA_KFUSE),y)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -25,18 +25,6 @@
|
||||
|
||||
#include <nvgpu/types.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/version.h>
|
||||
|
||||
/*
|
||||
* VPR resize is enabled only on 4.9 kernel because kernel core mm changes to
|
||||
* support it are intrusive and they can't be upstreamed easily. Upstream
|
||||
* kernel will have support for static VPR. Note that static VPR is
|
||||
* supported on all kernels.
|
||||
*/
|
||||
#define NVGPU_VPR_RESIZE_SUPPORTED (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0))
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#ifdef CONFIG_NVGPU_VPR
|
||||
bool nvgpu_is_vpr_resize_enabled(void);
|
||||
#else
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* GK20A Graphics
|
||||
*
|
||||
* Copyright (c) 2011-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2011-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -26,10 +26,7 @@
|
||||
#include <linux/reset.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/notifier.h>
|
||||
|
||||
#include <nvgpu/vpr.h>
|
||||
|
||||
#if NVGPU_VPR_RESIZE_SUPPORTED
|
||||
#ifdef CONFIG_NVGPU_VPR
|
||||
#include <linux/platform/tegra/common.h>
|
||||
#endif
|
||||
#include <linux/pci.h>
|
||||
@@ -1007,7 +1004,7 @@ void gk20a_remove_support(struct gk20a *g)
|
||||
struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
|
||||
struct sim_nvgpu_linux *sim_linux;
|
||||
|
||||
#if NVGPU_VPR_RESIZE_SUPPORTED
|
||||
#ifdef CONFIG_NVGPU_VPR
|
||||
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_VPR)) {
|
||||
tegra_unregister_idle_unidle(gk20a_do_idle);
|
||||
}
|
||||
@@ -1082,7 +1079,7 @@ static int gk20a_init_support(struct platform_device *pdev)
|
||||
void __iomem *addr;
|
||||
int err = -ENOMEM;
|
||||
|
||||
#if NVGPU_VPR_RESIZE_SUPPORTED
|
||||
#ifdef CONFIG_NVGPU_VPR
|
||||
tegra_register_idle_unidle(gk20a_do_idle, gk20a_do_unidle, g);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* GK20A Tegra Platform Interface
|
||||
*
|
||||
* Copyright (c) 2014-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -21,12 +21,10 @@
|
||||
#include <uapi/linux/nvgpu.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/reset.h>
|
||||
#include <nvgpu/vpr.h>
|
||||
|
||||
#if defined(CONFIG_TEGRA_DVFS)
|
||||
#include <linux/tegra_soctherm.h>
|
||||
#endif
|
||||
#if defined(CONFIG_NVGPU_TEGRA_FUSE) || NVGPU_VPR_RESIZE_SUPPORTED
|
||||
#if defined(CONFIG_NVGPU_TEGRA_FUSE) || defined(CONFIG_NVGPU_VPR)
|
||||
#include <linux/platform/tegra/common.h>
|
||||
#endif
|
||||
|
||||
@@ -695,9 +693,7 @@ int gk20a_tegra_init_secure_alloc(struct gk20a_platform *platform)
|
||||
* On simulation platform, VPR is only supported with
|
||||
* vdk frontdoor boot and gpu frontdoor mode.
|
||||
*/
|
||||
#if NVGPU_VPR_RESIZE_SUPPORTED
|
||||
tegra_unregister_idle_unidle(gk20a_do_idle);
|
||||
#endif
|
||||
nvgpu_log_info(g,
|
||||
"VPR is not supported on simulation platform");
|
||||
return 0;
|
||||
@@ -720,9 +716,7 @@ int gk20a_tegra_init_secure_alloc(struct gk20a_platform *platform)
|
||||
/* 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)) {
|
||||
#if NVGPU_VPR_RESIZE_SUPPORTED
|
||||
tegra_unregister_idle_unidle(gk20a_do_idle);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -14,16 +14,9 @@
|
||||
#include <nvgpu/vpr.h>
|
||||
|
||||
#include <linux/init.h>
|
||||
|
||||
#if NVGPU_VPR_RESIZE_SUPPORTED
|
||||
#include <linux/platform/tegra/common.h>
|
||||
#endif
|
||||
|
||||
bool nvgpu_is_vpr_resize_enabled(void)
|
||||
{
|
||||
#if NVGPU_VPR_RESIZE_SUPPORTED
|
||||
return tegra_is_vpr_resize_enabled();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user