bool issync; //sync or async\r
bool enable; //clk enable or disable\r
int ipp_result; //0:success\r
+ int ipp_async_result; //ipp_blit_async result 0:success\r
void (*ipp_irq_callback)(int ipp_retval); //callback function used by aync call\r
};\r
\r
//printk("ipp_get_result %d\n",drvdata->ipp_result);\r
int ret =0;\r
\r
- if (unlikely(copy_to_user((void __user *)arg, &drvdata->ipp_result, sizeof(int)))) {\r
+ if (unlikely(copy_to_user((void __user *)arg, &drvdata->ipp_async_result, sizeof(int)))) {\r
printk("copy_to_user failed\n");\r
ERR("copy_to_user failed\n");\r
ret = -EFAULT; \r
}\r
- idle_condition = 1;\r
+ //idle_condition = 1;\r
//dmac_clean_range((const void*)&idle_condition,(const void*)&idle_condition+4);\r
- wake_up_interruptible_sync(&blit_wait_queue);\r
+ //wake_up_interruptible_sync(&blit_wait_queue);\r
return ret;\r
}\r
\r
return -EINVAL;\r
}\r
\r
+ if(req->src0.fmt == IPP_Y_CBCR_H2V2)\r
+ {\r
+ if (unlikely((req->src0.w&0x1 != 0) || (req->src0.h&0x1 != 0) || (req->dst0.w&0x1 != 0)) || (req->dst0.h&0x1 != 0)) {\r
+ printk("YUV420 src or dst resolution is invalid! \n");\r
+ return -EINVAL;\r
+ }\r
+ }\r
+ \r
//check src_vir_w\r
if(unlikely(req->src_vir_w < req->src0.w)){\r
printk("ipp invalid src_vir_w\n");\r
#endif \r
if (wait_ret <= 0)\r
{\r
- printk("%s wait_ret=%d,wq_condition =%d,wait_event_timeout! \n",__FUNCTION__,wait_ret,wq_condition);\r
+ printk("%s wait_ret=%d,wq_condition =%d,wait_event_timeout:%dms! \n",__FUNCTION__,wait_ret,wq_condition,req->timeout);\r
\r
if(wq_condition==0)\r
{\r
\r
static irqreturn_t rk29_ipp_irq(int irq, void *dev_id)\r
{\r
- //static int temp =0;\r
DBG("rk29_ipp_irq %d \n",irq);\r
//printk("rk29_ipp_irq %d \n",irq);\r
\r
schedule_delayed_work(&drvdata->power_off_work, msecs_to_jiffies(1000));\r
\r
drvdata->ipp_irq_callback(drvdata->ipp_result);\r
- //drvdata->ipp_irq_callback(temp);\r
\r
-\r
- //In the case of async call in kernel space,we wake up the wait queue here\r
- //In the case of async call in user space, we will wake up the wait queue until app get the result\r
- if(drvdata->ipp_irq_callback != ipp_blit_complete)\r
- {\r
- idle_condition = 1;\r
- wake_up_interruptible_sync(&blit_wait_queue);\r
- }\r
- //temp++;\r
+ //In the case of async call ,we wake up the wait queue here\r
+ drvdata->ipp_async_result = drvdata->ipp_result;\r
+ idle_condition = 1;\r
+ wake_up_interruptible_sync(&blit_wait_queue);\r
}\r
\r
\r