\r
int rga_num = 0;\r
\r
-rga_session *rga_session_global;\r
+rga_session rga_session_global;\r
\r
struct rga_drvdata {\r
struct miscdevice miscdev;\r
printk("clip.xmin = %d, clip.xmax = %d. clip.ymin = %d, clip.ymax = %d\n",\r
req->clip.xmin, req->clip.xmax, req->clip.ymin, req->clip.ymax);\r
\r
- printk("alpha_rop_flag = %.8x\n", req->alpha_rop_flag);\r
- printk("alpha_rop_mode = %.8x\n", req->alpha_rop_mode);\r
- printk("PD_mode = %.8x\n", req->PD_mode);\r
+ //printk("alpha_rop_flag = %.8x\n", req->alpha_rop_flag);\r
+ //printk("alpha_rop_mode = %.8x\n", req->alpha_rop_mode);\r
+ //printk("PD_mode = %.8x\n", req->PD_mode);\r
}\r
#endif\r
\r
\r
mutex_lock(&rga_service.mutex);\r
\r
- session = (rga_session *)rga_session_global;\r
+ session = &rga_session_global;\r
\r
if (NULL == session)\r
{\r
\r
file->private_data = (void *)session;\r
\r
- rga_session_global = session;\r
-\r
//DBG("*** rga dev opened by pid %d *** \n", session->pid);\r
return nonseekable_open(inode, file);\r
\r
return ret;\r
}\r
\r
+ {\r
+ rga_session_global.pid = 0x0000ffff;\r
+ INIT_LIST_HEAD(&rga_session_global.waiting);\r
+ INIT_LIST_HEAD(&rga_session_global.running);\r
+ INIT_LIST_HEAD(&rga_session_global.list_session);\r
+ init_waitqueue_head(&rga_session_global.wait);\r
+ //mutex_lock(&rga_service.lock);\r
+ list_add_tail(&rga_session_global.list_session, &rga_service.session);\r
+ //mutex_unlock(&rga_service.lock);\r
+ atomic_set(&rga_session_global.task_running, 0);\r
+ atomic_set(&rga_session_global.num_done, 0);\r
+ }\r
+\r
//rga_test_0();\r
\r
INFO("Module initialized.\n");\r