IPP:fix write register error when IPP operate reset. wy commit
authorddl <ddl@rock-chips.com>
Thu, 16 Dec 2010 12:02:04 +0000 (20:02 +0800)
committerddl <ddl@rock-chips.com>
Thu, 16 Dec 2010 12:02:04 +0000 (20:02 +0800)
drivers/staging/rk29/ipp/rk29-ipp.c

index f30e0f11205e63ce280b1d0d7686442e58965ef8..bdf1f6c1ac70ee57cba6d8e87a5d9ae7ca0f9b79 100644 (file)
@@ -355,7 +355,7 @@ int ipp_do_blit(struct rk29_ipp_req *req)
                ipp_write(req->src0.CbrMst, IPP_SRC0_CBR_MST);\r
        }\r
        ipp_write(req->src0.h<<16|req->src0.w, IPP_SRC_IMG_INFO);\r
-       ipp_write(ipp_read(IPP_CONFIG)|req->src0.fmt, IPP_CONFIG);\r
+       ipp_write((ipp_read(IPP_CONFIG)&(~0x7))|req->src0.fmt, IPP_CONFIG);\r
 \r
        /* Configure destination image */\r
        DBG("dst YrgbMst 0x%x , CbrMst0x%x, %dx%d\n", dst0_YrgbMst,dst0_CbrMst,\r
@@ -403,8 +403,8 @@ int ipp_do_blit(struct rk29_ipp_req *req)
 \r
                        DBG("!!!!!pre_scale_h %d,pre_scale_w %d \n",pre_scale_h,pre_scale_w);\r
 \r
-                       ipp_write(ipp_read(IPP_CONFIG)|PRE_SCALE, IPP_CONFIG);          //enable pre_scale\r
-                       ipp_write(ipp_read(IPP_PRE_SCL_PARA)|(pre_scale_h-1)<<3|(pre_scale_w-1),IPP_PRE_SCL_PARA);\r
+                       ipp_write((ipp_read(IPP_CONFIG)&0xffffffef)|PRE_SCALE, IPP_CONFIG);             //enable pre_scale\r
+                       ipp_write((pre_scale_h-1)<<3|(pre_scale_w-1),IPP_PRE_SCL_PARA);\r
 \r
                        if((req->src0.w%pre_scale_w)!=0) //ÏòÉÏÈ¡Õû ceil\r
                        {\r
@@ -450,8 +450,8 @@ int ipp_do_blit(struct rk29_ipp_req *req)
 \r
                        DBG("!!!!!pre_scale_h %d,pre_scale_w %d \n",pre_scale_h,pre_scale_w);\r
 \r
-                       ipp_write(ipp_read(IPP_CONFIG)|PRE_SCALE, IPP_CONFIG);          //enable pre_scale\r
-                       ipp_write(ipp_read(IPP_PRE_SCL_PARA)|(pre_scale_h-1)<<3|(pre_scale_w-1),IPP_PRE_SCL_PARA);\r
+                       ipp_write((ipp_read(IPP_CONFIG)&0xffffffef)|PRE_SCALE, IPP_CONFIG);             //enable pre_scale\r
+                       ipp_write((pre_scale_h-1)<<3|(pre_scale_w-1),IPP_PRE_SCL_PARA);\r
 \r
                        if((req->src0.w%pre_scale_w)!=0) //ÏòÉÏÈ¡Õû ceil\r
                        {\r
@@ -576,7 +576,7 @@ int ipp_do_blit(struct rk29_ipp_req *req)
                        post_scale_h = (uint32_t)(4096*(post_scale_target_h -1)/(req->dst0.h-1));\r
 \r
                }\r
-               ipp_write(ipp_read(IPP_CONFIG)|POST_SCALE, IPP_CONFIG); //enable post_scale\r
+               ipp_write((ipp_read(IPP_CONFIG)&0xfffffff7)|POST_SCALE, IPP_CONFIG); //enable post_scale\r
                ipp_write((post_scale_h<<16)|post_scale_w, IPP_POST_SCL_PARA);\r
        }\r
        else //no post_scale\r