rk29 IPP:IPP driver provides synchronous and asynchronous call interfaces.

1.In case of synchronous call please use ipp_blit_sync function.
  In case of asynchronous call please use ipp_blit_async function.
  The old interface ipp_do_blit is not recommended from now on.
2.Use ipp_blit_sync instead of ipp_do_blit in rk29_fb.c
This commit is contained in:
chenli
2011-06-28 09:58:29 +08:00
parent 2caa51d22a
commit d9dced963e
3 changed files with 1121 additions and 73 deletions

View File

@@ -1,6 +1,12 @@
#ifndef _RK29_IPP_DRIVER_H_
#define _RK29_IPP_DRIVER_H_
#define IPP_BLIT_SYNC 0x5017
#define IPP_BLIT_ASYNC 0x5018
#define IPP_GET_RESULT 0x5019
/* Image data */
struct rk29_ipp_image
{
@@ -28,6 +34,9 @@ struct rk29_ipp_req {
uint8_t deinterlace_para0;
uint8_t deinterlace_para1;
uint8_t deinterlace_para2;
/* completion is reported through a callback */
void (*complete)(int retval);
};
@@ -76,31 +85,32 @@ typedef enum
};
#define IPP_CONFIG (0x00)
#define IPP_SRC_IMG_INFO (0x04)
#define IPP_DST_IMG_INFO (0x08)
#define IPP_SRC_IMG_INFO (0x04)
#define IPP_DST_IMG_INFO (0x08)
#define IPP_IMG_VIR (0x0c)
#define IPP_INT (0x10)
#define IPP_SRC0_Y_MST (0x14)
#define IPP_SRC0_CBR_MST (0x18)
#define IPP_SRC0_CBR_MST (0x18)
#define IPP_SRC1_Y_MST (0x1c)
#define IPP_SRC1_CBR_MST (0x20)
#define IPP_SRC1_CBR_MST (0x20)
#define IPP_DST0_Y_MST (0x24)
#define IPP_DST0_CBR_MST (0x28)
#define IPP_DST0_CBR_MST (0x28)
#define IPP_DST1_Y_MST (0x2c)
#define IPP_DST1_CBR_MST (0x30)
#define IPP_PRE_SCL_PARA (0x34)
#define IPP_POST_SCL_PARA (0x38)
#define IPP_SWAP_CTRL (0x3c)
#define IPP_PRE_IMG_INFO (0x40)
#define IPP_DST1_CBR_MST (0x30)
#define IPP_PRE_SCL_PARA (0x34)
#define IPP_POST_SCL_PARA (0x38)
#define IPP_SWAP_CTRL (0x3c)
#define IPP_PRE_IMG_INFO (0x40)
#define IPP_AXI_ID (0x44)
#define IPP_SRESET (0x48)
#define IPP_PROCESS_ST (0x50)
/*ipp config*/
#define ROT_ENABLE (1<<8)
#define PRE_SCALE (1<<4)
#define PRE_SCALE (1<<4)
#define POST_SCALE (1<<3)
#define IPP_BLIT_COMPLETE_EVENT BIT(1)
#define IS_YCRCB(img) ((img == IPP_Y_CBCR_H2V1) | (img == IPP_Y_CBCR_H2V2) | \
(img == IPP_Y_CBCR_H1V1) )
@@ -109,4 +119,6 @@ typedef enum
#define HAS_ALPHA(img) (img == IPP_ARGB_8888)
int ipp_do_blit(struct rk29_ipp_req *req);
int ipp_blit_async(const struct rk29_ipp_req *req);
int ipp_blit_sync(const struct rk29_ipp_req *req);
#endif /*_RK29_IPP_DRIVER_H_*/

File diff suppressed because it is too large Load Diff

View File

@@ -1384,7 +1384,8 @@ static int fb0_set_par(struct fb_info *info)
ipp_req.dst_vir_w = ipp_req.dst0.w;
ipp_req.timeout = 100;
ipp_req.flag = IPP_ROT_0;
ipp_do_blit(&ipp_req);
//ipp_do_blit(&ipp_req);
ipp_blit_sync(&ipp_req);
}else
#endif
{
@@ -1477,7 +1478,8 @@ static int fb0_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
ipp_req.dst_vir_w = ipp_req.dst0.w;
ipp_req.timeout = 100;
ipp_req.flag = IPP_ROT_0;
ipp_do_blit(&ipp_req);
//ipp_do_blit(&ipp_req);
ipp_blit_sync(&ipp_req);
win1_pan(info);
return 0;
}else
@@ -1904,7 +1906,8 @@ static int fb1_set_par(struct fb_info *info)
else if(var->rotate == 270)
ipp_req.flag = IPP_ROT_270;
ipp_do_blit(&ipp_req);
//ipp_do_blit(&ipp_req);
ipp_blit_sync(&ipp_req);
fbprintk("yaddr=0x%x,uvaddr=0x%x\n",ipp_req.dst0.YrgbMst,ipp_req.dst0.CbrMst);
yuv_phy[0] = ipp_req.dst0.YrgbMst;
yuv_phy[1] = ipp_req.dst0.CbrMst;
@@ -2096,7 +2099,8 @@ static int fb1_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
ipp_req.flag = IPP_ROT_90;
else if(var->rotate == 270)
ipp_req.flag = IPP_ROT_270;
ipp_do_blit(&ipp_req);
//ipp_do_blit(&ipp_req);
ipp_blit_sync(&ipp_req);
fbprintk("yaddr=0x%x,uvaddr=0x%x\n",ipp_req.dst0.YrgbMst,ipp_req.dst0.CbrMst);
yuv_phy[0] = ipp_req.dst0.YrgbMst;
yuv_phy[1] = ipp_req.dst0.CbrMst;