mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: add disable nvlink option in gk20a_platform
Add option to disable nvlink in struct gk20a_platform so that chips that do not support nvlink can work with pcie without compiling out nvlink code. Jira NVGPU-5870 Change-Id: Idc60418b5cf322ac81b241a4e59d25f5d8e6b9ca Signed-off-by: Shashank Singh <shashsingh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2332162 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
c99afa1766
commit
2fecf71e45
@@ -96,6 +96,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
|
|||||||
.can_elcg = false,
|
.can_elcg = false,
|
||||||
|
|
||||||
.disable_aspm = true,
|
.disable_aspm = true,
|
||||||
|
.disable_nvlink = false,
|
||||||
.pstate = true,
|
.pstate = true,
|
||||||
|
|
||||||
/* power management callbacks */
|
/* power management callbacks */
|
||||||
@@ -138,6 +139,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
|
|||||||
.can_elcg = false,
|
.can_elcg = false,
|
||||||
|
|
||||||
.disable_aspm = true,
|
.disable_aspm = true,
|
||||||
|
.disable_nvlink = false,
|
||||||
.pstate = true,
|
.pstate = true,
|
||||||
|
|
||||||
/* power management callbacks */
|
/* power management callbacks */
|
||||||
@@ -178,6 +180,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
|
|||||||
.can_elcg = false,
|
.can_elcg = false,
|
||||||
|
|
||||||
.disable_aspm = true,
|
.disable_aspm = true,
|
||||||
|
.disable_nvlink = false,
|
||||||
|
|
||||||
/* power management callbacks */
|
/* power management callbacks */
|
||||||
.is_railgated = nvgpu_pci_tegra_is_railgated,
|
.is_railgated = nvgpu_pci_tegra_is_railgated,
|
||||||
@@ -216,6 +219,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
|
|||||||
.can_elcg = false,
|
.can_elcg = false,
|
||||||
|
|
||||||
.disable_aspm = true,
|
.disable_aspm = true,
|
||||||
|
.disable_nvlink = true,
|
||||||
.pstate = false,
|
.pstate = false,
|
||||||
|
|
||||||
/* power management callbacks */
|
/* power management callbacks */
|
||||||
@@ -651,7 +655,12 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
|
|||||||
goto err_free_irq;
|
goto err_free_irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = nvgpu_nvlink_probe(g);
|
if (!platform->disable_nvlink) {
|
||||||
|
err = nvgpu_nvlink_probe(g);
|
||||||
|
} else {
|
||||||
|
err = -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ENODEV is a legal error which means there is no NVLINK
|
* ENODEV is a legal error which means there is no NVLINK
|
||||||
* any other error is fatal
|
* any other error is fatal
|
||||||
|
|||||||
@@ -151,6 +151,9 @@ struct gk20a_platform {
|
|||||||
/* Disable big page support */
|
/* Disable big page support */
|
||||||
bool disable_bigpage;
|
bool disable_bigpage;
|
||||||
|
|
||||||
|
/* Disable nvlink support */
|
||||||
|
bool disable_nvlink;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* gk20a_do_idle() API can take GPU either into rail gate or CAR reset
|
* gk20a_do_idle() API can take GPU either into rail gate or CAR reset
|
||||||
* This flag can be used to force CAR reset case instead of rail gate
|
* This flag can be used to force CAR reset case instead of rail gate
|
||||||
|
|||||||
Reference in New Issue
Block a user