Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2017 15:18:15 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r317196 - head/sys/dev/fb
Message-ID:  <201704201518.v3KFIFVk051662@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Thu Apr 20 15:18:15 2017
New Revision: 317196
URL: https://svnweb.freebsd.org/changeset/base/317196

Log:
  Write-combine framebuffer writes through user-space mappings, if possible.
  
  Note that KVA mapping of the framebuffer already uses write-combining
  mode, so the change, besides improving speed of user mode writes, also
  satisfies requirement of the IA32 architecture of using consistent
  caching modes for multiple mappings of the same page.
  
  Reported and tested by:	bde
  Sponsored by:	The FreeBSD Foundation
  MFC after:	 1 week

Modified:
  head/sys/dev/fb/vesa.c

Modified: head/sys/dev/fb/vesa.c
==============================================================================
--- head/sys/dev/fb/vesa.c	Thu Apr 20 15:06:16 2017	(r317195)
+++ head/sys/dev/fb/vesa.c	Thu Apr 20 15:18:15 2017	(r317196)
@@ -1643,6 +1643,9 @@ vesa_mmap(video_adapter_t *adp, vm_ooffs
 		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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704201518.v3KFIFVk051662>