ubee: plug in video change
authorAlan Cox <alan@linux.intel.com>
Sun, 13 May 2018 17:43:56 +0000 (18:43 +0100)
committerAlan Cox <alan@linux.intel.com>
Sun, 13 May 2018 17:43:56 +0000 (18:43 +0100)
Kernel/platform-ubee/devtty.c
Kernel/platform-ubee/devtty.h
Kernel/platform-ubee/ubee.s

index 93f744b..5c8d94c 100644 (file)
@@ -262,7 +262,7 @@ void lpen_kbd_poll(void)
        lpen_kbd_last = 0xFF;
 }
 
-static const struct display display[2] = {
+static const struct display display[3] = {
     /* 80 x 25 */
     {
         0,
@@ -359,7 +359,11 @@ int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr)
         }
         if (arg == GFXIOC_GETMODE)
             return uput(&display[m], ptr, sizeof(struct display));
-//TODO        vt_modeset(m);
+        if (m == 2)
+               video_40();
+       else
+               video_80();
+       ctc_load(ctc6545 + 16 * m);
         return 0;
     }
     }
index 07975b7..7eef0b0 100644 (file)
@@ -24,5 +24,7 @@ extern void unmap_video_font(void);
 
 extern void ctc_load(uint8_t *map);
 extern uint8_t ctc6545[48];
+extern void video_40(void);
+extern void video_80(void);
 
 #endif
index 01d8911..412e231 100644 (file)
@@ -560,6 +560,8 @@ scanner_done:
            .globl _vwrite
            .globl _map_video_font
            .globl _unmap_video_font
+           .globl _video_40
+           .globl _video_80
 
            .globl ___hard_di
 
@@ -767,6 +769,14 @@ _unmap_video_font:
            out (0x50),a
            ei
            ret
+_video_40:
+           ld a,#1
+           jr _video_set
+_video_80:
+           xor a
+_video_set:
+           in a,(9)
+           ret
 ;
 ;      Ensure these are in the video mapping
 ;