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
This commit is contained in:
parent
97d24081da
commit
823cdec7bb
@ -143,8 +143,11 @@ vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, vm_paddr_t *paddr,
|
||||
*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);
|
||||
|
Loading…
Reference in New Issue
Block a user