diff options
author | Tejal Kudav <tkudav@nvidia.com> | 2018-06-04 03:45:28 -0400 |
---|---|---|
committer | Tejal Kudav <tkudav@nvidia.com> | 2018-06-14 09:44:07 -0400 |
commit | 118b7fb891e976d7f5e8845b08d90f33d7e3043e (patch) | |
tree | 4bbd0606f86186a4939f3aa643b389b6518f6624 /drivers/gpu/nvgpu/common/linux/nvlink.c | |
parent | a3356b8ad7ce625c02d7679aefe64185c84fe9a7 (diff) |
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>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/nvlink.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/nvlink.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/nvlink.c b/drivers/gpu/nvgpu/common/linux/nvlink.c index faa27239..c93514c0 100644 --- a/drivers/gpu/nvgpu/common/linux/nvlink.c +++ b/drivers/gpu/nvgpu/common/linux/nvlink.c | |||
@@ -28,7 +28,6 @@ int nvgpu_nvlink_read_dt_props(struct gk20a *g) | |||
28 | u32 local_link_id; | 28 | u32 local_link_id; |
29 | u32 remote_dev_id; | 29 | u32 remote_dev_id; |
30 | u32 remote_link_id; | 30 | u32 remote_link_id; |
31 | u32 physical_link; | ||
32 | bool is_master; | 31 | bool is_master; |
33 | 32 | ||
34 | /* Parse DT */ | 33 | /* Parse DT */ |
@@ -49,7 +48,6 @@ int nvgpu_nvlink_read_dt_props(struct gk20a *g) | |||
49 | of_property_read_u32(np, "local_link_id", &local_link_id); | 48 | of_property_read_u32(np, "local_link_id", &local_link_id); |
50 | of_property_read_u32(np, "remote_dev_id", &remote_dev_id); | 49 | of_property_read_u32(np, "remote_dev_id", &remote_dev_id); |
51 | of_property_read_u32(np, "remote_link_id", &remote_link_id); | 50 | of_property_read_u32(np, "remote_link_id", &remote_link_id); |
52 | of_property_read_u32(np, "physical_link", &physical_link); | ||
53 | is_master = of_property_read_bool(np, "is_master"); | 51 | is_master = of_property_read_bool(np, "is_master"); |
54 | 52 | ||
55 | /* Check that we are in dGPU mode */ | 53 | /* Check that we are in dGPU mode */ |
@@ -64,7 +62,6 @@ int nvgpu_nvlink_read_dt_props(struct gk20a *g) | |||
64 | ndev->link.remote_dev_info.device_id = remote_dev_id; | 62 | ndev->link.remote_dev_info.device_id = remote_dev_id; |
65 | ndev->link.remote_dev_info.link_id = remote_link_id; | 63 | ndev->link.remote_dev_info.link_id = remote_link_id; |
66 | 64 | ||
67 | g->nvlink.connected_links = BIT(physical_link); | ||
68 | return 0; | 65 | return 0; |
69 | 66 | ||
70 | fail: | 67 | fail: |