summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/pci.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2018-03-01 23:47:25 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-03-03 01:10:14 -0500
commit89fbf39a05483917c0a9f3453fd94c724bc37375 (patch)
tree55fdd147c0a7eb80b8fc50ecd9f4b0c80f1322f1 /drivers/gpu/nvgpu/common/linux/pci.c
parentef116a6e632522def7493921666c3241318ce100 (diff)
Revert "Revert "gpu: nvgpu: Get coherency on gv100 + NVLINK working""
This reverts commit 5a35a95654d561fce09a3b9abf6b82bb7a29d74b. JIRA EVLR-2333 Change-Id: I923c32496c343d39d34f6d406c38a9f6ce7dc6e0 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1667167 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@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, 8 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c
index 6ebe8dda..973da9ca 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>
20 22
21#include <nvgpu/nvgpu_common.h> 23#include <nvgpu/nvgpu_common.h>
22#include <nvgpu/kmem.h> 24#include <nvgpu/kmem.h>
23#include <nvgpu/enabled.h> 25#include <nvgpu/enabled.h>
24#include <nvgpu/nvlink.h> 26#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,6 +566,12 @@ 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
569 err = pci_enable_device(pdev); 575 err = pci_enable_device(pdev);
570 if (err) 576 if (err)
571 return err; 577 return err;
@@ -644,13 +650,6 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
644 650
645 g->mm.has_physical_mode = false; 651 g->mm.has_physical_mode = false;
646 652
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
654 return 0; 653 return 0;
655} 654}
656 655