From 5a35a95654d561fce09a3b9abf6b82bb7a29d74b Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 28 Feb 2018 09:19:19 -0800 Subject: Revert "gpu: nvgpu: Get coherency on gv100 + NVLINK working" Also revert other changes related to IO coherence. This may be the culprit in a recent dev-kernel lockdown. Bug 2070609 Change-Id: Ida178aef161fadbc6db9512521ea51c702c1564b Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1665914 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Srikar Srimath Tirumala --- drivers/gpu/nvgpu/common/linux/pci.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/pci.c') diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c index 973da9ca..6ebe8dda 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c @@ -17,13 +17,13 @@ #include #include #include -#include -#include #include #include #include #include +#include +#include #include "gk20a/gk20a.h" #include "clk/clk.h" @@ -566,12 +566,6 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, platform->g = g; l->dev = &pdev->dev; - np = nvgpu_get_node(g); - if (of_dma_is_coherent(np)) { - __nvgpu_set_enabled(g, NVGPU_USE_COHERENT_SYSMEM, true); - __nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true); - } - err = pci_enable_device(pdev); if (err) return err; @@ -650,6 +644,13 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, g->mm.has_physical_mode = false; + np = nvgpu_get_node(g); + + if (of_dma_is_coherent(np)) { + __nvgpu_set_enabled(g, NVGPU_DMA_COHERENT, true); + __nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true); + } + return 0; } -- cgit v1.2.2