video/rockchip: rga2: fixup compile problem

Change-Id: I78cc0702febba4ee4b48d05ed8f49ed8b5451208
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
This commit is contained in:
putinlee
2017-10-27 16:42:20 +08:00
committed by Tao Huang
parent b6cf748ac0
commit 8c8e830920
3 changed files with 16 additions and 22 deletions

View File

@@ -74,7 +74,7 @@ int rga2_flag;
int first_RGA2_proc;
rga2_session rga2_session_global;
long (*rga_ioctl_kernel_p)(struct rga_req *);
long (*rga2_ioctl_kernel_p)(struct rga_req *);
struct rga2_drvdata_t {
struct miscdevice miscdev;
@@ -225,11 +225,11 @@ static void rga2_dump(void)
printk("task_running %d\n", running);
list_for_each_entry_safe(reg, reg_tmp, &session->waiting, session_link)
{
printk("waiting register set 0x%.lu\n", (unsigned long)reg);
printk("waiting register set 0x %.lu\n", (unsigned long)reg);
}
list_for_each_entry_safe(reg, reg_tmp, &session->running, session_link)
{
printk("running register set 0x%.lu\n", (unsigned long)reg);
printk("running register set 0x %.lu\n", (unsigned long)reg);
}
}
}
@@ -452,8 +452,7 @@ static struct rga2_reg * rga2_reg_init(rga2_session *session, struct rga2_req *r
ret = rga2_set_mmu_info(reg, req);
if(ret < 0) {
printk("%s, [%d] set mmu info error \n", __FUNCTION__, __LINE__);
if(reg != NULL)
kfree(reg);
kfree(reg);
return NULL;
}
@@ -461,8 +460,7 @@ static struct rga2_reg * rga2_reg_init(rga2_session *session, struct rga2_req *r
if(RGA2_gen_reg_info((uint8_t *)reg->cmd_reg, req) == -1) {
printk("gen reg info error\n");
if(reg != NULL)
kfree(reg);
kfree(reg);
return NULL;
}
@@ -1358,7 +1356,7 @@ static int rga2_drv_probe(struct platform_device *pdev)
rga2_service.last_prc_src_format = 1; /* default is yuv first*/
rga2_service.enable = false;
rga_ioctl_kernel_p = rga2_ioctl_kernel;
rga2_ioctl_kernel_p = rga2_ioctl_kernel;
data = devm_kzalloc(&pdev->dev, sizeof(struct rga2_drvdata_t), GFP_KERNEL);
if(NULL == data)
@@ -1457,7 +1455,7 @@ static int rga2_drv_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
#endif
kfree(data);
//kfree(data);
return 0;
}
@@ -1465,7 +1463,6 @@ static struct platform_driver rga2_driver = {
.probe = rga2_drv_probe,
.remove = rga2_drv_remove,
.driver = {
.owner = THIS_MODULE,
.name = "rga2",
.of_match_table = of_match_ptr(rockchip_rga_dt_ids),
},
@@ -1530,8 +1527,7 @@ static void __exit rga2_exit(void)
{
rga2_power_off();
if (rga2_mmu_buf.buf_virtual)
kfree(rga2_mmu_buf.buf_virtual);
kfree(rga2_mmu_buf.buf_virtual);
platform_driver_unregister(&rga2_driver);
}
@@ -1672,10 +1668,8 @@ void rga2_test_0(void)
}
#endif
if(src)
kfree(src);
if(dst)
kfree(dst);
kfree(src);
kfree(dst);
}
#endif

View File

@@ -34,7 +34,7 @@
//#include "../rga/rga_rop.h"
#include "rga2.h"
extern unsigned int ROP3_code[256];
extern unsigned int rga2_ROP3_code[256];
void
RGA2_reg_get_param(unsigned char *base, struct rga2_req *msg)
@@ -638,14 +638,14 @@ RGA2_set_reg_rop_info(u8 *base, struct rga2_req *msg)
bRGA_PAT_CON = (RK_U32 *)(base + RGA2_PAT_CON_OFFSET);
if(msg->rop_mode == 0) {
rop_code0 = ROP3_code[(msg->rop_code & 0xff)];
rop_code0 = rga2_ROP3_code[(msg->rop_code & 0xff)];
}
else if(msg->rop_mode == 1) {
rop_code0 = ROP3_code[(msg->rop_code & 0xff)];
rop_code0 = rga2_ROP3_code[(msg->rop_code & 0xff)];
}
else if(msg->rop_mode == 2) {
rop_code0 = ROP3_code[(msg->rop_code & 0xff)];
rop_code1 = ROP3_code[(msg->rop_code & 0xff00)>>8];
rop_code0 = rga2_ROP3_code[(msg->rop_code & 0xff)];
rop_code1 = rga2_ROP3_code[(msg->rop_code & 0xff00)>>8];
}
*bRGA_ROP_CTRL0 = rop_code0;

View File

@@ -1,7 +1,7 @@
#ifndef __RGA_ROP_H__
#define __RGA_ROP_H__
unsigned int ROP3_code[256] =
unsigned int rga2_ROP3_code[256] =
{
0x00000007, 0x00000451, 0x00006051, 0x00800051, 0x00007041, 0x00800041, 0x00804830, 0x000004f0,//0
0x00800765, 0x000004b0, 0x00000065, 0x000004f4, 0x00000075, 0x000004e6, 0x00804850, 0x00800005,