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/gv11b/fb_gv11b.c | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fb_gv11b.h | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 1 |
5 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index ee1f3304..4aa04139 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -557,6 +557,8 @@ struct gpu_ops { | |||
557 | u32 *inst_lo, u32 *inst_hi); | 557 | u32 *inst_lo, u32 *inst_hi); |
558 | u32 (*read_mmu_fault_info)(struct gk20a *g); | 558 | u32 (*read_mmu_fault_info)(struct gk20a *g); |
559 | u32 (*read_mmu_fault_status)(struct gk20a *g); | 559 | u32 (*read_mmu_fault_status)(struct gk20a *g); |
560 | int (*mmu_invalidate_replay)(struct gk20a *g, | ||
561 | u32 invalidate_replay_val); | ||
560 | } fb; | 562 | } fb; |
561 | struct { | 563 | struct { |
562 | void (*slcg_bus_load_gating_prod)(struct gk20a *g, bool prod); | 564 | void (*slcg_bus_load_gating_prod)(struct gk20a *g, bool prod); |
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 801a76a3..20f045b2 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -493,6 +493,7 @@ static const struct gpu_ops gv100_ops = { | |||
493 | .read_mmu_fault_inst_lo_hi = fb_gv11b_read_mmu_fault_inst_lo_hi, | 493 | .read_mmu_fault_inst_lo_hi = fb_gv11b_read_mmu_fault_inst_lo_hi, |
494 | .read_mmu_fault_info = fb_gv11b_read_mmu_fault_info, | 494 | .read_mmu_fault_info = fb_gv11b_read_mmu_fault_info, |
495 | .read_mmu_fault_status = fb_gv11b_read_mmu_fault_status, | 495 | .read_mmu_fault_status = fb_gv11b_read_mmu_fault_status, |
496 | .mmu_invalidate_replay = gv11b_fb_mmu_invalidate_replay, | ||
496 | }, | 497 | }, |
497 | .clock_gating = { | 498 | .clock_gating = { |
498 | .slcg_bus_load_gating_prod = | 499 | .slcg_bus_load_gating_prod = |
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c index 54f0d2d8..d50885f9 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c | |||
@@ -47,9 +47,6 @@ | |||
47 | static int gv11b_fb_fix_page_fault(struct gk20a *g, | 47 | static int gv11b_fb_fix_page_fault(struct gk20a *g, |
48 | struct mmu_fault_info *mmfault); | 48 | struct mmu_fault_info *mmfault); |
49 | 49 | ||
50 | static int gv11b_fb_mmu_invalidate_replay(struct gk20a *g, | ||
51 | u32 invalidate_replay_val); | ||
52 | |||
53 | static void gv11b_init_nvlink_soc_credits(struct gk20a *g) | 50 | static void gv11b_init_nvlink_soc_credits(struct gk20a *g) |
54 | { | 51 | { |
55 | if (nvgpu_is_bpmp_running(g) && (!nvgpu_platform_is_simulation(g))) { | 52 | if (nvgpu_is_bpmp_running(g) && (!nvgpu_platform_is_simulation(g))) { |
@@ -989,12 +986,12 @@ static int gv11b_fb_replay_or_cancel_faults(struct gk20a *g, | |||
989 | * cancel faults so that next time it faults as | 986 | * cancel faults so that next time it faults as |
990 | * replayable faults and channel recovery can be done | 987 | * replayable faults and channel recovery can be done |
991 | */ | 988 | */ |
992 | err = gv11b_fb_mmu_invalidate_replay(g, | 989 | err = g->ops.fb.mmu_invalidate_replay(g, |
993 | fb_mmu_invalidate_replay_cancel_global_f()); | 990 | fb_mmu_invalidate_replay_cancel_global_f()); |
994 | } else if (invalidate_replay_val & | 991 | } else if (invalidate_replay_val & |
995 | fb_mmu_invalidate_replay_start_ack_all_f()) { | 992 | fb_mmu_invalidate_replay_start_ack_all_f()) { |
996 | /* pte valid is fixed. replay faulting request */ | 993 | /* pte valid is fixed. replay faulting request */ |
997 | err = gv11b_fb_mmu_invalidate_replay(g, | 994 | err = g->ops.fb.mmu_invalidate_replay(g, |
998 | fb_mmu_invalidate_replay_start_ack_all_f()); | 995 | fb_mmu_invalidate_replay_start_ack_all_f()); |
999 | } | 996 | } |
1000 | 997 | ||
@@ -1441,7 +1438,7 @@ bool gv11b_fb_mmu_fault_pending(struct gk20a *g) | |||
1441 | return false; | 1438 | return false; |
1442 | } | 1439 | } |
1443 | 1440 | ||
1444 | static int gv11b_fb_mmu_invalidate_replay(struct gk20a *g, | 1441 | int gv11b_fb_mmu_invalidate_replay(struct gk20a *g, |
1445 | u32 invalidate_replay_val) | 1442 | u32 invalidate_replay_val) |
1446 | { | 1443 | { |
1447 | int err = -ETIMEDOUT; | 1444 | int err = -ETIMEDOUT; |
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.h b/drivers/gpu/nvgpu/gv11b/fb_gv11b.h index fef9578a..0431568d 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.h | |||
@@ -99,4 +99,7 @@ u32 fb_gv11b_read_mmu_fault_info(struct gk20a *g); | |||
99 | u32 fb_gv11b_read_mmu_fault_status(struct gk20a *g); | 99 | u32 fb_gv11b_read_mmu_fault_status(struct gk20a *g); |
100 | void fb_gv11b_write_mmu_fault_status(struct gk20a *g, u32 reg_val); | 100 | void fb_gv11b_write_mmu_fault_status(struct gk20a *g, u32 reg_val); |
101 | 101 | ||
102 | int gv11b_fb_mmu_invalidate_replay(struct gk20a *g, | ||
103 | u32 invalidate_replay_val); | ||
104 | |||
102 | #endif | 105 | #endif |
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 2b58e1c4..a243e81c 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -459,6 +459,7 @@ static const struct gpu_ops gv11b_ops = { | |||
459 | .read_mmu_fault_inst_lo_hi = fb_gv11b_read_mmu_fault_inst_lo_hi, | 459 | .read_mmu_fault_inst_lo_hi = fb_gv11b_read_mmu_fault_inst_lo_hi, |
460 | .read_mmu_fault_info = fb_gv11b_read_mmu_fault_info, | 460 | .read_mmu_fault_info = fb_gv11b_read_mmu_fault_info, |
461 | .read_mmu_fault_status = fb_gv11b_read_mmu_fault_status, | 461 | .read_mmu_fault_status = fb_gv11b_read_mmu_fault_status, |
462 | .mmu_invalidate_replay = gv11b_fb_mmu_invalidate_replay, | ||
462 | }, | 463 | }, |
463 | .clock_gating = { | 464 | .clock_gating = { |
464 | .slcg_bus_load_gating_prod = | 465 | .slcg_bus_load_gating_prod = |