diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/mm.c | 30 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/gk20a.h | 5 |
2 files changed, 35 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/mm.c b/drivers/gpu/nvgpu/common/mm/mm.c index 88e3baa8..6c8f2cdf 100644 --- a/drivers/gpu/nvgpu/common/mm/mm.c +++ b/drivers/gpu/nvgpu/common/mm/mm.c | |||
@@ -198,6 +198,10 @@ static void nvgpu_remove_mm_support(struct mm_gk20a *mm) | |||
198 | nvgpu_semaphore_sea_destroy(g); | 198 | nvgpu_semaphore_sea_destroy(g); |
199 | nvgpu_vidmem_destroy(g); | 199 | nvgpu_vidmem_destroy(g); |
200 | nvgpu_pd_cache_fini(g); | 200 | nvgpu_pd_cache_fini(g); |
201 | |||
202 | if (g->ops.fifo.deinit_pdb_cache_war) { | ||
203 | g->ops.fifo.deinit_pdb_cache_war(g); | ||
204 | } | ||
201 | } | 205 | } |
202 | 206 | ||
203 | /* pmu vm, share channel_vm interfaces */ | 207 | /* pmu vm, share channel_vm interfaces */ |
@@ -501,6 +505,27 @@ static int nvgpu_init_mm_setup_sw(struct gk20a *g) | |||
501 | return 0; | 505 | return 0; |
502 | } | 506 | } |
503 | 507 | ||
508 | static int nvgpu_init_mm_pdb_cache_war(struct gk20a *g) | ||
509 | { | ||
510 | int err; | ||
511 | |||
512 | if (g->ops.fifo.init_pdb_cache_war) { | ||
513 | err = g->ops.fifo.init_pdb_cache_war(g); | ||
514 | if (err) { | ||
515 | return err; | ||
516 | } | ||
517 | } | ||
518 | |||
519 | if (g->ops.fb.apply_pdb_cache_war) { | ||
520 | err = g->ops.fb.apply_pdb_cache_war(g); | ||
521 | if (err) { | ||
522 | return err; | ||
523 | } | ||
524 | } | ||
525 | |||
526 | return 0; | ||
527 | } | ||
528 | |||
504 | int nvgpu_init_mm_support(struct gk20a *g) | 529 | int nvgpu_init_mm_support(struct gk20a *g) |
505 | { | 530 | { |
506 | u32 err; | 531 | u32 err; |
@@ -510,6 +535,11 @@ int nvgpu_init_mm_support(struct gk20a *g) | |||
510 | return err; | 535 | return err; |
511 | } | 536 | } |
512 | 537 | ||
538 | err = nvgpu_init_mm_pdb_cache_war(g); | ||
539 | if (err) { | ||
540 | return err; | ||
541 | } | ||
542 | |||
513 | err = nvgpu_init_mm_setup_sw(g); | 543 | err = nvgpu_init_mm_setup_sw(g); |
514 | if (err) { | 544 | if (err) { |
515 | return err; | 545 | return err; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h index 593b553c..2fd533c6 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gk20a.h | |||
@@ -583,6 +583,7 @@ struct gpu_ops { | |||
583 | u32 index, u32 state); | 583 | u32 index, u32 state); |
584 | void (*fault_buf_configure_hw)(struct gk20a *g, u32 index); | 584 | void (*fault_buf_configure_hw)(struct gk20a *g, u32 index); |
585 | size_t (*get_vidmem_size)(struct gk20a *g); | 585 | size_t (*get_vidmem_size)(struct gk20a *g); |
586 | int (*apply_pdb_cache_war)(struct gk20a *g); | ||
586 | } fb; | 587 | } fb; |
587 | struct { | 588 | struct { |
588 | void (*slcg_bus_load_gating_prod)(struct gk20a *g, bool prod); | 589 | void (*slcg_bus_load_gating_prod)(struct gk20a *g, bool prod); |
@@ -749,6 +750,8 @@ struct gpu_ops { | |||
749 | struct nvgpu_semaphore *s, u64 sema_va, | 750 | struct nvgpu_semaphore *s, u64 sema_va, |
750 | struct priv_cmd_entry *cmd, | 751 | struct priv_cmd_entry *cmd, |
751 | u32 off, bool acquire, bool wfi); | 752 | u32 off, bool acquire, bool wfi); |
753 | int (*init_pdb_cache_war)(struct gk20a *g); | ||
754 | void (*deinit_pdb_cache_war)(struct gk20a *g); | ||
752 | } fifo; | 755 | } fifo; |
753 | struct pmu_v { | 756 | struct pmu_v { |
754 | u32 (*get_pmu_cmdline_args_size)(struct nvgpu_pmu *pmu); | 757 | u32 (*get_pmu_cmdline_args_size)(struct nvgpu_pmu *pmu); |
@@ -1647,6 +1650,8 @@ struct gk20a { | |||
1647 | 1650 | ||
1648 | struct nvgpu_list_node boardobj_head; | 1651 | struct nvgpu_list_node boardobj_head; |
1649 | struct nvgpu_list_node boardobjgrp_head; | 1652 | struct nvgpu_list_node boardobjgrp_head; |
1653 | |||
1654 | struct nvgpu_mem pdb_cache_war_mem; | ||
1650 | }; | 1655 | }; |
1651 | 1656 | ||
1652 | static inline bool nvgpu_is_timeouts_enabled(struct gk20a *g) | 1657 | static inline bool nvgpu_is_timeouts_enabled(struct gk20a *g) |