return __raw_readl(drvdata->rga_base + r);\r
}\r
\r
-#if defined(CONFIG_ARCH_RK30) || defined(CONFIG_ARCH_RK31)\r
+#if 1//defined(CONFIG_ARCH_RK30) || defined(CONFIG_ARCH_RK31)\r
static void rga_soft_reset(void)\r
{\r
u32 i;\r
#elif defined(CONFIG_ARCH_RK31)\r
rga_soft_reset();\r
#endif\r
+\r
+ rga_soft_reset();\r
\r
rga_write(0, RGA_MMU_CTRL);\r
\r
\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
}\r
#endif\r
\r
sah = req->src.act_h;\r
daw = req->dst.act_w;\r
dah = req->dst.act_h;\r
-\r
+ \r
do\r
{\r
if((req->render_mode == bitblt_mode) && (((saw>>1) >= daw) || ((sah>>1) >= dah)))\r
rga_del_running_list();\r
rga_try_set_reg();\r
}\r
- printk("****** rga irq prc avil ******\n");\r
+ //printk("****** rga irq prc avil ******\n");\r
mutex_unlock(&rga_service.lock);\r
\r
return IRQ_HANDLED;\r
return ret;\r
}\r
\r
- // rga_test_0();\r
+ //rga_test_0();\r
\r
INFO("Module initialized.\n");\r
\r
\r
#endif\r
\r
-unsigned int src_buf[1920*1080];\r
-unsigned int dst_buf[1920*1080];\r
+unsigned int src_buf[320*240];\r
+unsigned int dst_buf[1024*768];\r
\r
void rga_test_0(void)\r
{\r
src = src_buf;\r
dst = dst_buf;\r
\r
- memset(src_buf, 0xff, 1920*1080*4);\r
+ memset(src_buf, 0xff, 320*240*4);\r
\r
dmac_flush_range(&src_buf[0], &src_buf[1920*1080]);\r
outer_flush_range(virt_to_phys(&src_buf[0]),virt_to_phys(&src_buf[1024*1024]));\r
req.dst.act_w = 320;\r
req.dst.act_h = 240;\r
\r
- req.dst.vir_w = 800;\r
- req.dst.vir_h = 480;\r
+ req.dst.vir_w = 1024;\r
+ req.dst.vir_h = 768;\r
req.dst.x_offset = 0;\r
req.dst.y_offset = 0;\r
req.dst.yrgb_addr = (uint32_t)virt_to_phys(dst);\r
//req.dst.format = RK_FORMAT_RGB_565;\r
\r
req.clip.xmin = 0;\r
- req.clip.xmax = 799;\r
+ req.clip.xmax = 1023;\r
req.clip.ymin = 0;\r
- req.clip.ymax = 479;\r
+ req.clip.ymax = 767;\r
\r
//req.render_mode = color_fill_mode;\r
//req.fg_color = 0x80ffffff;\r
\r
//#include <linux/kernel.h>\r
#include <linux/memory.h>\r
+#include <linux/kernel.h>\r
+#include <linux/init.h>\r
+#include <linux/module.h>\r
+#include <linux/platform_device.h>\r
+#include <linux/sched.h>\r
+#include <linux/mutex.h>\r
+#include <linux/err.h>\r
+#include <linux/clk.h>\r
+#include <asm/delay.h>\r
+#include <linux/dma-mapping.h>\r
+#include <linux/delay.h>\r
+#include <asm/io.h>\r
+#include <linux/irq.h>\r
+#include <linux/interrupt.h>\r
+#include <mach/io.h>\r
+#include <mach/irqs.h>\r
+#include <linux/fs.h>\r
+#include <asm/uaccess.h>\r
+#include <linux/miscdevice.h>\r
+#include <linux/poll.h>\r
+#include <linux/delay.h>\r
+#include <linux/wait.h>\r
+#include <linux/syscalls.h>\r
+#include <linux/timer.h>\r
+#include <linux/time.h>\r
+#include <asm/cacheflush.h>\r
+#include <linux/slab.h>\r
+#include <linux/fb.h>\r
+#include <linux/wakelock.h>\r
+\r
#include "rga_reg_info.h"\r
#include "rga_rop.h"\r
#include "rga.h"\r
rop_mask_stride = (((msg->src.vir_w + 7)>>3) + 3) & (~3);//not dst_vir.w,hxx,2011.7.21\r
\r
reg = (stride >> 2) & 0xffff;\r
- reg = reg | ((rop_mask_stride>>2) << 16); \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
+ #endif\r
\r
if (msg->render_mode == line_point_drawing_mode)\r
{\r
stride = (msg->dst.vir_w * pixel_width + 3) & (~3);\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);\r
}\r
\r
\r