From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 25 09:53:16 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 70370994; Mon, 25 Feb 2013 09:53:16 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 845C2924; Mon, 25 Feb 2013 09:53:14 +0000 (UTC) Received: from terran (unknown [192.168.99.1]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 6EF50C4946; Mon, 25 Feb 2013 11:53:07 +0200 (EET) Date: Mon, 25 Feb 2013 11:53:40 +0200 From: Aleksandr Rybalko To: Julian Elischer Subject: Re: Scrolling in framebuffer syscons Message-Id: <20130225115340.28ce773b2a7f305cc519de11@ddteam.net> In-Reply-To: <51293505.1030706@freebsd.org> References: <511F879C.3030801@mail.ru> <51217854.8000508@freebsd.org> <5123D941.2050906@mail.ru> <51293505.1030706@freebsd.org> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Phileas Fogg , Oleksandr Tymoshenko , freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2013 09:53:16 -0000 On Sat, 23 Feb 2013 13:30:45 -0800 Julian Elischer wrote: > On 2/19/13 11:57 AM, Phileas Fogg wrote: > > Oleksandr Tymoshenko wrote: > >> On 2/16/2013 5:20 AM, Phileas Fogg wrote: > >>> Hi, > >>> > >>> i have a question about how the scrolling in a framebuffer syscons > >>> works. > >>> I'm trying to speed up the syscons on the PS3 console which is a > >>> simple > >>> framebuffer syscons. > >>> It uses the renderer _gfbrndrsw_ (see dev/syscons/scgfbrndr.c) to > >>> draw into > >>> the framebuffer of the PS3 console. > >>> The _gfb_draw_ function implements a simple scrolling that moves > >>> data from > >>> bottom to top with _vidd_copy_. > >>> And that's where i have a problem because _vidd_copy_ calls the > >>> function > >>> _ps3fb_copy_ (see powerpc/ps3/ps3_syscons.c). > >>> But the function _ps3fb_copy_ is NOT implemented yet. So, the > >>> question is how > >>> does the scrolling work then ? > >>> I took a look at other syscons implementation based on a > >>> framebuffer, and > >>> almost all of them do NOT implement _vidd_copy_ > >>> function, e.g. XBOX syscons. > >> > >> I think driver re-renders whole screen character by character. > >> That's why no > >> copy operation is invoked. > >> _______________________________________________ > >> freebsd-hackers@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >> To unsubscribe, send any mail to > >> "freebsd-hackers-unsubscribe@freebsd.org" > > > > You are right, syscons is using the teken terminal emulator which > > implements scrolling in software. The vidd_copy callback is never > > called. To optimize the PS3 syscons driver, i have to speed up > > vidd_puts and vidd_putc callbacks. > > not sure if it's relevent, but remember that updating the screen mor > ethan 50 times a second is pointless. > I'm not sure if the curent video console does it but having the final > copy only done on 50Hz ticks can save a lot of copying. Completely irrelevant :) syscons draw to framebuffer only when he need to do so. Framebuffer can reside in graphic card memory or in main memory. In first case it is served(GPU fetch data and put it to DAC pixel by pixel) by graphic card internally, in second case it served with graphic hardware own DMA or host DMA. It is possible to do it by software, but I don't remember such driver in our tree and it is too heavy. Another one possible case - asynchronous displays, which have internal memory (internal framebuffer). > > > > > regards > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to > > "freebsd-hackers-unsubscribe@freebsd.org" > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- Aleksandr Rybalko