mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: gv11b: get syncpt aperture only if host1x is present
nvgpu_get_nvhost_dev will not return error if host1x field within gv11b device tree is not present. It will just set has_syncpoints in gk20a struct to false. syncpt_unit_interface* should be called only if g->has_syncpoints is set to true. Change-Id: Id1eb94aba4cff1942ad519f528ebdb8291963971 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1615973 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
b92a6bdbf5
commit
1bf9b91c05
@@ -59,18 +59,24 @@ static int gv11b_tegra_probe(struct device *dev)
|
||||
return err;
|
||||
}
|
||||
|
||||
err = nvgpu_nvhost_syncpt_unit_interface_get_aperture(
|
||||
if (g->has_syncpoints) {
|
||||
err = nvgpu_nvhost_syncpt_unit_interface_get_aperture(
|
||||
g->nvhost_dev,
|
||||
&g->syncpt_unit_base,
|
||||
&g->syncpt_unit_size);
|
||||
if (err) {
|
||||
dev_err(dev, "Failed to get syncpt interface");
|
||||
return -ENOSYS;
|
||||
if (err) {
|
||||
dev_err(dev, "Failed to get syncpt interface");
|
||||
return -ENOSYS;
|
||||
}
|
||||
g->syncpt_size =
|
||||
nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(1);
|
||||
nvgpu_info(g, "syncpt_unit_base %llx "
|
||||
"syncpt_unit_size %zx size %x\n",
|
||||
g->syncpt_unit_base, g->syncpt_unit_size,
|
||||
g->syncpt_size);
|
||||
}
|
||||
g->syncpt_size = nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(1);
|
||||
gk20a_dbg_info("syncpt_unit_base %llx syncpt_unit_size %zx size %x\n",
|
||||
g->syncpt_unit_base, g->syncpt_unit_size,
|
||||
g->syncpt_size);
|
||||
#else
|
||||
g->has_syncpoints = false;
|
||||
#endif
|
||||
|
||||
platform->bypass_smmu = !device_is_iommuable(dev);
|
||||
|
||||
Reference in New Issue
Block a user