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>
This commit is contained in:
Thomas Fleury
2018-02-20 20:39:22 -08:00
committed by mobile promotions
parent 15ec5722be
commit a5f3fe9506
7 changed files with 81 additions and 42 deletions

View File

@@ -20,6 +20,7 @@
#include <linux/of_platform.h>
#include <linux/of_address.h>
#include <nvgpu/nvhost.h>
#include <nvgpu/nvgpu_common.h>
#include <nvgpu/kmem.h>
#include <nvgpu/enabled.h>
@@ -316,6 +317,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
.vbios_min_version = 0x88000126,
.hardcode_sw_threshold = false,
.run_preos = true,
.has_syncpoints = true,
},
{ /* SKU250 */
/* ptimer src frequency in hz */
@@ -350,6 +352,7 @@ static struct gk20a_platform nvgpu_pci_device[] = {
.vbios_min_version = 0x1,
.hardcode_sw_threshold = false,
.run_preos = true,
.has_syncpoints = true,
},
{ /* SKU 0x1e3f */
/* ptimer src frequency in hz */
@@ -700,6 +703,17 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
nvgpu_err(g, "fatal error probing nvlink, bailing out");
goto err_free_irq;
}
/* Enable Semaphore SHIM on nvlink only for now. */
__nvgpu_set_enabled(g, NVGPU_SUPPORT_NVLINK, false);
g->has_syncpoints = false;
} else {
err = nvgpu_nvhost_syncpt_init(g);
if (err) {
if (err != -ENOSYS) {
nvgpu_err(g, "syncpt init failed");
goto err_free_irq;
}
}
}
g->mm.has_physical_mode = false;