diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/hal_gv100.c | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/nvlink_gv100.c | 33 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/nvlink_gv100.h | 2 |
4 files changed, 21 insertions, 17 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 74bb64b3..3b6c3660 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -1198,6 +1198,8 @@ struct gpu_ops { | |||
1198 | int (*isr)(struct gk20a *g); | 1198 | int (*isr)(struct gk20a *g); |
1199 | int (*rxdet)(struct gk20a *g, u32 link_id); | 1199 | int (*rxdet)(struct gk20a *g, u32 link_id); |
1200 | int (*setup_pll)(struct gk20a *g, unsigned long link_mask); | 1200 | int (*setup_pll)(struct gk20a *g, unsigned long link_mask); |
1201 | int (*minion_data_ready_en)(struct gk20a *g, | ||
1202 | unsigned long link_mask, bool sync); | ||
1201 | /* API */ | 1203 | /* API */ |
1202 | int (*link_early_init)(struct gk20a *g, unsigned long mask); | 1204 | int (*link_early_init)(struct gk20a *g, unsigned long mask); |
1203 | u32 (*link_get_mode)(struct gk20a *g, u32 link_id); | 1205 | u32 (*link_get_mode)(struct gk20a *g, u32 link_id); |
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 2f5cf7f3..5e42ba9f 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -842,6 +842,7 @@ static const struct gpu_ops gv100_ops = { | |||
842 | .isr = gv100_nvlink_isr, | 842 | .isr = gv100_nvlink_isr, |
843 | .rxdet = NULL, | 843 | .rxdet = NULL, |
844 | .setup_pll = gv100_nvlink_setup_pll, | 844 | .setup_pll = gv100_nvlink_setup_pll, |
845 | .minion_data_ready_en = gv100_nvlink_minion_data_ready_en, | ||
845 | /* API */ | 846 | /* API */ |
846 | .link_early_init = gv100_nvlink_link_early_init, | 847 | .link_early_init = gv100_nvlink_link_early_init, |
847 | .link_get_state = gv100_nvlink_link_get_state, | 848 | .link_get_state = gv100_nvlink_link_get_state, |
diff --git a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c index c87a3ce9..cae4f9bd 100644 --- a/drivers/gpu/nvgpu/gv100/nvlink_gv100.c +++ b/drivers/gpu/nvgpu/gv100/nvlink_gv100.c | |||
@@ -221,8 +221,6 @@ static const char *__gv100_device_type_to_str(u32 type) | |||
221 | */ | 221 | */ |
222 | static u32 __gv100_nvlink_get_link_reset_mask(struct gk20a *g); | 222 | static u32 __gv100_nvlink_get_link_reset_mask(struct gk20a *g); |
223 | static u32 gv100_nvlink_rxcal_en(struct gk20a *g, unsigned long mask); | 223 | static u32 gv100_nvlink_rxcal_en(struct gk20a *g, unsigned long mask); |
224 | static u32 gv100_nvlink_minion_data_ready_en(struct gk20a *g, | ||
225 | unsigned long mask, bool sync); | ||
226 | 224 | ||
227 | 225 | ||
228 | /* | 226 | /* |
@@ -876,31 +874,32 @@ static u32 gv100_nvlink_minion_configure_ac_coupling(struct gk20a *g, | |||
876 | /* | 874 | /* |
877 | * Set Data ready | 875 | * Set Data ready |
878 | */ | 876 | */ |
879 | static u32 gv100_nvlink_minion_data_ready_en(struct gk20a *g, | 877 | int gv100_nvlink_minion_data_ready_en(struct gk20a *g, |
880 | unsigned long mask, bool sync) | 878 | unsigned long link_mask, bool sync) |
881 | { | 879 | { |
882 | u32 err = 0; | 880 | int ret = 0; |
883 | u32 i; | 881 | u32 link_id; |
884 | 882 | ||
885 | for_each_set_bit(i, &mask, 32) { | 883 | for_each_set_bit(link_id, &link_mask, 32) { |
886 | err = gv100_nvlink_minion_send_command(g, i, | 884 | ret = gv100_nvlink_minion_send_command(g, link_id, |
887 | minion_nvlink_dl_cmd_command_initlaneenable_v(), 0, | 885 | minion_nvlink_dl_cmd_command_initlaneenable_v(), 0, |
888 | sync); | 886 | sync); |
889 | if (err) { | 887 | if (ret) { |
890 | nvgpu_err(g, "Failed init lane enable on minion"); | 888 | nvgpu_err(g, "Failed initlaneenable on link %u", |
891 | return err; | 889 | link_id); |
890 | return ret; | ||
892 | } | 891 | } |
893 | } | 892 | } |
894 | 893 | ||
895 | for_each_set_bit(i, &mask, 32) { | 894 | for_each_set_bit(link_id, &link_mask, 32) { |
896 | err = gv100_nvlink_minion_send_command(g, i, | 895 | ret = gv100_nvlink_minion_send_command(g, link_id, |
897 | minion_nvlink_dl_cmd_command_initdlpl_v(), 0, sync); | 896 | minion_nvlink_dl_cmd_command_initdlpl_v(), 0, sync); |
898 | if (err) { | 897 | if (ret) { |
899 | nvgpu_err(g, "Failed init DLPL on minion"); | 898 | nvgpu_err(g, "Failed initdlpl on link %u", link_id); |
900 | return err; | 899 | return ret; |
901 | } | 900 | } |
902 | } | 901 | } |
903 | return err; | 902 | return ret; |
904 | } | 903 | } |
905 | 904 | ||
906 | /* | 905 | /* |
diff --git a/drivers/gpu/nvgpu/gv100/nvlink_gv100.h b/drivers/gpu/nvgpu/gv100/nvlink_gv100.h index 0c58438c..bf923d4b 100644 --- a/drivers/gpu/nvgpu/gv100/nvlink_gv100.h +++ b/drivers/gpu/nvgpu/gv100/nvlink_gv100.h | |||
@@ -32,6 +32,8 @@ int gv100_nvlink_isr(struct gk20a *g); | |||
32 | int gv100_nvlink_minion_send_command(struct gk20a *g, u32 link_id, u32 command, | 32 | int gv100_nvlink_minion_send_command(struct gk20a *g, u32 link_id, u32 command, |
33 | u32 scratch_0, bool sync); | 33 | u32 scratch_0, bool sync); |
34 | int gv100_nvlink_setup_pll(struct gk20a *g, unsigned long link_mask); | 34 | int gv100_nvlink_setup_pll(struct gk20a *g, unsigned long link_mask); |
35 | int gv100_nvlink_minion_data_ready_en(struct gk20a *g, | ||
36 | unsigned long link_mask, bool sync); | ||
35 | /* API */ | 37 | /* API */ |
36 | int gv100_nvlink_link_early_init(struct gk20a *g, unsigned long mask); | 38 | int gv100_nvlink_link_early_init(struct gk20a *g, unsigned long mask); |
37 | u32 gv100_nvlink_link_get_mode(struct gk20a *g, u32 link_id); | 39 | u32 gv100_nvlink_link_get_mode(struct gk20a *g, u32 link_id); |