mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: nvlink: Add HAL to get link_mask
VBIOS link_disable_mask should be sufficient to find the connected links. As VBIOS is not updated with correct mask, we parse the DT node where we hardcode the link_id. DT method is not scalable as same DT node is used for different dGPUs connected over PCIE. Remove the DT parsing of link id and use HAL to get link_mask based on the GPU. JIRA NVLINK-162 Change-Id: Idb7b639962928ce48711a0d7fc277c4c324bee91 Signed-off-by: Tejal Kudav <tkudav@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1738967 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -28,7 +28,6 @@ int nvgpu_nvlink_read_dt_props(struct gk20a *g)
|
||||
u32 local_link_id;
|
||||
u32 remote_dev_id;
|
||||
u32 remote_link_id;
|
||||
u32 physical_link;
|
||||
bool is_master;
|
||||
|
||||
/* Parse DT */
|
||||
@@ -49,7 +48,6 @@ int nvgpu_nvlink_read_dt_props(struct gk20a *g)
|
||||
of_property_read_u32(np, "local_link_id", &local_link_id);
|
||||
of_property_read_u32(np, "remote_dev_id", &remote_dev_id);
|
||||
of_property_read_u32(np, "remote_link_id", &remote_link_id);
|
||||
of_property_read_u32(np, "physical_link", &physical_link);
|
||||
is_master = of_property_read_bool(np, "is_master");
|
||||
|
||||
/* Check that we are in dGPU mode */
|
||||
@@ -64,7 +62,6 @@ int nvgpu_nvlink_read_dt_props(struct gk20a *g)
|
||||
ndev->link.remote_dev_info.device_id = remote_dev_id;
|
||||
ndev->link.remote_dev_info.link_id = remote_link_id;
|
||||
|
||||
g->nvlink.connected_links = BIT(physical_link);
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
||||
Reference in New Issue
Block a user