summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/pci.c
diff options
context:
space:
mode:
authorTimo Alho <talho@nvidia.com>2018-03-05 02:31:06 -0500
committerTimo Alho <talho@nvidia.com>2018-03-05 11:39:57 -0500
commit848af2ce6de6140323a6ffe3075bf8021e119434 (patch)
treec89f28ac819f637b554f191da2f6a0fd8d75253e /drivers/gpu/nvgpu/common/linux/pci.c
parent89fbf39a05483917c0a9f3453fd94c724bc37375 (diff)
Revert "Revert "Revert "gpu: nvgpu: Get coherency on gv100 + NVLINK working"""
This reverts commit 89fbf39a05483917c0a9f3453fd94c724bc37375. Bug 2075315 Change-Id: Id34a0376be5160b164931926ec600f77edf69667 Signed-off-by: Timo Alho <talho@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1668487 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/pci.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/pci.c17
1 files changed, 9 insertions, 8 deletions
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 @@
17#include <linux/pci.h> 17#include <linux/pci.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/pm_runtime.h> 19#include <linux/pm_runtime.h>
20#include <linux/of_platform.h>
21#include <linux/of_address.h>
22 20
23#include <nvgpu/nvgpu_common.h> 21#include <nvgpu/nvgpu_common.h>
24#include <nvgpu/kmem.h> 22#include <nvgpu/kmem.h>
25#include <nvgpu/enabled.h> 23#include <nvgpu/enabled.h>
26#include <nvgpu/nvlink.h> 24#include <nvgpu/nvlink.h>
25#include <linux/of_platform.h>
26#include <linux/of_address.h>
27 27
28#include "gk20a/gk20a.h" 28#include "gk20a/gk20a.h"
29#include "clk/clk.h" 29#include "clk/clk.h"
@@ -566,12 +566,6 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
566 platform->g = g; 566 platform->g = g;
567 l->dev = &pdev->dev; 567 l->dev = &pdev->dev;
568 568
569 np = nvgpu_get_node(g);
570 if (of_dma_is_coherent(np)) {
571 __nvgpu_set_enabled(g, NVGPU_USE_COHERENT_SYSMEM, true);
572 __nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true);
573 }
574
575 err = pci_enable_device(pdev); 569 err = pci_enable_device(pdev);
576 if (err) 570 if (err)
577 return err; 571 return err;
@@ -650,6 +644,13 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
650 644
651 g->mm.has_physical_mode = false; 645 g->mm.has_physical_mode = false;
652 646
647 np = nvgpu_get_node(g);
648
649 if (of_dma_is_coherent(np)) {
650 __nvgpu_set_enabled(g, NVGPU_DMA_COHERENT, true);
651 __nvgpu_set_enabled(g, NVGPU_SUPPORT_IO_COHERENCE, true);
652 }
653
653 return 0; 654 return 0;
654} 655}
655 656