rk fb:check fmt for ipp
authoryxj <yxj@rock-chips.com>
Thu, 26 Sep 2013 12:35:25 +0000 (20:35 +0800)
committeryxj <yxj@rock-chips.com>
Fri, 27 Sep 2013 09:47:09 +0000 (17:47 +0800)
drivers/video/rockchip/rk_fb.c

index 3c845f021d7a049fc98b4d28ca448d8318b1db25..2712279e9c331fc765046dcd4b33ebf00917e99f 100755 (executable)
@@ -400,11 +400,14 @@ static void ipp_par_check(int* dst_w, int* dst_h, int* dst_vir_w,
 static void fb_copy_by_ipp(struct fb_info *dst_info, struct fb_info *src_info,int offset)
 {
        struct rk29_ipp_req ipp_req;
-
        uint32_t  rotation = 0;
+       int dst_w,dst_h,dst_vir_w;
+       int ipp_fmt;
+       u8 data_format = (dst_info->var.nonstd)&0xff;
+       
        memset(&ipp_req, 0, sizeof(struct rk29_ipp_req));
 #if defined(CONFIG_FB_ROTATE)
-       int orientation = orientation = 270 - CONFIG_ROTATE_ORIENTATION;
+       int orientation = 270 - CONFIG_ROTATE_ORIENTATION;
        switch(orientation)
        {
                case 0:
@@ -425,15 +428,23 @@ static void fb_copy_by_ipp(struct fb_info *dst_info, struct fb_info *src_info,in
                        
        }
 #endif
+
+       dst_w = dst_info->var.xres;
+       dst_h = dst_info->var.yres;
+       dst_vir_w = dst_info->var.xres_virtual;
+       ipp_fmt = get_ipp_format(data_format);
+       ipp_par_check(&dst_w,&dst_h,&dst_vir_w,rotation,ipp_fmt);
        ipp_req.src0.YrgbMst = src_info->fix.smem_start + offset;
        ipp_req.src0.w = src_info->var.xres;
        ipp_req.src0.h = src_info->var.yres;
        ipp_req.src_vir_w = src_info->var.xres_virtual;
+       ipp_req.src0.fmt = ipp_fmt;
        
        ipp_req.dst0.YrgbMst = dst_info->fix.smem_start + offset;
-       ipp_req.dst0.w = dst_info->var.xres;
-       ipp_req.dst0.h = dst_info->var.yres;
-       ipp_req.dst_vir_w = dst_info->var.xres_virtual;
+       ipp_req.dst0.w = dst_w;
+       ipp_req.dst0.h = dst_h;
+       ipp_req.dst_vir_w = dst_vir_w;
+       ipp_req.dst0.fmt = ipp_fmt;
 
        
        ipp_req.timeout = 100;