From ee61ef2f655fd2629d4d22176141a342627e5185 Mon Sep 17 00:00:00 2001 From: zsq Date: Fri, 1 Feb 2013 08:43:31 +0800 Subject: [PATCH] delete mmu info break select --- drivers/video/rockchip/rga/rga_mmu_info.c | 24 +++++++++++++++++++++++ drivers/video/rockchip/rga/rga_reg_info.c | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/video/rockchip/rga/rga_mmu_info.c b/drivers/video/rockchip/rga/rga_mmu_info.c index 83458e398975..59474f3696b8 100755 --- a/drivers/video/rockchip/rga/rga_mmu_info.c +++ b/drivers/video/rockchip/rga/rga_mmu_info.c @@ -297,6 +297,7 @@ static int rga_MapUserMemory(struct page **pages, if (vma)//&& (vma->vm_flags & VM_PFNMAP) ) { + #if 0 do { pte_t * pte; @@ -340,6 +341,29 @@ static int rga_MapUserMemory(struct page **pages, pte_unmap_unlock(pte, ptl); } while (0); + + #else + + do + { + pte_t * pte; + spinlock_t * ptl; + unsigned long pfn; + pgd_t * pgd; + pud_t * pud; + pmd_t * pmd; + + pgd = pgd_offset(current->mm, (Memory + i) << PAGE_SHIFT); + pud = pud_offset(pgd, (Memory + i) << PAGE_SHIFT); + pmd = pmd_offset(pud, (Memory + i) << PAGE_SHIFT); + pte = pte_offset_map_lock(current->mm, pmd, (Memory + i) << PAGE_SHIFT, &ptl); + + pfn = pte_pfn(*pte); + Address = ((pfn << PAGE_SHIFT) | (((unsigned long)((Memory + i) << PAGE_SHIFT)) & ~PAGE_MASK)); + pte_unmap_unlock(pte, ptl); + } + while (0); + #endif pageTable[i] = Address; } diff --git a/drivers/video/rockchip/rga/rga_reg_info.c b/drivers/video/rockchip/rga/rga_reg_info.c index 10d63e7669f5..b2674975a6da 100755 --- a/drivers/video/rockchip/rga/rga_reg_info.c +++ b/drivers/video/rockchip/rga/rga_reg_info.c @@ -1091,7 +1091,7 @@ RGA_set_bitblt_reg_info(u8 *base, const struct rga_req * msg, TILE_INFO *tile) stride = (msg->dst.vir_w * pixel_width + 3) & (~3); *bRGA_DST_MST = (u32)msg->dst.yrgb_addr + (tile->dst_ctrl.y_off * stride) + (tile->dst_ctrl.x_off * pixel_width); *bRGA_DST_CTR_INFO = (tile->dst_ctrl.w) | ((tile->dst_ctrl.h) << 16); - + *bRGA_DST_CTR_INFO |= (1<<29) | (1<<28); } -- 2.34.1