Provide way for framebuffer driver to request mmap(2) mapping type
authorgonzo <gonzo@FreeBSD.org>
Sat, 1 Oct 2016 17:43:02 +0000 (17:43 +0000)
committergonzo <gonzo@FreeBSD.org>
Sat, 1 Oct 2016 17:43:02 +0000 (17:43 +0000)
commite85901061be285896553c62ac6187237d18bd66c
treed6b12b90369cdb0281e6d20b7b06a143ee6cb446
parentf455ef87339e3f07f15251a5bbc0308867f11224
Provide way for framebuffer driver to request mmap(2) mapping type

On ARM if memattr is not overriden mmap(2) maps framebuffer
memory as WBWA which means part of changes to content in userland
end up in cache and appear on screen gradually as cache lines are
evicted. This change adds configurable memattr that hardware fb
implementation can set to get the memory mapping type it
requires:

- Add new flag FB_FLAG_MEMATTR that indicates that framebuffer
    driver overrides default memattr
- Add new field fb_memattr to struct fb_info to specify requested
    memattr

Reviewed by: ray
Differential Revision: https://reviews.freebsd.org/D8064
sys/dev/fb/fbd.c
sys/sys/fbio.h