From c0c7bb6ca7a63dc52115aa52c7c5c6d194559f5f Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 2 Jul 2018 22:44:13 +0100 Subject: [PATCH] trs80m1: finish up minimal graphics reporting This doesn't address the model III hi-res graphics board --- Kernel/platform-trs80m1/devgfx.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Kernel/platform-trs80m1/devgfx.c b/Kernel/platform-trs80m1/devgfx.c index 6ea6cbaa..0542fcc3 100644 --- a/Kernel/platform-trs80m1/devgfx.c +++ b/Kernel/platform-trs80m1/devgfx.c @@ -1,8 +1,7 @@ /* - * Graphics logic for the TRS80 graphics add on board + * Graphics logic for the TRS80 2x3 block graphics * - * FIXME: - turn the gfx on/off when we switch tty - * - tie gfx to one tty and report EBUSY for the other on enable + * We don't yet address the high res board for the Model III (and I ?) */ #include @@ -13,16 +12,14 @@ static const struct display trsdisplay[1] = { { - /* Once we get around to it this is probably best described as - 128 x 96 sixel */ 0, - 64, 16, + 128, 48, 64, 16, 255, 255, - FMT_TEXT, + FMT_6PIXEL_128, HW_UNACCEL, - GFX_MULTIMODE|GFX_TEXT, - 2, + GFX_MAPPABLE|GFX_MULTIMODE|GFX_TEXT, + 1, 0 } }; @@ -32,7 +29,7 @@ static const struct videomap trsmap = { 0, 0, 0x3C00, - 0x0400, /* Directly mapped */ + 0x0400, /* Directly mapped */ 0, 0, /* No segmentation */ 1, /* Standard spacing */ MAP_FBMEM_SIMPLE|MAP_FBMEM @@ -45,7 +42,7 @@ int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr) uint8_t m; int err; - if (arg >> 8 != 0x03) + if (minor > 2 || (arg >> 8 != 0x03)) return vt_ioctl(minor, arg, ptr); switch(arg) { @@ -62,7 +59,7 @@ int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr) return 0; case GFXIOC_UNMAP: return 0; - /* Users can "map" 8) the MMIO into their process and use the + /* Users can "map" 8) the framebuffer into their process and use the card directly */ case GFXIOC_MAP: if (vmode == 0) -- 2.34.1