Merge branch 'develop' of 10.10.10.29:/home/rockchip/kernel into develop

This commit is contained in:
yzq
2011-08-27 15:53:17 +08:00
4 changed files with 30 additions and 7 deletions

View File

@@ -1825,6 +1825,7 @@ CONFIG_VIVANTE=y
# IPP
#
CONFIG_RK29_IPP=y
CONFIG_DEINTERLACE=n
#
# CMMB

View File

@@ -34,7 +34,7 @@ struct rk29_ipp_req {
*/
uint8_t store_clip_mode;
//deinterlace_enable 1:enable 0:disable
//deinterlace_enable 0:disable 1:enable 2:query
uint8_t deinterlace_enable;
//the sum of three paras should be 32,and single para should be less than 32
uint8_t deinterlace_para0;

10
drivers/staging/rk29/ipp/Kconfig Normal file → Executable file
View File

@@ -3,6 +3,14 @@ config RK29_IPP
tristate "ROCKCHIP RK29 IPP"
default y
help
rk29 ipp module.
rk29 ipp module.
config DEINTERLACE
bool "Deinterlacing support"
depends on RK29_IPP
default y
help
Mobile phone dose not support deinterlacing
endmenu

View File

@@ -308,7 +308,7 @@ int ipp_blit(const struct rk29_ipp_req *req)
uint32_t dst0_YrgbMst=0,dst0_CbrMst=0;
uint32_t ret = 0;
uint32_t deinterlace_config = 0;
//printk("ipp_blit\n");
if (drvdata == NULL) { /* ddl@rock-chips.com : check driver is normal or not */
printk("%s drvdata is NULL, IPP driver probe is fail!!\n", __FUNCTION__);
@@ -846,8 +846,12 @@ int ipp_blit(const struct rk29_ipp_req *req)
{
deinterlace_config = (req->deinterlace_enable<<24) | (req->deinterlace_para0<<19) | (req->deinterlace_para1<<14) | (req->deinterlace_para2<<9);
DBG("para0 %d, para1 %d, para2 %d,deinterlace_config %x\n",req->deinterlace_para0,req->deinterlace_para1,req->deinterlace_para2,deinterlace_config);
ipp_write((ipp_read(IPP_CONFIG)&0xFE0001FF)|deinterlace_config, IPP_CONFIG);
//printk("IPP_CONFIG2 = 0x%x\n",ipp_read(IPP_CONFIG));
#ifdef CONFIG_DEINTERLACE
ipp_write((ipp_read(IPP_CONFIG)&0xFE0001FF)|deinterlace_config, IPP_CONFIG);
#else
printk("does not support deinterlacing!\n");
ipp_write(ipp_read(IPP_CONFIG)&(~DEINTERLACE_ENABLE), IPP_CONFIG); //disable deinterlace
#endif
}
else
{
@@ -878,6 +882,7 @@ int ipp_blit(const struct rk29_ipp_req *req)
ipp_write(ipp_read(IPP_CONFIG)&(~STORE_CLIP_MODE), IPP_CONFIG);
}
/* Start the operation */
ipp_write(8, IPP_INT);//
dsb();
@@ -932,7 +937,6 @@ int ipp_blit_sync(const struct rk29_ipp_req *req)
//printk("ipp_blit_sync -------------------\n");
////If IPP is busy now,wait until it becomes idle
mutex_lock(&drvdata->mutex);
{
@@ -1026,7 +1030,17 @@ static int stretch_blit(/*struct ipp_context *ctx,*/ unsigned long arg ,unsigne
goto err_noput;
}
if(req.deinterlace_enable==2)
{
#ifdef CONFIG_DEINTERLACE
printk("ipp support deinterlacing\n");
return 0;
#else
printk("ipp dose not support deinterlacing\n");
return -EPERM;
#endif
}
if(cmd == IPP_BLIT_SYNC)
{
ret = ipp_blit_sync(&req);