add a ioctl case in fb0, return current screen type
authorzyw <zyw@rock-chips.com>
Mon, 18 Apr 2011 07:50:19 +0000 (15:50 +0800)
committerzyw <zyw@rock-chips.com>
Mon, 18 Apr 2011 07:50:19 +0000 (15:50 +0800)
drivers/video/rk29_fb.c
include/linux/fb.h

index 7dc827a35c53438262e601d6e85834f5136f1103..7f41873da73333012af7807ccbfe7fe06fcbe953 100755 (executable)
@@ -1549,9 +1549,11 @@ static int fb0_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
            break;
        case FBIOPUT_FBPHYADD:
         return info->fix.smem_start;
-   case FBIOGET_OVERLAY_STATE:
+    case FBIOGET_OVERLAY_STATE:
         return inf->video_mode;
-
+    case FBIOGET_SCREEN_STATE:
+        return inf->cur_screen->type;
+        
        case FBIOPUT_SET_CURSOR_EN:
                {
                        int en;
index 8d21255801e5102a1e397a2424d5f146f46e11a0..6181f1baafa7606b5dd06f0a995ebd6cdbd4d0aa 100755 (executable)
@@ -46,6 +46,7 @@ struct dentry;
 #define FBIOPUT_MODEINFO        0x4617
 #define FBIOGET_DISPINFO        0x4618
 #define FBIOGET_OVERLAY_STATE   0X4619
+#define FBIOGET_SCREEN_STATE    0X4620
 
 
 #define FB_TYPE_PACKED_PIXELS          0       /* Packed Pixels        */