vt.c: VT_WIDTH (framebuffer stride) and VT_HEIGHT (obsolete) cleanup
authorTormod Volden <debian.tormod@gmail.com>
Thu, 3 Nov 2016 23:19:47 +0000 (00:19 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 4 Nov 2016 19:13:36 +0000 (19:13 +0000)
VT_WIDTH is the framebuffer stride / pitch for the CONFIG_VT_SIMPLE
case and not the screen width. VT_HEIGHT is not needed since it is
always VT_BOTTOM + 1.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Kernel/PORTING
Kernel/vt.c

index 318b030..271ef00 100644 (file)
@@ -82,7 +82,10 @@ Porting Fuzix to a new Z80 based machine generally requires the following
  that uses your map_process/map_kernel functions.
 
  CONFIG_VT
- VT_WIDTH, VT_HEIGHT, VT_RIGHT, VT_BOTTOM
+ VT_RIGHT, VT_BOTTOM
+
+ CONFIG_VT_SIMPLE
+ VT_WIDTH (framebuffer stride)
 
  Include a standard virtual terminal core based upon VT52 emulation
 
index 6f98d04..534681a 100644 (file)
@@ -160,7 +160,7 @@ static int escout(unsigned char c)
                return 0;
        }
        if (c == 'E') {
-               clear_lines(0, VT_HEIGHT);
+               clear_lines(0, VT_BOTTOM + 1);
                return 0;
        }
        if (c == 'H') {
@@ -298,7 +298,7 @@ int vt_ioctl(uint8_t minor, uarg_t request, char *data)
                                return 0;
 #endif                                 
                        case VTSIZE:
-                               return VT_HEIGHT << 8 | VT_WIDTH;
+                               return (VT_BOTTOM + 1) << 8 | (VT_RIGHT + 1);
                        case VTATTRS:
                                return vtattr_cap;
                }
@@ -341,7 +341,7 @@ int vt_inproc(uint8_t minor, unsigned char c)
 void vtinit(void)
 {
        vtmode = 0;
-       clear_lines(0, VT_HEIGHT);
+       clear_lines(0, VT_BOTTOM + 1);
        cursor_on(0, 0);
 }