From owner-svn-src-head@FreeBSD.ORG Wed Jul 16 18:52:22 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0ED3EBDC; Wed, 16 Jul 2014 18:52:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 F059A26F7; Wed, 16 Jul 2014 18:52:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6GIqLvL044045; Wed, 16 Jul 2014 18:52:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6GIqLEj044044; Wed, 16 Jul 2014 18:52:21 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201407161852.s6GIqLEj044044@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 16 Jul 2014 18:52:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268772 - head/sys/dev/vt/hw/efifb 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.18 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: Wed, 16 Jul 2014 18:52:22 -0000 Author: nwhitehorn Date: Wed Jul 16 18:52:21 2014 New Revision: 268772 URL: http://svnweb.freebsd.org/changeset/base/268772 Log: Allow efifb to be used with xf86-video-scfb. This is important for EFI systems without either a CSM or real graphics drivers, such as my Lenovo Haswell laptop. This provides working X with the small complication of a console cursor permanently overlaid on the upper-left corner of the screen that will be dealt with later. Also remove some redundant screen clearing. Modified: head/sys/dev/vt/hw/efifb/efifb.c Modified: head/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- head/sys/dev/vt/hw/efifb/efifb.c Wed Jul 16 18:49:46 2014 (r268771) +++ head/sys/dev/vt/hw/efifb/efifb.c Wed Jul 16 18:52:21 2014 (r268772) @@ -62,6 +62,8 @@ static struct vt_driver vt_efifb_driver .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, .vd_maskbitbltchr = vt_fb_maskbitbltchr, + .vd_fb_ioctl = vt_fb_ioctl, + .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ .vd_priority = VD_PRIORITY_GENERIC + 1, }; @@ -97,7 +99,7 @@ vt_efifb_probe(struct vt_device *vd) static int vt_efifb_init(struct vt_device *vd) { - int depth, d, i, len; + int depth, d; struct fb_info *info; struct efi_fb *efifb; caddr_t kmdp; @@ -142,12 +144,6 @@ vt_efifb_init(struct vt_device *vd) */ info->fb_vbase = PHYS_TO_DMAP(efifb->fb_addr); - /* blank full size */ - len = info->fb_size / 4; - for (i = 0; i < len; i++) { - ((uint32_t *)info->fb_vbase)[i] = 0; - } - /* Get pixel storage size. */ info->fb_bpp = info->fb_stride / info->fb_width * 8;