Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Dec 2017 02:06:15 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326612 - head/sys/dev/vt/hw/fb
Message-ID:  <201712060206.vB626Fn8036432@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Wed Dec  6 02:06:14 2017
New Revision: 326612
URL: https://svnweb.freebsd.org/changeset/base/326612

Log:
  Allow custom overrides of mmap attribute for VT framebuffer
  
  Summary:
  As in /dev/fb, allow the framebuffer driver to override the default memattr for
  mmap(2).  This is analogous to the change in 306555.
  
  Reviewed By: ray
  Differential Revision: https://reviews.freebsd.org/D13331

Modified:
  head/sys/dev/vt/hw/fb/vt_fb.c

Modified: head/sys/dev/vt/hw/fb/vt_fb.c
==============================================================================
--- head/sys/dev/vt/hw/fb/vt_fb.c	Wed Dec  6 02:05:21 2017	(r326611)
+++ head/sys/dev/vt/hw/fb/vt_fb.c	Wed Dec  6 02:06:14 2017	(r326612)
@@ -143,8 +143,11 @@ vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, 
 			*paddr = vtophys((uint8_t *)info->fb_vbase + offset);
 		} else {
 			*paddr = info->fb_pbase + offset;
+			if (info->fb_flags & FB_FLAG_MEMATTR)
+				*memattr = info->fb_memattr;
 #ifdef VM_MEMATTR_WRITE_COMBINING
-			*memattr = VM_MEMATTR_WRITE_COMBINING;
+			else
+				*memattr = VM_MEMATTR_WRITE_COMBINING;
 #endif
 		}
 		return (0);



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