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);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to