summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv100/flcn_gv100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gv100/flcn_gv100.c')
-rw-r--r--drivers/gpu/nvgpu/gv100/flcn_gv100.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gv100/flcn_gv100.c b/drivers/gpu/nvgpu/gv100/flcn_gv100.c
index 5820d6c9..5167e3f0 100644
--- a/drivers/gpu/nvgpu/gv100/flcn_gv100.c
+++ b/drivers/gpu/nvgpu/gv100/flcn_gv100.c
@@ -29,27 +29,29 @@
29 29
30#include <nvgpu/hw/gv100/hw_falcon_gv100.h> 30#include <nvgpu/hw/gv100/hw_falcon_gv100.h>
31 31
32void gv100_falcon_hal_sw_init(struct nvgpu_falcon *flcn) 32int gv100_falcon_hal_sw_init(struct nvgpu_falcon *flcn)
33{ 33{
34 struct gk20a *g = flcn->g; 34 struct gk20a *g = flcn->g;
35 int err = 0;
35 36
36 switch (flcn->flcn_id) { 37 if (flcn->flcn_id == FALCON_ID_MINION) {
37 case FALCON_ID_MINION:
38 flcn->flcn_base = g->nvlink.minion_base; 38 flcn->flcn_base = g->nvlink.minion_base;
39 flcn->is_falcon_supported = true; 39 flcn->is_falcon_supported = true;
40 flcn->is_interrupt_enabled = true; 40 flcn->is_interrupt_enabled = true;
41 break;
42 default:
43 break;
44 }
45 41
46 if (flcn->is_falcon_supported) { 42 err = nvgpu_mutex_init(&flcn->copy_lock);
47 nvgpu_mutex_init(&flcn->copy_lock); 43 if (err != 0) {
44 nvgpu_err(g, "Error in flcn.copy_lock mutex initialization");
45 return err;
46 }
47
48 gk20a_falcon_ops(flcn); 48 gk20a_falcon_ops(flcn);
49 } else { 49 } else {
50 /* 50 /*
51 * Fall back 51 * Fall back
52 */ 52 */
53 gp106_falcon_hal_sw_init(flcn); 53 err = gp106_falcon_hal_sw_init(flcn);
54 } 54 }
55
56 return err;
55} 57}