summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2017-04-27 12:15:15 +0000
committerkib <kib@FreeBSD.org>2017-04-27 12:15:15 +0000
commit38c7b2c97edf2139f912392350530a9ffae89d8d (patch)
tree55c3e82f62972586d449fe6b90bb61a91c783c2e
parenteae5c4881723780e3c97cd05ec06fe55bc8f0c45 (diff)
downloadFreeBSD-src-38c7b2c97edf2139f912392350530a9ffae89d8d.zip
FreeBSD-src-38c7b2c97edf2139f912392350530a9ffae89d8d.tar.gz
MFC r317196:
Write-combine framebuffer writes through user-space mappings, if possible.
-rw-r--r--sys/dev/fb/vesa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c
index bd4b261..a0cd0ca 100644
--- a/sys/dev/fb/vesa.c
+++ b/sys/dev/fb/vesa.c
@@ -1636,6 +1636,9 @@ vesa_mmap(video_adapter_t *adp, vm_ooffset_t offset, vm_paddr_t *paddr,
if (offset > adp->va_window_size - PAGE_SIZE)
return (-1);
*paddr = adp->va_info.vi_buffer + offset;
+#ifdef VM_MEMATTR_WRITE_COMBINING
+ *memattr = VM_MEMATTR_WRITE_COMBINING;
+#endif
return (0);
}
return ((*prevvidsw->mmap)(adp, offset, paddr, prot, memattr));
OpenPOWER on IntegriCloud