From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Date: Thu, 08 Dec 2016 21:28:39 +0000 Subject: Re: [RFC PATCH 0/3] staging: remove fbdev drivers Message-Id: <1481232519.26959.49.camel@kernel.crashing.org> List-Id: References: <1479888193-23908-1-git-send-email-tomi.valkeinen@ti.com> <1481158879.26959.41.camel@kernel.crashing.org> <20161208101005.6ufl3d4qvwprosju@phenom.ffwll.local> In-Reply-To: <20161208101005.6ufl3d4qvwprosju@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Daniel Vetter Cc: Thomas Petazzoni , linux-fbdev@vger.kernel.org, Teddy Wang , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Tomi Valkeinen , Sudip Mukherjee , Arnaud Patard On Thu, 2016-12-08 at 11:10 +0100, Daniel Vetter wrote: > > With drmfb you basically have to shadow everything into memory & copy > > over everything, and locks you out of simple 2D accel. For a simple text > > console the result is orders of magnitude slower and memory hungry than > > a simple fbdev. >=20 > Not true, we have full fbdev emulation, and drivers can implement the 2d > accel in there. And a bunch of them do. It's just that most teams decided > that this is pointless waste of their time.j Ok so my knowledge might be outdated here. I was complaining to Dave about how cirrusdrmfb didn't even use blits for fbcon scrolling and always double buffered everything, and Dave made the point that you basically had to do that for security reasons that I mostly forgot the details of. It looks like bochsdrmfb and astdrmfb are the same. If things have changed, then cool. Can you point me to a drmfb driver that is a good (and not too complex) example with simple 2d accel ? I'm thinking mostly of color expansion, bitblt and solid fill for fbcon, the way I used to do it in radeonfb for example. > > At least that was the case last I looked at the DRM stuff with Dave, > > maybe things have changed...=C2=A0 > >=20 > > Not everything has a powerful 3D GPU. >=20 > That's correct, and drm can cope. And compared to fbdev there's a very > active community who improves&refactors it every kernel release to make it > even better. Since about 2 years (when atomic landed) we merge new driver= s at > a rate of 2-3 per kernel release, and those new drivers get ever simpler > and smaller thanks to all this work. Yeah it's hard to follow from outside :-) As I said above, it would help if you could point to a good modern example driver to use as reference. Thanks ! Cheers, Ben. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [RFC PATCH 0/3] staging: remove fbdev drivers Date: Fri, 09 Dec 2016 08:28:39 +1100 Message-ID: <1481232519.26959.49.camel@kernel.crashing.org> References: <1479888193-23908-1-git-send-email-tomi.valkeinen@ti.com> <1481158879.26959.41.camel@kernel.crashing.org> <20161208101005.6ufl3d4qvwprosju@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by gabe.freedesktop.org (Postfix) with ESMTPS id CE8086E1C3 for ; Thu, 8 Dec 2016 22:29:46 +0000 (UTC) In-Reply-To: <20161208101005.6ufl3d4qvwprosju@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: Thomas Petazzoni , linux-fbdev@vger.kernel.org, Teddy Wang , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Tomi Valkeinen , Sudip Mukherjee , Arnaud Patard List-Id: dri-devel@lists.freedesktop.org T24gVGh1LCAyMDE2LTEyLTA4IGF0IDExOjEwICswMTAwLCBEYW5pZWwgVmV0dGVyIHdyb3RlOgo+ ID4gV2l0aCBkcm1mYiB5b3UgYmFzaWNhbGx5IGhhdmUgdG8gc2hhZG93IGV2ZXJ5dGhpbmcgaW50 byBtZW1vcnkgJiBjb3B5Cj4gPiBvdmVyIGV2ZXJ5dGhpbmcsIGFuZCBsb2NrcyB5b3Ugb3V0IG9m IHNpbXBsZSAyRCBhY2NlbC4gRm9yIGEgc2ltcGxlIHRleHQKPiA+IGNvbnNvbGUgdGhlIHJlc3Vs dCBpcyBvcmRlcnMgb2YgbWFnbml0dWRlIHNsb3d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lsaW5nIGxpc3QKZHJpLWRldmVsQGxpc3RzLmZyZWVkZXNrdG9wLm9y ZwpodHRwczovL2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2RyaS1kZXZl bAo= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932696AbcLHWaR (ORCPT ); Thu, 8 Dec 2016 17:30:17 -0500 Received: from gate.crashing.org ([63.228.1.57]:42146 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753010AbcLHWaP (ORCPT ); Thu, 8 Dec 2016 17:30:15 -0500 Message-ID: <1481232519.26959.49.camel@kernel.crashing.org> Subject: Re: [RFC PATCH 0/3] staging: remove fbdev drivers From: Benjamin Herrenschmidt To: Daniel Vetter Cc: Tomi Valkeinen , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Greg Kroah-Hartman , Thomas Petazzoni , Noralf =?ISO-8859-1?Q?Tr=F8nnes?= , Sudip Mukherjee , Teddy Wang , Arnaud Patard , linux-kernel@vger.kernel.org Date: Fri, 09 Dec 2016 08:28:39 +1100 In-Reply-To: <20161208101005.6ufl3d4qvwprosju@phenom.ffwll.local> References: <1479888193-23908-1-git-send-email-tomi.valkeinen@ti.com> <1481158879.26959.41.camel@kernel.crashing.org> <20161208101005.6ufl3d4qvwprosju@phenom.ffwll.local> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.2 (3.22.2-1.fc25) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-12-08 at 11:10 +0100, Daniel Vetter wrote: > > With drmfb you basically have to shadow everything into memory & copy > > over everything, and locks you out of simple 2D accel. For a simple text > > console the result is orders of magnitude slower and memory hungry than > > a simple fbdev. > > Not true, we have full fbdev emulation, and drivers can implement the 2d > accel in there. And a bunch of them do. It's just that most teams decided > that this is pointless waste of their time.j Ok so my knowledge might be outdated here. I was complaining to Dave about how cirrusdrmfb didn't even use blits for fbcon scrolling and always double buffered everything, and Dave made the point that you basically had to do that for security reasons that I mostly forgot the details of. It looks like bochsdrmfb and astdrmfb are the same. If things have changed, then cool. Can you point me to a drmfb driver that is a good (and not too complex) example with simple 2d accel ? I'm thinking mostly of color expansion, bitblt and solid fill for fbcon, the way I used to do it in radeonfb for example. > > At least that was the case last I looked at the DRM stuff with Dave, > > maybe things have changed...  > > > > Not everything has a powerful 3D GPU. > > That's correct, and drm can cope. And compared to fbdev there's a very > active community who improves&refactors it every kernel release to make it > even better. Since about 2 years (when atomic landed) we merge new drivers at > a rate of 2-3 per kernel release, and those new drivers get ever simpler > and smaller thanks to all this work. Yeah it's hard to follow from outside :-) As I said above, it would help if you could point to a good modern example driver to use as reference. Thanks ! Cheers, Ben.