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 ++++++++---- 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/common') 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) -- cgit v1.2.2