rk29-ipp:fix a bug of setting rotation
authorchenli <chenli@rock-chips.com>
Thu, 18 Aug 2011 08:30:56 +0000 (16:30 +0800)
committerchenli <chenli@rock-chips.com>
Thu, 18 Aug 2011 08:34:07 +0000 (16:34 +0800)
drivers/staging/rk29/ipp/rk29-ipp.c

index a6fea1250ab609ca0ec5f7cf22a1fa8c21ac6df9..8d9862bd56298c97406068be64e5c0a86d05bfa1 100755 (executable)
@@ -828,7 +828,7 @@ int ipp_blit(const struct rk29_ipp_req *req)
        else\r
        {\r
                ipp_write(ipp_read(IPP_CONFIG)|ROT_ENABLE, IPP_CONFIG);\r
-               ipp_write(ipp_read(IPP_CONFIG)|rotate<<5, IPP_CONFIG);\r
+               ipp_write((ipp_read(IPP_CONFIG)&0xffffff1f)|(rotate<<5), IPP_CONFIG);\r
        }\r
 \r
        /*Configure deinterlace*/\r
@@ -877,7 +877,7 @@ int ipp_blit(const struct rk29_ipp_req *req)
        {\r
                ipp_write(ipp_read(IPP_CONFIG)&(~STORE_CLIP_MODE), IPP_CONFIG);\r
        }\r
-               \r
+\r
        /* Start the operation */\r
        ipp_write(8, IPP_INT);//                \r
        dsb();\r
@@ -1416,6 +1416,7 @@ uint32_t size = 8*1024*1024;
 */\r
 \r
                /*8 test special up scaling*/\r
+               /*\r
                ipp_req.src0.fmt = IPP_Y_CBCR_H2V2;\r
                ipp_req.src0.w = 128;\r
                ipp_req.src0.h = 128;\r
@@ -1453,7 +1454,13 @@ uint32_t size = 8*1024*1024;
                ret = -1;\r
                ret = ipp_blit_sync(&ipp_req);\r
                printk("176x144->800x480: %d \n",ret);\r
+               */\r
 \r
+               /*9 test rotate config*/\r
+               ipp_req.flag = IPP_ROT_180;\r
+               ipp_blit_sync(&ipp_req);\r
+               ipp_req.flag = IPP_ROT_270;\r
+               ipp_blit_sync(&ipp_req);\r
                \r
                free_pages(srcY, 9);\r
 //test deinterlace\r