From owner-svn-src-head@freebsd.org Thu Apr 20 15:18:16 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83795D48B1E; Thu, 20 Apr 2017 15:18:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55C007F1; Thu, 20 Apr 2017 15:18:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3KFIFlg051663; Thu, 20 Apr 2017 15:18:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3KFIFVk051662; Thu, 20 Apr 2017 15:18:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201704201518.v3KFIFVk051662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 20 Apr 2017 15:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317196 - head/sys/dev/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Apr 2017 15:18:16 -0000 Author: kib Date: Thu Apr 20 15:18:15 2017 New Revision: 317196 URL: https://svnweb.freebsd.org/changeset/base/317196 Log: Write-combine framebuffer writes through user-space mappings, if possible. Note that KVA mapping of the framebuffer already uses write-combining mode, so the change, besides improving speed of user mode writes, also satisfies requirement of the IA32 architecture of using consistent caching modes for multiple mappings of the same page. Reported and tested by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Thu Apr 20 15:06:16 2017 (r317195) +++ head/sys/dev/fb/vesa.c Thu Apr 20 15:18:15 2017 (r317196) @@ -1643,6 +1643,9 @@ vesa_mmap(video_adapter_t *adp, vm_ooffs if (offset > adp->va_window_size - PAGE_SIZE) return (-1); *paddr = adp->va_info.vi_buffer + offset; +#ifdef VM_MEMATTR_WRITE_COMBINING + *memattr = VM_MEMATTR_WRITE_COMBINING; +#endif return (0); } return ((*prevvidsw->mmap)(adp, offset, paddr, prot, memattr));