Module Name:    src
Committed By:   tsutsui
Date:           Thu Jan 25 19:12:49 UTC 2024

Modified Files:
        src/sys/arch/vax/vsa: smg.c

Log Message:
Fix mmap(2) address for smg(4) as other framebuffers.

Now X.org server can render onto framebuffer (but inverted bitorder).
Should be pulled up to netbsd-10 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/vax/vsa/smg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/vax/vsa/smg.c
diff -u src/sys/arch/vax/vsa/smg.c:1.65 src/sys/arch/vax/vsa/smg.c:1.66
--- src/sys/arch/vax/vsa/smg.c:1.65	Sun Mar 26 15:12:34 2023
+++ src/sys/arch/vax/vsa/smg.c	Thu Jan 25 19:12:49 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: smg.c,v 1.65 2023/03/26 15:12:34 andvar Exp $ */
+/*	$NetBSD: smg.c,v 1.66 2024/01/25 19:12:49 tsutsui Exp $ */
 /*	$OpenBSD: smg.c,v 1.28 2014/12/23 21:39:12 miod Exp $	*/
 /*
  * Copyright (c) 2006, Miodrag Vallat
@@ -117,7 +117,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smg.c,v 1.65 2023/03/26 15:12:34 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smg.c,v 1.66 2024/01/25 19:12:49 tsutsui Exp $");
 
 #include "dzkbd.h"
 #include "wsdisplay.h"
@@ -475,7 +475,7 @@ smg_mmap(void *v, void *vs, off_t offset
 	if (offset >= SMSIZE || offset < 0)
 		return -1;
 
-	return SMADDR + offset;
+	return (SMADDR + offset) >> PGSHIFT;
 }
 
 static int

Reply via email to