Override memattr for mmap on the Freescale DIU driver

The Display Interface Unit (DIU) uses main memory for the framebuffer, which
is already mapped as cache coherent physical memory.  Prevent mmap() from
using its own attributes which may otherwise conflict.
This commit is contained in:
Justin Hibbits 2017-12-02 01:42:07 +00:00
parent 78baa4d625
commit 89c3a53299

View File

@ -414,6 +414,8 @@ diu_attach(device_t dev)
sc->sc_info.fb_vbase = (intptr_t)contigmalloc(sc->sc_info.fb_size,
M_DEVBUF, M_ZERO, 0, BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, 0);
sc->sc_info.fb_pbase = (intptr_t)vtophys(sc->sc_info.fb_vbase);
sc->sc_info.fb_flags = FB_FLAG_MEMATTR;
sc->sc_info.fb_memattr = VM_MEMATTR_DEFAULT;
/* Gamma table is 3 consecutive segments of 256 bytes. */
sc->sc_gamma = contigmalloc(3 * 256, M_DEVBUF, 0, 0,