diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index a1c9c2bd..4f05ba8f 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -392,7 +392,7 @@ struct gpu_ops { | |||
392 | void (*update_boosted_ctx)(struct gk20a *g, | 392 | void (*update_boosted_ctx)(struct gk20a *g, |
393 | struct nvgpu_mem *mem, | 393 | struct nvgpu_mem *mem, |
394 | struct gr_ctx_desc *gr_ctx); | 394 | struct gr_ctx_desc *gr_ctx); |
395 | void (*init_sm_id_table)(struct gk20a *g); | 395 | int (*init_sm_id_table)(struct gk20a *g); |
396 | int (*load_smid_config)(struct gk20a *g); | 396 | int (*load_smid_config)(struct gk20a *g); |
397 | void (*program_sm_id_numbering)(struct gk20a *g, | 397 | void (*program_sm_id_numbering)(struct gk20a *g, |
398 | u32 gpc, u32 tpc, u32 smid); | 398 | u32 gpc, u32 tpc, u32 smid); |
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 11054087..0f6bebe7 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GK20A Graphics | 2 | * GK20A Graphics |
3 | * | 3 | * |
4 | * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -1137,7 +1137,7 @@ static inline u32 count_bits(u32 mask) | |||
1137 | return count; | 1137 | return count; |
1138 | } | 1138 | } |
1139 | 1139 | ||
1140 | void gr_gk20a_init_sm_id_table(struct gk20a *g) | 1140 | int gr_gk20a_init_sm_id_table(struct gk20a *g) |
1141 | { | 1141 | { |
1142 | u32 gpc, tpc; | 1142 | u32 gpc, tpc; |
1143 | u32 sm_id = 0; | 1143 | u32 sm_id = 0; |
@@ -1156,6 +1156,7 @@ void gr_gk20a_init_sm_id_table(struct gk20a *g) | |||
1156 | } | 1156 | } |
1157 | } | 1157 | } |
1158 | g->gr.no_of_sm = sm_id; | 1158 | g->gr.no_of_sm = sm_id; |
1159 | return 0; | ||
1159 | } | 1160 | } |
1160 | 1161 | ||
1161 | /* | 1162 | /* |
@@ -1178,11 +1179,15 @@ int gr_gk20a_init_fs_state(struct gk20a *g) | |||
1178 | u32 tpc_per_gpc; | 1179 | u32 tpc_per_gpc; |
1179 | u32 fuse_tpc_mask; | 1180 | u32 fuse_tpc_mask; |
1180 | u32 reg_index; | 1181 | u32 reg_index; |
1182 | int err; | ||
1181 | 1183 | ||
1182 | gk20a_dbg_fn(""); | 1184 | gk20a_dbg_fn(""); |
1183 | 1185 | ||
1184 | if (g->ops.gr.init_sm_id_table) { | 1186 | if (g->ops.gr.init_sm_id_table) { |
1185 | g->ops.gr.init_sm_id_table(g); | 1187 | err = g->ops.gr.init_sm_id_table(g); |
1188 | if (err) | ||
1189 | return err; | ||
1190 | |||
1186 | /* Is table empty ? */ | 1191 | /* Is table empty ? */ |
1187 | if (g->gr.no_of_sm == 0) | 1192 | if (g->gr.no_of_sm == 0) |
1188 | return -EINVAL; | 1193 | return -EINVAL; |
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h index b6d5c14b..1c22923b 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h | |||
@@ -766,7 +766,7 @@ u32 gr_gk20a_tpc_enabled_exceptions(struct gk20a *g); | |||
766 | 766 | ||
767 | int gr_gk20a_commit_global_timeslice(struct gk20a *g, struct channel_gk20a *c); | 767 | int gr_gk20a_commit_global_timeslice(struct gk20a *g, struct channel_gk20a *c); |
768 | 768 | ||
769 | void gr_gk20a_init_sm_id_table(struct gk20a *g); | 769 | int gr_gk20a_init_sm_id_table(struct gk20a *g); |
770 | 770 | ||
771 | int gr_gk20a_commit_inst(struct channel_gk20a *c, u64 gpu_va); | 771 | int gr_gk20a_commit_inst(struct channel_gk20a *c, u64 gpu_va); |
772 | 772 | ||