add rga version
authorhuangdesheng <hds@rock-chips.com>
Thu, 5 Jul 2012 09:47:06 +0000 (17:47 +0800)
committerhuangdesheng <hds@rock-chips.com>
Thu, 5 Jul 2012 09:47:06 +0000 (17:47 +0800)
drivers/video/rockchip/rga/rga.h
drivers/video/rockchip/rga/rga_drv.c

index 5a1a72ad4e16dc456cc391b33e8f4b639a706f97..9b30f05045fb256e60267a698fddfb1a664605b1 100755 (executable)
@@ -7,6 +7,7 @@
 #define RGA_BLIT_ASYNC  0x5018\r
 #define RGA_FLUSH       0x5019\r
 #define RGA_GET_RESULT  0x501a\r
+#define RGA_GET_VERSION 0x501b\r
 \r
 \r
 #define RGA_REG_CTRL_LEN    0x8    /* 8  */\r
index 0474d2da293f67e48cd2830580b157d008ba1acf..74b810df0e54481544f962e642da0ef7cb90cbb5 100755 (executable)
@@ -68,6 +68,8 @@
 #define DRIVER_DESC            "RGA Device Driver"\r
 #define DRIVER_NAME            "rga"\r
 \r
+#define RGA_VERSION   "1.000"\r
+\r
 ktime_t rga_start;\r
 ktime_t rga_end;\r
 \r
@@ -954,6 +956,10 @@ static long rga_ioctl(struct file *file, uint32_t cmd, unsigned long arg)
                        break;\r
         case RGA_GET_RESULT:\r
             ret = rga_get_result(session, arg);\r
+        case RGA_GET_VERSION:\r
+            ret = copy_to_user((void *)arg, RGA_VERSION, sizeof(RGA_VERSION));\r
+            //ret = 0;\r
+            break;\r
                default:\r
                        ERR("unknown ioctl cmd!\n");\r
                        ret = -EINVAL;\r