From: zwl Date: Tue, 13 May 2014 09:16:07 +0000 (+0800) Subject: rk fb: fix rga rotate bug X-Git-Tag: firefly_0821_release~5294 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=52ac561b2fdcb30f624fc09917a6a91f67082ad1;p=firefly-linux-kernel-4.4.55.git rk fb: fix rga rotate bug --- diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index 3a57a2c8473a..d2544604175f 100755 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -866,6 +866,8 @@ static void rga_win_check(struct rk_lcdc_win *dst_win, struct rk_lcdc_win *src_w src_win->area[0].yact = (src_win->area[0].yact + align32) & (~align32); if (src_win->area[0].xvir < src_win->area[0].xact) src_win->area[0].xvir = src_win->area[0].xact; + if (src_win->area[0].yvir < src_win->area[0].yact) + src_win->area[0].yvir = src_win->area[0].yact; if ((dst_win->area[0].xact & align32) != 0) dst_win->area[0].xact = (dst_win->area[0].xact + align32) & (~align32); @@ -873,6 +875,8 @@ static void rga_win_check(struct rk_lcdc_win *dst_win, struct rk_lcdc_win *src_w dst_win->area[0].yact = (dst_win->area[0].yact + align32) & (~align32); if (dst_win->area[0].xvir < dst_win->area[0].xact) dst_win->area[0].xvir = dst_win->area[0].xact; + if (dst_win->area[0].yvir < dst_win->area[0].yact) + dst_win->area[0].yvir = dst_win->area[0].yact; } static void win_copy_by_rga(struct rk_lcdc_win *dst_win, struct rk_lcdc_win *src_win) @@ -965,6 +969,13 @@ static void win_copy_by_rga(struct rk_lcdc_win *dst_win, struct rk_lcdc_win *src Rga_Request.clip.ymin = 0; Rga_Request.clip.ymax = dst_win->area[0].yact - 1; Rga_Request.scale_mode = 0; +#if defined(CONFIG_ROCKCHIP_IOMMU) + Rga_Request.mmu_info.mmu_en = 1; /* TODO Modify for use mmu*/ + Rga_Request.mmu_info.mmu_flag = 1; +#else + Rga_Request.mmu_info.mmu_en = 0; + Rga_Request.mmu_info.mmu_flag = 0; +#endif ret = rga_ioctl_kernel(&Rga_Request); }