Author: gonzo
Date: Wed Oct 19 02:15:41 2016
New Revision: 307596
URL: https://svnweb.freebsd.org/changeset/base/307596

Log:
  MFC r306557, r307240, r307241:
  
  r306557:
  Use VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer
  
  VM_MEMATTR_WRITE_COMBINING sets write-through cache flag for framebuffer
  memory that prevents pixel data from being stuck in cache until evicition
  happens
  
  r307240:
  Fix BCM238x framebuffer driver build for ARM64
  
  VM_MEMATTR_WRITE_COMBINING can be undefined for some platforms, use it only
  if it's defined
  
  r307241:
  Do not set FB_FLAG_MEMATTR if VM_MEMATTR_WRITE_COMBINING is not available
  
  Pintyhat to: gonzo
  Spotted by: jmallett

Modified:
  stable/11/sys/arm/broadcom/bcm2835/bcm2835_fbd.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_fbd.c
==============================================================================
--- stable/11/sys/arm/broadcom/bcm2835/bcm2835_fbd.c    Wed Oct 19 02:14:04 
2016        (r307595)
+++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_fbd.c    Wed Oct 19 02:15:41 
2016        (r307596)
@@ -119,6 +119,10 @@ bcm_fb_setup_fbd(struct bcmsc_softc *sc)
        sc->info.fb_stride = fb.pitch;
        sc->info.fb_width = fb.xres;
        sc->info.fb_height = fb.yres;
+#ifdef VM_MEMATTR_WRITE_COMBINING
+       sc->info.fb_flags = FB_FLAG_MEMATTR;
+       sc->info.fb_memattr = VM_MEMATTR_WRITE_COMBINING;
+#endif
 
        if (sc->fbswap) {
                switch (sc->info.fb_bpp) {
_______________________________________________
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