summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-01-31 15:30:30 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-01-31 15:30:30 +0000
commitcf56c10a1b741de3c33d13f79cc2ba5faf03cacd (patch)
tree43d5eeddb2d721777f6d12c131669f5b3ab875e5 /sys
parent7e65c5efb9bb05baffb2412e0a33dab5ed8ef72e (diff)
Return a correct address in smfb_mmap(), allows X to work with wsfb.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/loongson/dev/smfb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/loongson/dev/smfb.c b/sys/arch/loongson/dev/smfb.c
index 683c7dfa376..5d0d2910981 100644
--- a/sys/arch/loongson/dev/smfb.c
+++ b/sys/arch/loongson/dev/smfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smfb.c,v 1.1 2009/12/25 21:19:32 miod Exp $ */
+/* $OpenBSD: smfb.c,v 1.2 2010/01/31 15:30:29 miod Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -247,7 +247,7 @@ smfb_mmap(void *v, off_t offset, int prot)
if (offset < 0 || offset >= ri->ri_stride * ri->ri_height)
return -1;
- pa = XKPHYS_TO_PHYS((paddr_t)ri->ri_hw) + offset;
+ pa = XKPHYS_TO_PHYS((paddr_t)ri->ri_bits) + offset;
return atop(pa);
}