mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: return -ENOSYS if no host1x
The callers of nvgpu_get_nvhost_dev() expect that if all goes well, nvhost and syncpoint support exists. Thus if the device tree entry is not found, return -ENOSYS instead of 0. Bug 3394386 Change-Id: I4617aa2cfc240ade53294c26b3e8c2ce50b66913 Signed-off-by: Konsta Hölttä <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2608549 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
b8e24b749e
commit
a28612220a
@@ -54,7 +54,7 @@ int nvgpu_get_nvhost_dev(struct gk20a *g)
|
||||
nvgpu_warn(g, "host1x reference not found. assuming no syncpoints support");
|
||||
nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, false);
|
||||
}
|
||||
return 0;
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
g->nvhost = nvgpu_kzalloc(g, sizeof(struct nvgpu_nvhost_dev));
|
||||
|
||||
@@ -48,7 +48,7 @@ int nvgpu_get_nvhost_dev(struct gk20a *g)
|
||||
if (!np) {
|
||||
nvgpu_warn(g, "Failed to find host1x, syncpt support disabled");
|
||||
nvgpu_set_enabled(g, NVGPU_HAS_SYNCPOINTS, false);
|
||||
return 0;
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
host1x_pdev = of_find_device_by_node(np);
|
||||
|
||||
Reference in New Issue
Block a user