From 2dbf5fb6e0caec27c1ade001e2b7e5da910c0f4e Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 3 Oct 2015 11:01:30 +0100 Subject: [PATCH] nc100: update test graphics code Add mode number X and Y need to be 16bit --- Kernel/platform-nc100/devgfx.c | 8 +++++--- Kernel/platform-nc100/nc100.s | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Kernel/platform-nc100/devgfx.c b/Kernel/platform-nc100/devgfx.c index ac5b3bcf..e9268dbd 100644 --- a/Kernel/platform-nc100/devgfx.c +++ b/Kernel/platform-nc100/devgfx.c @@ -10,6 +10,7 @@ #ifdef CONFIG_NC100 static struct display ncdisplay = { + 0, 480, 64, 512, 64, 0xFF, 0xFF, /* For now */ @@ -21,14 +22,15 @@ static struct display ncdisplay = { }; #else static struct display ncdisplay = { + 0, 480, 128, 512, 128, 0xFF, 0xFF, /* For now */ FMT_MONO_WB, HW_UNACCEL, + GFX_TEXT, 0, - 0, - GFX_DRAW + GFX_DRAW, }; #endif @@ -46,7 +48,7 @@ int gfx_ioctl(uint8_t minor, uarg_t arg, char *ptr) /* Note: we assume we will not map the screen over the buffers */ tmp = (uint8_t *)tmpbuf(); l = ugetw(ptr); - if (l < 2 || l > 512) + if (l < 6 || l > 512) goto bad; if (uget(tmp, ptr + 2, l)) goto bad2; diff --git a/Kernel/platform-nc100/nc100.s b/Kernel/platform-nc100/nc100.s index 39d085a2..b3c19660 100644 --- a/Kernel/platform-nc100/nc100.s +++ b/Kernel/platform-nc100/nc100.s @@ -574,7 +574,10 @@ _video_cmd: push af ld e,(hl) inc hl + inc hl ld d,(hl) + inc hl + inc hl call addr_de ; turn DE into screen address (HL is kept) nextline: push de -- 2.34.1