From fbdcc8a2d4c2b7f145b034ee7bde7105e66e0a4e Mon Sep 17 00:00:00 2001 From: David Nieto Date: Thu, 7 Dec 2017 16:48:09 -0800 Subject: gpu: nvgpu: Initial Nvlink driver skeleton Adds the skeleton and integration of the GV100 endpoint driver to NVGPU (1) Adds a OS abstraction layer for the internal nvlink structure. (2) Adds linux specific integration with Nvlink core driver. (3) Adds function pointers for nvlink api, initialization and isr process. (4) Adds initial support for minion. (5) Adds new GPU enable properties to handle NVLINK presence (6) Adds new GPU enable properties for SG_PHY bypass (required for NVLINK over PCI) (7) Adds parsing of nvlink vbios structures. (8) Adds logging defines for NVGPU JIRA: EVLR-2328 Change-Id: I0720a165a15c7187892c8c1a0662ec598354ac06 Signed-off-by: David Nieto Reviewed-on: https://git-master.nvidia.com/r/1644708 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/pci.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (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 9c18fbc9..905a3d39 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -629,6 +630,18 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, return err; } + err = nvgpu_nvlink_probe(g); + /* + * ENODEV is a legal error which means there is no NVLINK + * any other error is fatal + */ + if (err) { + if (err != -ENODEV) { + nvgpu_err(g, "fatal error probing nvlink, bailing out"); + return err; + } + } + g->mm.has_physical_mode = false; np = nvgpu_get_node(g); -- cgit v1.2.2