From 2aead38194fb6f3166a9ccb501467f7b0662f6c1 Mon Sep 17 00:00:00 2001 From: Tejal Kudav Date: Tue, 13 Mar 2018 15:55:31 +0530 Subject: gpu: nvlink: change default link speed to 20G Add support for 20G speed by updating initPLL command and update the default link speed set during nvlink init to 20G. Bug 200398181 Change-Id: I22cde32842d140b34481aaec2b1561ffbd44e2d8 Signed-off-by: Tejal Kudav Reviewed-on: https://git-master.nvidia.com/r/1678444 Reviewed-by: Thomas Fleury GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv100/nvlink_gv100.c | 8 +++++--- drivers/gpu/nvgpu/include/nvgpu/nvlink.h | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c index ba649382..d0dfebcf 100644 --- a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c +++ b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c @@ -690,9 +690,12 @@ static u32 gv100_nvlink_minion_init_uphy(struct gk20a *g, unsigned long mask, unsigned long link_enable; switch(g->nvlink.speed) { - case nvgpu_nvlink_speed_default: + case nvgpu_nvlink_speed_25G: init_pll_cmd = minion_nvlink_dl_cmd_command_initpll_0_v(); break; + case nvgpu_nvlink_speed_20G: + init_pll_cmd = minion_nvlink_dl_cmd_command_initpll_1_v(); + break; default: nvgpu_err(g, "Unsupported UPHY speed"); return -EINVAL; @@ -2644,8 +2647,7 @@ int gv100_nvlink_early_init(struct gk20a *g) goto nvlink_init_exit; } - /* For now set default speed */ - g->nvlink.speed = nvgpu_nvlink_speed_default; + g->nvlink.speed = nvgpu_nvlink_speed_20G; err = __gv100_nvlink_state_load_hal(g); if (err) { diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvlink.h b/drivers/gpu/nvgpu/include/nvgpu/nvlink.h index 18e0aab6..7b8be7d8 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvlink.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvlink.h @@ -128,7 +128,8 @@ struct nvgpu_nvlink_link { #define NVLINK_MAX_LINKS_SW 6 enum nvgpu_nvlink_speed { - nvgpu_nvlink_speed_default, + nvgpu_nvlink_speed_25G, + nvgpu_nvlink_speed_20G, nvgpu_nvlink_speed__last, }; -- cgit v1.2.2