From owner-freebsd-arch@FreeBSD.ORG Sun Mar 2 16:55:17 2014 Return-Path: Delivered-To: freebsd-arch@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 ESMTPS id 1DF98A37 for ; Sun, 2 Mar 2014 16:55:17 +0000 (UTC) Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E2E4E12ED for ; Sun, 2 Mar 2014 16:55:16 +0000 (UTC) Received: by mail-pd0-f182.google.com with SMTP id g10so2779857pdj.27 for ; Sun, 02 Mar 2014 08:55:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; bh=968Hb13M3Ejw8ied2GV49G6bFKVCS5bA/JcgnSOK5wU=; b=rg899mTnyf0CYYCVDaW3kf4ubMDADpxF8aAjeSJZTLfC50OF4ucg3qNu4tng0v/bAX Uv5WEKV5qXmvSccUiRB5ZOVG7WvGW8VLfcr18N5DazJuvDsxHnnkYDNi3m3QubV7C6PM 5EojXJWMNcve68OZmg/yYhCCNJFZ4p6FZwHLt+rpLlh5AZycLTyfYpHAIBptb8kqfMg4 1QIxsNPXsFa2h3wUghA3Se+othmhTCVxauyQSanGI0ohkHUOAvafpkVpbV7+QYO2EEN7 +t3NE9LS31eZGUHvx7jlu3RQvniX3EFtSWh/ZFeKmXVTwTV8jiwzWDZ9cw/gQ57hofuj 0gAQ== X-Received: by 10.67.23.135 with SMTP id ia7mr14648483pad.5.1393779316587; Sun, 02 Mar 2014 08:55:16 -0800 (PST) Received: from zhabar.gateway.2wire.net (76-253-2-5.lightspeed.sntcca.sbcglobal.net. [76.253.2.5]) by mx.google.com with ESMTPSA id qf7sm65226582pac.14.2014.03.02.08.55.15 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sun, 02 Mar 2014 08:55:16 -0800 (PST) Sender: Justin Hibbits Date: Sun, 2 Mar 2014 08:55:11 -0800 From: jhibbits@freebsd.org To: Subject: newcons fb driver Message-ID: <20140302085511.6354f9ac@zhabar.gateway.2wire.net> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; powerpc64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 16:55:17 -0000 I've been looking into the slowness of the newcons framebuffer backend, and after discussing with Nathan Whitehorn, we've determined that the slowness is caused by single byte writes to the framebuffer, which are very much suboptimal. His conclusion is that, on nVidia hardware, the card first performs a read, a very slow operation on the hardware, then a single-byte write, and I'm thinking the same. So, to accomodate this limitation, I have a question and proposal: (q) From looking at the code, it appears to support, to some degree, a background image (the character blitting uses a mask, it doesn't just write background in that mask). Is this truly the case? (p) If it is the case that it supports a background image, I'm thinking it would make sense to buffer the framebuffer, such that we write to the internal representation, and blit whole words or lines at a time to the hardware. With an 8-bit buffer, at 1920x1080 (common resolution) we would be using approximately 2MB for the buffer. On memory constrained devices this can be quite significant, so it becomes a tradeoff. Thoughts? - Justin