From owner-svn-src-head@FreeBSD.ORG Tue Aug 6 03:09:45 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 77FC74F9; Tue, 6 Aug 2013 03:09:45 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 644D924B2; Tue, 6 Aug 2013 03:09:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7639jXY020051; Tue, 6 Aug 2013 03:09:45 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7639jTi020050; Tue, 6 Aug 2013 03:09:45 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201308060309.r7639jTi020050@svn.freebsd.org> From: Justin Hibbits Date: Tue, 6 Aug 2013 03:09:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253979 - head/sys/powerpc/ofw 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.14 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: Tue, 06 Aug 2013 03:09:45 -0000 Author: jhibbits Date: Tue Aug 6 03:09:44 2013 New Revision: 253979 URL: http://svnweb.freebsd.org/changeset/base/253979 Log: Micro-optimize OFW syscons 8-bit blank. MFC after: 1 week Modified: head/sys/powerpc/ofw/ofw_syscons.c Modified: head/sys/powerpc/ofw/ofw_syscons.c ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.c Tue Aug 6 02:58:16 2013 (r253978) +++ head/sys/powerpc/ofw/ofw_syscons.c Tue Aug 6 03:09:44 2013 (r253979) @@ -586,14 +586,22 @@ ofwfb_blank_display8(video_adapter_t *ad { struct ofwfb_softc *sc; int i; - uint8_t *addr; + uint32_t *addr; + uint32_t color; + uint32_t end; sc = (struct ofwfb_softc *)adp; - addr = (uint8_t *) sc->sc_addr; + addr = (uint32_t *) sc->sc_addr; + end = (sc->sc_stride/4) * sc->sc_height; + + /* Splat 4 pixels at once. */ + color = (ofwfb_background(SC_NORM_ATTR) << 24) | + (ofwfb_background(SC_NORM_ATTR) << 16) | + (ofwfb_background(SC_NORM_ATTR) << 8) | + (ofwfb_background(SC_NORM_ATTR)); - /* Could be done a lot faster e.g. 32-bits, or Altivec'd */ - for (i = 0; i < sc->sc_stride*sc->sc_height; i++) - *(addr + i) = ofwfb_background(SC_NORM_ATTR); + for (i = 0; i < end; i++) + *(addr + i) = color; return (0); }