Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933283AbcLIOEv (ORCPT ); Fri, 9 Dec 2016 09:04:51 -0500 Received: from mail-wj0-f196.google.com ([209.85.210.196]:33156 "EHLO mail-wj0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933203AbcLIOEs (ORCPT ); Fri, 9 Dec 2016 09:04:48 -0500 Date: Fri, 9 Dec 2016 15:04:56 +0100 From: Daniel Vetter To: David Herrmann Cc: Benjamin Herrenschmidt , Geert Uytterhoeven , Thomas Petazzoni , Tomi Valkeinen , Greg Kroah-Hartman , Noralf =?iso-8859-1?Q?Tr=F8nnes?= , Sudip Mukherjee , Teddy Wang , Arnaud Patard , DRI Development , Linux Fbdev development list , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH 0/3] staging: remove fbdev drivers Message-ID: <20161209140456.7ltqgd4fgg5tykoh@phenom.ffwll.local> Mail-Followup-To: David Herrmann , Benjamin Herrenschmidt , Geert Uytterhoeven , Thomas Petazzoni , Tomi Valkeinen , Greg Kroah-Hartman , Noralf =?iso-8859-1?Q?Tr=F8nnes?= , Sudip Mukherjee , Teddy Wang , Arnaud Patard , DRI Development , Linux Fbdev development list , "linux-kernel@vger.kernel.org" References: <20161208153735.74d7d350@free-electrons.com> <20161208152134.wnv4j4i6m5xpoycp@phenom.ffwll.local> <1481232877.26959.52.camel@kernel.crashing.org> <1481234249.26959.55.camel@kernel.crashing.org> <20161209083442.peoriqsto2llvl2t@phenom.ffwll.local> <1481283856.27965.11.camel@kernel.crashing.org> <20161209133339.3cpvuxerimoc5huf@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 4.8.0-1-amd64 User-Agent: NeoMutt/20161104 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2792 Lines: 54 On Fri, Dec 09, 2016 at 02:57:24PM +0100, David Herrmann wrote: > Hey > > On Fri, Dec 9, 2016 at 2:33 PM, Daniel Vetter wrote: > >> > So it is possible, only reason vram dumb buffers look worse is that there's > >> > only 3 and no one cares about them, vs about 20 and a very active community > >> > of contributors (also for core drm improvements) for the other case. > >> > >> Well, we could move offb to drm while at it I suppose that would be another > >> one (offb is the "dumb driver based on pre-programmed output by firmware). > > > > One of the still in-flight drm drivers is the simpledrm thing meant for > > all kinds of firmware drivers like efifb and similar things on arm for > > pre-programmed output set up by firmware. I.e. no modeset support and > > otherwise a lot of fake to make it work as drm driver, but the idea that > > it's good enough until your real drm driver takes over. > > The x86 platform device fixups for SimpleDRM went in some weeks ago, > so maybe I should resend the patches. The driver could easily do > 'offb'-like devices as well. Trivial to add. > > Anyway, Benjamin is right, we always do shadow buffering for trivial > drivers. Even in SimpleDRM I blit the shadow buffer on page-flip or > dirty-ioctl. Reason is that we cannot easily expose the real > framebuffer in DRM via FB-objects. But I also never saw a use-case for > it, since all trivial devices I worked with were only either used as > fallback or nobody cared for performance. > > The generic DRM API is designed for dynamic FB allocation. If your > hardware does not allow you to change the scanout source, you will > have a hard time trying to expose the static buffers via the dynamic > FB-object API. Furthermore, all DRM user-space expects dynamic FB > management to work, preferably without a ridiculously low memory > limit. That's also why I never bothered changing the drivers. > > Despite all of this I still see no reason why a driver could not > expose the static, real frambuffers via private ioctls. You can get > all your fancy acceleration that way. Then fix user-space to use this > API. If enough drivers end up with something similar, move it into the > core. Just like we always do in DRM. Well, we don't need a private abi. If we dynamically remap the mmaps and fixup fbdev to do the same then we could redirect frontbuffer rendering for the currently displaying buffer to the static, real framebuffer. That would fix the perf issues Ben is fearing I think. And if we do some nice ttm helpers to hide this all to the level the cma helpers are just plug-in-and-go then it'd be real nice I think. But thus far no one has cared enough yet to make that happen. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch