From owner-svn-src-all@freebsd.org Wed Dec 6 02:06:16 2017 Return-Path: Delivered-To: svn-src-all@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 213A0E8BD31; Wed, 6 Dec 2017 02:06:16 +0000 (UTC) (envelope-from jhibbits@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 E1FF57E193; Wed, 6 Dec 2017 02:06:15 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB626Fxp036433; Wed, 6 Dec 2017 02:06:15 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB626Fn8036432; Wed, 6 Dec 2017 02:06:15 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201712060206.vB626Fn8036432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 6 Dec 2017 02:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326612 - head/sys/dev/vt/hw/fb X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/vt/hw/fb X-SVN-Commit-Revision: 326612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 02:06:16 -0000 Author: jhibbits Date: Wed Dec 6 02:06:14 2017 New Revision: 326612 URL: https://svnweb.freebsd.org/changeset/base/326612 Log: Allow custom overrides of mmap attribute for VT framebuffer Summary: As in /dev/fb, allow the framebuffer driver to override the default memattr for mmap(2). This is analogous to the change in 306555. Reviewed By: ray Differential Revision: https://reviews.freebsd.org/D13331 Modified: head/sys/dev/vt/hw/fb/vt_fb.c Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Wed Dec 6 02:05:21 2017 (r326611) +++ head/sys/dev/vt/hw/fb/vt_fb.c Wed Dec 6 02:06:14 2017 (r326612) @@ -143,8 +143,11 @@ vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, *paddr = vtophys((uint8_t *)info->fb_vbase + offset); } else { *paddr = info->fb_pbase + offset; + if (info->fb_flags & FB_FLAG_MEMATTR) + *memattr = info->fb_memattr; #ifdef VM_MEMATTR_WRITE_COMBINING - *memattr = VM_MEMATTR_WRITE_COMBINING; + else + *memattr = VM_MEMATTR_WRITE_COMBINING; #endif } return (0);