diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv100/nvlink_gv100.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv100/nvlink_gv100.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c index 7258b9e9..098aae0e 100644 --- a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c +++ b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c | |||
@@ -735,10 +735,10 @@ static u32 gv100_nvlink_minion_command_complete(struct gk20a *g, u32 link_id) | |||
735 | /* | 735 | /* |
736 | * Send Minion command (can be async) | 736 | * Send Minion command (can be async) |
737 | */ | 737 | */ |
738 | static u32 gv100_nvlink_minion_send_command(struct gk20a *g, | 738 | int gv100_nvlink_minion_send_command(struct gk20a *g, u32 link_id, |
739 | u32 link_id, u32 command, u32 scratch_0, bool sync) | 739 | u32 command, u32 scratch_0, bool sync) |
740 | { | 740 | { |
741 | u32 err = 0; | 741 | int err = 0; |
742 | 742 | ||
743 | /* Check last command succeded */ | 743 | /* Check last command succeded */ |
744 | err = gv100_nvlink_minion_command_complete(g, link_id); | 744 | err = gv100_nvlink_minion_command_complete(g, link_id); |
@@ -1579,6 +1579,15 @@ static int gv100_nvlink_enable_links_pre_top(struct gk20a *g, u32 links) | |||
1579 | IOCTRL_REG_WR32(g, ioctrl_debug_reset_r(), reg); | 1579 | IOCTRL_REG_WR32(g, ioctrl_debug_reset_r(), reg); |
1580 | nvgpu_udelay(delay); | 1580 | nvgpu_udelay(delay); |
1581 | 1581 | ||
1582 | /* Before doing any link initialization, run RXDET to check | ||
1583 | * if link is connected on other end. | ||
1584 | */ | ||
1585 | if (g->ops.nvlink.rxdet) { | ||
1586 | err = g->ops.nvlink.rxdet(g, link_id); | ||
1587 | if (err) | ||
1588 | return err; | ||
1589 | } | ||
1590 | |||
1582 | /* Enable Link DLPL for AN0 */ | 1591 | /* Enable Link DLPL for AN0 */ |
1583 | reg = DLPL_REG_RD32(g, link_id, nvl_link_config_r()); | 1592 | reg = DLPL_REG_RD32(g, link_id, nvl_link_config_r()); |
1584 | reg = set_field(reg, nvl_link_config_link_en_m(), | 1593 | reg = set_field(reg, nvl_link_config_link_en_m(), |