From 57a7064ff46048b4013ec197b0495c9c2fc5b082 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Thu, 21 Dec 2017 10:41:47 -0800 Subject: gpu: nvgpu: gv11b: remove cde support Change-Id: I04df795b20413a2d07a252d77b3eba853890fcae Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/1624087 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/driver_common.c | 1 + drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c | 3 +++ drivers/gpu/nvgpu/common/mm/mm.c | 12 ++++++++---- drivers/gpu/nvgpu/gk20a/gk20a.h | 2 ++ drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index 51ae18a3..4de0658b 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 0eb39406..78461b5d 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 db87c4c4..54bc17dd 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 f1dc2f03..ebe29bc3 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 193f6e83..83bd7612 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, -- cgit v1.2.2