summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv100/hal_gv100.c
diff options
context:
space:
mode:
authorThomas Fleury <tfleury@nvidia.com>2018-01-23 17:20:43 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-02-26 00:48:24 -0500
commit0601fd25a5e01d0da638efef13c58b64f198bafb (patch)
treedbe843912a525497103bbe9beefc6e78ff67c8c9 /drivers/gpu/nvgpu/gv100/hal_gv100.c
parent223ea4d8a179835dd5899bbc12fe78b4998b0bd7 (diff)
gpu: nvgpu: gv100: nvlink endpoint driver
The following changes implements the initial (as per bringup) nvlink driver. (1) SW initialization of nvlink core driver structures (2) Nvlink interrupt handling (3) Device initialization (IOCTRL, pll and clocks, device level intr) (4) Falcon support for minion (5) Minion load and bootstrapping (6) Link initialization and DL PROD settings (7) Device Interface init (and switching HSHUB to nvlink) (8) HS set/get mode for both link and sublink (9) Topology discovery and VBIOS settings. (10) Ensures we get physical contiguous memory when Nvlink is enabled This driver includes a hack for the current single dev/single link limitation. JIRA: EVLR-2331 JIRA: EVLR-2330 JIRA: EVLR-2329 JIRA: EVLR-2328 Change-Id: Idca9a819179376cc655784482b24b575a52fa9e5 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1656790 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv100/hal_gv100.c')
-rw-r--r--drivers/gpu/nvgpu/gv100/hal_gv100.c49
1 files changed, 36 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c
index 6f4ab875..53d61bfb 100644
--- a/drivers/gpu/nvgpu/gv100/hal_gv100.c
+++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c
@@ -51,20 +51,19 @@
51#include "gm20b/pmu_gm20b.h" 51#include "gm20b/pmu_gm20b.h"
52#include "gm20b/acr_gm20b.h" 52#include "gm20b/acr_gm20b.h"
53 53
54#include "gp10b/fb_gp10b.h"
55#include "gp10b/gr_gp10b.h"
56
57#include "gp106/clk_gp106.h" 54#include "gp106/clk_gp106.h"
58#include "gp106/clk_arb_gp106.h" 55#include "gp106/clk_arb_gp106.h"
59#include "gp106/pmu_gp106.h" 56#include "gp106/pmu_gp106.h"
60#include "gp106/acr_gp106.h" 57#include "gp106/acr_gp106.h"
61#include "gp106/sec2_gp106.h" 58#include "gp106/sec2_gp106.h"
62#include "gp106/bios_gp106.h" 59#include "gp106/bios_gp106.h"
63#include "gv100/bios_gv100.h"
64#include "gp106/therm_gp106.h" 60#include "gp106/therm_gp106.h"
65#include "gp106/xve_gp106.h" 61#include "gp106/xve_gp106.h"
66#include "gp106/clk_gp106.h" 62#include "gp106/clk_gp106.h"
67#include "gp106/flcn_gp106.h" 63#include "gp106/flcn_gp106.h"
64
65#include "gp10b/fb_gp10b.h"
66#include "gp10b/gr_gp10b.h"
68#include "gp10b/ltc_gp10b.h" 67#include "gp10b/ltc_gp10b.h"
69#include "gp10b/therm_gp10b.h" 68#include "gp10b/therm_gp10b.h"
70#include "gp10b/mc_gp10b.h" 69#include "gp10b/mc_gp10b.h"
@@ -78,32 +77,33 @@
78#include "gv11b/css_gr_gv11b.h" 77#include "gv11b/css_gr_gv11b.h"
79#include "gv11b/dbg_gpu_gv11b.h" 78#include "gv11b/dbg_gpu_gv11b.h"
80#include "gv11b/hal_gv11b.h" 79#include "gv11b/hal_gv11b.h"
81#include "gv100/gr_gv100.h"
82#include "gv11b/gr_gv11b.h" 80#include "gv11b/gr_gv11b.h"
83#include "gv11b/mc_gv11b.h" 81#include "gv11b/mc_gv11b.h"
84#include "gv11b/ltc_gv11b.h" 82#include "gv11b/ltc_gv11b.h"
85#include "gv11b/gv11b.h" 83#include "gv11b/gv11b.h"
86#include "gv11b/ce_gv11b.h" 84#include "gv11b/ce_gv11b.h"
87#include "gv100/gr_ctx_gv100.h"
88#include "gv11b/mm_gv11b.h" 85#include "gv11b/mm_gv11b.h"
89#include "gv11b/pmu_gv11b.h" 86#include "gv11b/pmu_gv11b.h"
90#include "gv11b/fb_gv11b.h" 87#include "gv11b/fb_gv11b.h"
91#include "gv100/mm_gv100.h"
92#include "gv11b/pmu_gv11b.h" 88#include "gv11b/pmu_gv11b.h"
93#include "gv100/fb_gv100.h"
94#include "gv100/fifo_gv100.h"
95#include "gv11b/fifo_gv11b.h" 89#include "gv11b/fifo_gv11b.h"
96#include "gv11b/regops_gv11b.h" 90#include "gv11b/regops_gv11b.h"
97
98#include "gv11b/gv11b_gating_reglist.h" 91#include "gv11b/gv11b_gating_reglist.h"
99#include "gv100/regops_gv100.h"
100#include "gv11b/subctx_gv11b.h" 92#include "gv11b/subctx_gv11b.h"
101 93
102#include "gv100.h" 94#include "gv100.h"
103#include "hal_gv100.h" 95#include "hal_gv100.h"
96#include "gv100/bios_gv100.h"
104#include "gv100/fb_gv100.h" 97#include "gv100/fb_gv100.h"
98#include "gv100/fifo_gv100.h"
99#include "gv100/flcn_gv100.h"
100#include "gv100/gr_ctx_gv100.h"
101#include "gv100/gr_gv100.h"
102#include "gv100/mc_gv100.h"
105#include "gv100/mm_gv100.h" 103#include "gv100/mm_gv100.h"
106#include "gv100/pmu_gv100.h" 104#include "gv100/pmu_gv100.h"
105#include "gv100/nvlink_gv100.h"
106#include "gv100/regops_gv100.h"
107 107
108#include <nvgpu/bus.h> 108#include <nvgpu/bus.h>
109#include <nvgpu/debug.h> 109#include <nvgpu/debug.h>
@@ -651,7 +651,7 @@ static const struct gpu_ops gv100_ops = {
651 .apply_smpc_war = gv100_apply_smpc_war, 651 .apply_smpc_war = gv100_apply_smpc_war,
652 }, 652 },
653 .mc = { 653 .mc = {
654 .intr_enable = mc_gv11b_intr_enable, 654 .intr_enable = mc_gv100_intr_enable,
655 .intr_unit_config = mc_gp10b_intr_unit_config, 655 .intr_unit_config = mc_gp10b_intr_unit_config,
656 .isr_stall = mc_gp10b_isr_stall, 656 .isr_stall = mc_gp10b_isr_stall,
657 .intr_stall = mc_gp10b_intr_stall, 657 .intr_stall = mc_gp10b_intr_stall,
@@ -666,6 +666,9 @@ static const struct gpu_ops gv100_ops = {
666 .boot_0 = gk20a_mc_boot_0, 666 .boot_0 = gk20a_mc_boot_0,
667 .is_intr1_pending = mc_gp10b_is_intr1_pending, 667 .is_intr1_pending = mc_gp10b_is_intr1_pending,
668 .is_intr_hub_pending = gv11b_mc_is_intr_hub_pending, 668 .is_intr_hub_pending = gv11b_mc_is_intr_hub_pending,
669 .is_intr_nvlink_pending = gv100_mc_is_intr_nvlink_pending,
670 .is_stall_and_eng_intr_pending =
671 gv100_mc_is_stall_and_eng_intr_pending,
669 }, 672 },
670 .debug = { 673 .debug = {
671 .show_dump = gk20a_debug_show_dump, 674 .show_dump = gk20a_debug_show_dump,
@@ -712,11 +715,30 @@ static const struct gpu_ops gv100_ops = {
712 .disable_shadow_rom = xve_disable_shadow_rom_gp106, 715 .disable_shadow_rom = xve_disable_shadow_rom_gp106,
713 }, 716 },
714 .falcon = { 717 .falcon = {
715 .falcon_hal_sw_init = gp106_falcon_hal_sw_init, 718 .falcon_hal_sw_init = gv100_falcon_hal_sw_init,
716 }, 719 },
717 .priv_ring = { 720 .priv_ring = {
718 .isr = gp10b_priv_ring_isr, 721 .isr = gp10b_priv_ring_isr,
719 }, 722 },
723 .nvlink = {
724 .discover_ioctrl = gv100_nvlink_discover_ioctrl,
725 .discover_link = gv100_nvlink_discover_link,
726 .init = gv100_nvlink_init,
727 .isr = gv100_nvlink_isr,
728 /* API */
729 .link_early_init = gv100_nvlink_link_early_init,
730 .link_get_state = gv100_nvlink_link_get_state,
731 .link_set_mode = gv100_nvlink_link_set_mode,
732 .link_get_mode = gv100_nvlink_link_get_mode,
733 .get_sublink_mode = gv100_nvlink_link_get_sublink_mode,
734 .get_tx_sublink_state = gv100_nvlink_link_get_tx_sublink_state,
735 .get_rx_sublink_state = gv100_nvlink_link_get_rx_sublink_state,
736 .set_sublink_mode = gv100_nvlink_link_set_sublink_mode,
737 .interface_init = gv100_nvlink_interface_init,
738 .reg_init = gv100_nvlink_reg_init,
739 .shutdown = gv100_nvlink_shutdown,
740 .early_init = gv100_nvlink_early_init,
741 },
720 .chip_init_gpu_characteristics = gv100_init_gpu_characteristics, 742 .chip_init_gpu_characteristics = gv100_init_gpu_characteristics,
721 .get_litter_value = gv100_get_litter_value, 743 .get_litter_value = gv100_get_litter_value,
722}; 744};
@@ -751,6 +773,7 @@ int gv100_init_hal(struct gk20a *g)
751 gops->xve = gv100_ops.xve; 773 gops->xve = gv100_ops.xve;
752 gops->falcon = gv100_ops.falcon; 774 gops->falcon = gv100_ops.falcon;
753 gops->priv_ring = gv100_ops.priv_ring; 775 gops->priv_ring = gv100_ops.priv_ring;
776 gops->nvlink = gv100_ops.nvlink;
754 777
755 /* clocks */ 778 /* clocks */
756 gops->clk.init_clk_support = gv100_ops.clk.init_clk_support; 779 gops->clk.init_clk_support = gv100_ops.clk.init_clk_support;