From 80197d2c9daa8e2320cc0b15741904eb3c1b9ba7 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Mon, 5 Jun 2017 17:40:44 +0300 Subject: gpu: nvgpu: split vidmem_is_vidmem As the vidmem_is_vidmem flag has got two separate meanings in one bit, split it in two bits into the enabled() API: Add NVGPU_MM_HONORS_APERTURE bit, which is the same as vidmem_is_vidmem with its original meaning, and use it to test which aperture bits to write to hardware. Add NVGPU_MM_UNIFIED_MEMORY bit, which has the opposite meaning: that the GPU shares the SoC memory. When this flag is false, the GPU has its own local video memory. Jira NVGPU-86 Change-Id: I2d0bed3b1ede5a712be99323d3035b154bb23c3a Signed-off-by: Konsta Holtta Reviewed-on: http://git-master/r/1496080 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/driver_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/driver_common.c') diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index f85016d4..bd9a4e77 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c @@ -133,8 +133,10 @@ static void nvgpu_init_mm_vars(struct gk20a *g) g->mm.bypass_smmu = platform->bypass_smmu; g->mm.disable_bigpage = platform->disable_bigpage; - g->mm.vidmem_is_vidmem = platform->vidmem_is_vidmem; - + __nvgpu_set_enabled(g, NVGPU_MM_HONORS_APERTURE, + platform->honors_aperture); + __nvgpu_set_enabled(g, NVGPU_MM_UNIFIED_MEMORY, + platform->unified_memory); __nvgpu_set_enabled(g, NVGPU_MM_UNIFY_ADDRESS_SPACES, platform->unify_address_spaces); -- cgit v1.2.2