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));