diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index 51ae18a39..4de0658b5 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c @@ -145,6 +145,7 @@ static void nvgpu_init_pm_vars(struct gk20a *g) g->aggressive_sync_destroy = platform->aggressive_sync_destroy; g->aggressive_sync_destroy_thresh = platform->aggressive_sync_destroy_thresh; g->has_syncpoints = platform->has_syncpoints; + g->has_cde = platform->has_cde; g->ptimer_src_freq = platform->ptimer_src_freq; g->support_pmu = support_gk20a_pmu(dev_from_gk20a(g)); g->can_railgate = platform->can_railgate_init; diff --git a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c index 0eb39406e..78461b5d9 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c @@ -188,6 +188,9 @@ static int gv11b_tegra_suspend(struct device *dev) struct gk20a_platform t19x_gpu_tegra_platform = { .has_syncpoints = true, + /* no cde. use sysmem compression */ + .has_cde = false, + /* power management configuration */ /* ptimer src frequency in hz*/ diff --git a/drivers/gpu/nvgpu/common/mm/mm.c b/drivers/gpu/nvgpu/common/mm/mm.c index db87c4c4c..54bc17dd3 100644 --- a/drivers/gpu/nvgpu/common/mm/mm.c +++ b/drivers/gpu/nvgpu/common/mm/mm.c @@ -163,7 +163,9 @@ static void nvgpu_remove_mm_support(struct mm_gk20a *mm) nvgpu_free_inst_block(g, &mm->pmu.inst_block); nvgpu_free_inst_block(g, &mm->hwpm.inst_block); nvgpu_vm_put(mm->pmu.vm); - nvgpu_vm_put(mm->cde.vm); + + if (g->has_cde) + nvgpu_vm_put(mm->cde.vm); nvgpu_semaphore_sea_destroy(g); nvgpu_vidmem_destroy(g); @@ -389,9 +391,11 @@ static int nvgpu_init_mm_setup_sw(struct gk20a *g) if (err) return err; - err = nvgpu_init_cde_vm(mm); - if (err) - return err; + if (g->has_cde) { + err = nvgpu_init_cde_vm(mm); + if (err) + return err; + } err = nvgpu_init_ce_vm(mm); if (err) diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index f1dc2f03b..ebe29bc3c 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1208,6 +1208,8 @@ struct gk20a { bool is_virtual; + bool has_cde; + u32 emc3d_ratio; struct nvgpu_spinlock ltc_enabled_lock; diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 193f6e836..83bd76126 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c @@ -302,7 +302,7 @@ static const struct gpu_ops gv11b_ops = { .wait_empty = gr_gv11b_wait_empty, .init_cyclestats = gr_gm20b_init_cyclestats, .set_sm_debug_mode = gv11b_gr_set_sm_debug_mode, - .enable_cde_in_fecs = gr_gm20b_enable_cde_in_fecs, + .enable_cde_in_fecs = NULL, .bpt_reg_info = gv11b_gr_bpt_reg_info, .get_access_map = gr_gv11b_get_access_map, .handle_fecs_error = gr_gv11b_handle_fecs_error,