From owner-svn-src-head@freebsd.org Thu Apr 20 17:22:04 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 82A81D48D6B; Thu, 20 Apr 2017 17:22:04 +0000 (UTC) (envelope-from bde@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 35EDFF3A; Thu, 20 Apr 2017 17:22:04 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3KHM3qa005532; Thu, 20 Apr 2017 17:22:03 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3KHM3CY005531; Thu, 20 Apr 2017 17:22:03 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201704201722.v3KHM3CY005531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Thu, 20 Apr 2017 17:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317199 - head/sys/dev/syscons 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 17:22:04 -0000 Author: bde Date: Thu Apr 20 17:22:03 2017 New Revision: 317199 URL: https://svnweb.freebsd.org/changeset/base/317199 Log: Eliminate the ega renderer switch. It did nothing useful except hold a pointer to the main ega drawing method which is misoptimized be in a different function than the main vga planar mode drawing method. Vga initialization handles everything with no extra code except for selecting the different function. Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Thu Apr 20 16:34:09 2017 (r317198) +++ head/sys/dev/syscons/scvgarndr.c Thu Apr 20 17:22:03 2017 (r317199) @@ -111,19 +111,6 @@ RENDERER(ega, 0, txtrndrsw, vga_set); RENDERER(vga, 0, txtrndrsw, vga_set); #ifdef SC_PIXEL_MODE -static sc_rndr_sw_t egarndrsw = { - (vr_init_t *)vga_nop, - vga_pxlclear_planar, - vga_pxlborder_planar, - vga_egadraw, - vga_pxlcursor_shape, - vga_pxlcursor_planar, - vga_pxlblink_planar, - (vr_set_mouse_t *)vga_nop, - vga_pxlmouse_planar, -}; -RENDERER(ega, PIXEL_MODE, egarndrsw, vga_set); - static sc_rndr_sw_t vgarndrsw = { vga_rndrinit, (vr_clear_t *)vga_nop, @@ -135,6 +122,7 @@ static sc_rndr_sw_t vgarndrsw = { (vr_set_mouse_t *)vga_nop, (vr_draw_mouse_t *)vga_nop, }; +RENDERER(ega, PIXEL_MODE, vgarndrsw, vga_set); RENDERER(vga, PIXEL_MODE, vgarndrsw, vga_set); #endif /* SC_PIXEL_MODE */ @@ -536,7 +524,10 @@ vga_rndrinit(scr_stat *scp) if (scp->sc->adp->va_info.vi_mem_model == V_INFO_MM_PLANAR) { scp->rndr->clear = vga_pxlclear_planar; scp->rndr->draw_border = vga_pxlborder_planar; - scp->rndr->draw = vga_vgadraw_planar; + if (scp->sc->adp->va_type == KD_VGA) + scp->rndr->draw = vga_egadraw; + else + scp->rndr->draw = vga_vgadraw_planar; scp->rndr->draw_cursor = vga_pxlcursor_planar; scp->rndr->blink_cursor = vga_pxlblink_planar; scp->rndr->draw_mouse = vga_pxlmouse_planar;