Author: jhibbits
Date: Sat Dec  2 01:42:07 2017
New Revision: 326453
URL: https://svnweb.freebsd.org/changeset/base/326453

Log:
  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.

Modified:
  head/sys/powerpc/mpc85xx/fsl_diu.c

Modified: head/sys/powerpc/mpc85xx/fsl_diu.c
==============================================================================
--- head/sys/powerpc/mpc85xx/fsl_diu.c  Sat Dec  2 01:10:45 2017        
(r326452)
+++ head/sys/powerpc/mpc85xx/fsl_diu.c  Sat Dec  2 01:42:07 2017        
(r326453)
@@ -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,
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to