Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Dec 2017 01:42:07 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326453 - head/sys/powerpc/mpc85xx
Message-ID:  <201712020142.vB21g795074395@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712020142.vB21g795074395>