From f2f68430372d42be0b51b7475d8b8236894d96f5 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Thu, 22 Jun 2017 10:40:32 -0700 Subject: gpu: nvgpu: assume no syncpt support if no "nvidia,host1x" in dt It'll let gpu tests pass by using sem before enabling syncpt. Especially for vgpu, the plat data is shared across different GPUs, so we can use dt to override and disable syncpt. Jira VFND-3796 Change-Id: I2cc32a1ea1cc1097047427eb1e52ec50c3a0bf90 Signed-off-by: Richard Zhao Reviewed-on: http://git-master/r/1507494 Reviewed-by: Seshendra Gadagottu Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit Reviewed-by: svccoveritychecker Reviewed-by: Nirav Patel --- drivers/gpu/nvgpu/common/linux/nvhost.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/common') diff --git a/drivers/gpu/nvgpu/common/linux/nvhost.c b/drivers/gpu/nvgpu/common/linux/nvhost.c index 19e41e17..e190096e 100644 --- a/drivers/gpu/nvgpu/common/linux/nvhost.c +++ b/drivers/gpu/nvgpu/common/linux/nvhost.c @@ -42,8 +42,11 @@ int nvgpu_get_nvhost_dev(struct gk20a *g) } } else { - host1x_pdev = to_platform_device(g->dev->parent); - dev_warn(g->dev, "host1x reference not found. assuming host1x to be parent"); + if (g->has_syncpoints) { + dev_warn(g->dev, "host1x reference not found. assuming no syncpoints support\n"); + g->has_syncpoints = false; + } + return 0; } g->nvhost_dev = nvgpu_kzalloc(g, sizeof(struct nvgpu_nvhost_dev)); -- cgit v1.2.2