diff options
author | Thomas Fleury <tfleury@nvidia.com> | 2018-02-20 23:39:22 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-07 19:03:45 -0400 |
commit | a5f3fe9506dcf87910eba24c80a4b30c03dcced1 (patch) | |
tree | 322374f40e46286ac0b98abe6e3dbce293943943 /drivers/gpu/nvgpu/common/linux/pci.c | |
parent | 15ec5722be8f483f6d9c1cd0bfd61a7e2bcbfca2 (diff) |
gpu: nvgpu: gv100: enable syncpt shim for nvlink
Get host1x node reference from c1_rp device tree node, and
enable syncpoints shim in case of nvlink.
JIRA EVLR-2441
JIRA EVLR-2585
Change-Id: Idbf1edf656557f2ed2d3bd27393c2f4d5d1ad75a
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1663360
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.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c index bb44efbc..3c7de4ff 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
21 | #include <linux/of_address.h> | 21 | #include <linux/of_address.h> |
22 | 22 | ||
23 | #include <nvgpu/nvhost.h> | ||
23 | #include <nvgpu/nvgpu_common.h> | 24 | #include <nvgpu/nvgpu_common.h> |
24 | #include <nvgpu/kmem.h> | 25 | #include <nvgpu/kmem.h> |
25 | #include <nvgpu/enabled.h> | 26 | #include <nvgpu/enabled.h> |
@@ -316,6 +317,7 @@ static struct gk20a_platform nvgpu_pci_device[] = { | |||
316 | .vbios_min_version = 0x88000126, | 317 | .vbios_min_version = 0x88000126, |
317 | .hardcode_sw_threshold = false, | 318 | .hardcode_sw_threshold = false, |
318 | .run_preos = true, | 319 | .run_preos = true, |
320 | .has_syncpoints = true, | ||
319 | }, | 321 | }, |
320 | { /* SKU250 */ | 322 | { /* SKU250 */ |
321 | /* ptimer src frequency in hz */ | 323 | /* ptimer src frequency in hz */ |
@@ -350,6 +352,7 @@ static struct gk20a_platform nvgpu_pci_device[] = { | |||
350 | .vbios_min_version = 0x1, | 352 | .vbios_min_version = 0x1, |
351 | .hardcode_sw_threshold = false, | 353 | .hardcode_sw_threshold = false, |
352 | .run_preos = true, | 354 | .run_preos = true, |
355 | .has_syncpoints = true, | ||
353 | }, | 356 | }, |
354 | { /* SKU 0x1e3f */ | 357 | { /* SKU 0x1e3f */ |
355 | /* ptimer src frequency in hz */ | 358 | /* ptimer src frequency in hz */ |
@@ -700,6 +703,17 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, | |||
700 | nvgpu_err(g, "fatal error probing nvlink, bailing out"); | 703 | nvgpu_err(g, "fatal error probing nvlink, bailing out"); |
701 | goto err_free_irq; | 704 | goto err_free_irq; |
702 | } | 705 | } |
706 | /* Enable Semaphore SHIM on nvlink only for now. */ | ||
707 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_NVLINK, false); | ||
708 | g->has_syncpoints = false; | ||
709 | } else { | ||
710 | err = nvgpu_nvhost_syncpt_init(g); | ||
711 | if (err) { | ||
712 | if (err != -ENOSYS) { | ||
713 | nvgpu_err(g, "syncpt init failed"); | ||
714 | goto err_free_irq; | ||
715 | } | ||
716 | } | ||
703 | } | 717 | } |
704 | 718 | ||
705 | g->mm.has_physical_mode = false; | 719 | g->mm.has_physical_mode = false; |