From aadb67e5e377ec6b17eb54c3d1055b80210a5571 Mon Sep 17 00:00:00 2001 From: xxm Date: Mon, 21 Jul 2014 18:51:44 +0800 Subject: [PATCH] rockchip:mali400:revert function:mali_mem_validation_add_range,don't use rk_get_fb --- .../arm/mali400/mali/common/mali_mem_validation.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/arm/mali400/mali/common/mali_mem_validation.c b/drivers/gpu/arm/mali400/mali/common/mali_mem_validation.c index c2dbfa7665d9..ae229c75c4f2 100755 --- a/drivers/gpu/arm/mali400/mali/common/mali_mem_validation.c +++ b/drivers/gpu/arm/mali400/mali/common/mali_mem_validation.c @@ -24,27 +24,23 @@ typedef struct { static _mali_mem_validation_t mali_mem_validator = { MALI_INVALID_MEM_ADDR, MALI_INVALID_MEM_ADDR }; -extern struct fb_info *rk_get_fb(int fb_id); _mali_osk_errcode_t mali_mem_validation_add_range(u32 start, u32 size_para) { /* Check that no other MEM_VALIDATION resources exist */ - struct fb_info *fb = rk_get_fb(0); - u32 base = (fb->fix).smem_start; - u32 size = (fb->fix).smem_len; if (MALI_INVALID_MEM_ADDR != mali_mem_validator.phys_base) { MALI_PRINT_ERROR(("Failed to add frame buffer memory; another range is already specified\n")); return _MALI_OSK_ERR_FAULT; } /* Check restrictions on page alignment */ - if ((0 != (base & (~_MALI_OSK_CPU_PAGE_MASK))) || - (0 != (size & (~_MALI_OSK_CPU_PAGE_MASK)))) { + if ((0 != (start & (~_MALI_OSK_CPU_PAGE_MASK))) || + (0 != (size_para & (~_MALI_OSK_CPU_PAGE_MASK)))) { MALI_PRINT_ERROR(("Failed to add frame buffer memory; incorrect alignment\n")); return _MALI_OSK_ERR_FAULT; } - mali_mem_validator.phys_base = base; - mali_mem_validator.size = size; + mali_mem_validator.phys_base = start; + mali_mem_validator.size = size_para; MALI_DEBUG_PRINT(2, ("Memory Validator installed for Mali physical address base=0x%08X, size=0x%08X\n", mali_mem_validator.phys_base, mali_mem_validator.size)); -- 2.34.1