From dc0432c029400cbb28978286ff716944294517bb Mon Sep 17 00:00:00 2001 From: Daniel Willmann <daniel@totalueberwachung.de> Date: Sat, 3 May 2014 02:06:39 +0200 Subject: [PATCH] mensactrl: Add a blank 8th row so we don't duplicate the 7th vblank can not be disabled and if we don't clear the shift registers before their content will bleed into the first row. --- src/mensactrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mensactrl.c b/src/mensactrl.c index 6a89144..190e57b 100644 --- a/src/mensactrl.c +++ b/src/mensactrl.c @@ -123,7 +123,7 @@ static struct mensa_fb *setup_fb(const char *devname, int hmodules, int vmodules } memset(mensafb->inputfb, 0, mensafb->x_res * mensafb->y_res); - mensafb->fbmem=mmap(NULL, mensafb->size * 2, + mensafb->fbmem=mmap(NULL, mensafb->size * 2 + mensafb->x_res * LINES_PER_MODULE * 2, PROT_READ|PROT_WRITE, MAP_SHARED, mensafb->fd, 0); if (mensafb->fbmem==NULL) { perror("mmap'ing fb"); @@ -131,7 +131,7 @@ static struct mensa_fb *setup_fb(const char *devname, int hmodules, int vmodules free(mensafb); exit(1); } - for (i = 0; i < mensafb->size ; i++) + for (i = 0; i < mensafb->size + mensafb->x_res * LINES_PER_MODULE; i++) mensafb->fbmem[i] = ((6 + i / (mensafb->x_res * LINES_PER_MODULE)) % 7)<<5; mensafb->hmodules = hmodules; -- GitLab