#include "rga_mmu_info.h"\r
#include "RGA_API.h"\r
\r
+#define RGA_TEST_CASE 0\r
+ \r
#define RGA_TEST 0\r
#define RGA_TEST_TIME 0\r
#define RGA_TEST_FLUSH_TIME 0\r
/* All CMD finish int */\r
rga_write(rga_read(RGA_INT)|(0x1<<10)|(0x1<<8), RGA_INT);\r
\r
+ #if RGA_TEST_TIME\r
+ rga_start = ktime_get();\r
+ #endif\r
+\r
/* Start proc */\r
atomic_set(®->session->done, 0);\r
rga_write(0x1, RGA_CMD_CTRL);\r
printk("*** rga_blit_sync proc ***\n");\r
print_info(req);\r
#endif\r
-\r
- #if RGA_TEST_TIME\r
- rga_start = ktime_get();\r
- #endif\r
-\r
+ \r
ret = rga_blit(session, req);\r
if(ret < 0)\r
{\r
atomic_set(&rga_session_global.num_done, 0);\r
}\r
\r
- //rga_test_0();\r
+ #if RGA_TEST_CASE\r
+ rga_test_0();\r
+ #endif\r
\r
INFO("Module initialized.\n");\r
\r
}\r
\r
\r
-#if 0\r
+#if RGA_TEST_CASE\r
\r
-#if 1\r
extern struct fb_info * rk_get_fb(int fb_id);\r
EXPORT_SYMBOL(rk_get_fb);\r
\r
extern void rk_direct_fb_show(struct fb_info * fbi);\r
EXPORT_SYMBOL(rk_direct_fb_show);\r
\r
-#endif\r
-\r
-unsigned int src_buf[1920*1080];\r
-unsigned int dst_buf[1920*1080];\r
+unsigned int src_buf[1920*1080 * 2];\r
+unsigned int dst_buf[1920*1080 * 2];\r
\r
void rga_test_0(void)\r
{\r
printk("************ RGA_TEST ************\n");\r
printk("********************************\n\n");\r
\r
- req.src.act_w = 1280;\r
- req.src.act_h = 720;\r
+ req.src.act_w = 1920;\r
+ req.src.act_h = 1080;\r
\r
- req.src.vir_w = 1280;\r
- req.src.vir_h = 720;\r
- req.src.yrgb_addr = (uint32_t)virt_to_phys(src + 128) & 0xffffffc0;\r
- req.src.uv_addr = (uint32_t)virt_to_phys(src);\r
+ req.src.vir_w = 1920;\r
+ req.src.vir_h = 1080;\r
+ req.src.yrgb_addr = ((uint32_t)(virt_to_phys(src + 1024)) & 0xfffff000);// & 0xffffffc0;\r
+ req.src.uv_addr = (uint32_t)(req.src.yrgb_addr + 1080*1920);\r
req.src.v_addr = (uint32_t)virt_to_phys(src);\r
- req.src.format = 0;\r
+ req.src.format = RK_FORMAT_YCbCr_420_SP;\r
\r
- req.dst.act_w = 1280;\r
- req.dst.act_h = 720;\r
+ req.dst.act_w = 1920;\r
+ req.dst.act_h = 1080;\r
\r
- req.dst.vir_w = 1280;\r
- req.dst.vir_h = 720;\r
+ req.dst.vir_w = 1920;\r
+ req.dst.vir_h = 1080;\r
req.dst.x_offset = 0;\r
req.dst.y_offset = 0;\r
- req.dst.yrgb_addr = (uint32_t)virt_to_phys(dst) + 8;\r
+ req.dst.yrgb_addr = ((uint32_t)virt_to_phys(dst + 256)) & 0xfffff000;\r
\r
//req.dst.format = RK_FORMAT_RGB_565;\r
\r
req.clip.xmin = 0;\r
- req.clip.xmax = 1279;\r
+ req.clip.xmax = 1919;\r
req.clip.ymin = 0;\r
- req.clip.ymax = 719;\r
+ req.clip.ymax = 1079;\r
\r
//req.render_mode = color_fill_mode;\r
//req.fg_color = 0x80ffffff;\r
\r
//req.rotate_mode = 1;\r
- // req.scale_mode = 2;\r
+ //req.scale_mode = 2;\r
\r
//req.alpha_rop_flag = 1;\r
//req.alpha_rop_mode = 0x19;\r
//req.mmu_info.mmu_en = 1;\r
\r
printk("src = %.8x\n", req.src.yrgb_addr);\r
+ printk("src = %.8x\n", req.src.uv_addr);\r
printk("dst = %.8x\n", req.dst.yrgb_addr);\r
\r
rga_blit_sync(&session, &req);\r
reg = (stride >> 2) & 0xffff;\r
reg = reg | ((rop_mask_stride>>2) << 16);\r
\r
- #if defined(CONFIG_ARCH_RK2928)\r
- reg = reg | ((msg->alpha_rop_mode & 3) << 28);\r
+ #if defined(CONFIG_ARCH_RK2928) || defined(CONFIG_ARCH_RK3188)\r
+ //reg = reg | ((msg->alpha_rop_mode & 3) << 28);\r
+ reg = reg | (1 << 28);\r
#endif\r
\r
if (msg->render_mode == line_point_drawing_mode)\r
*bRGA_DST_MST = (u32)msg->dst.yrgb_addr + (tile->dst_ctrl.y_off * stride) + (tile->dst_ctrl.x_off * pixel_width);\r
*bRGA_DST_CTR_INFO = (tile->dst_ctrl.w) | ((tile->dst_ctrl.h) << 16);\r
\r
- *bRGA_DST_CTR_INFO |= (1<<29) | (1<<28);\r
+ *bRGA_DST_CTR_INFO |= ((1<<29) | (1<<28));\r
}\r
\r
\r