Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753248AbcLMHTD (ORCPT ); Tue, 13 Dec 2016 02:19:03 -0500 Received: from mail.netline.ch ([148.251.143.178]:52795 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750818AbcLMHTB (ORCPT ); Tue, 13 Dec 2016 02:19:01 -0500 Subject: Re: [RFC PATCH 0/3] staging: remove fbdev drivers To: Benjamin Herrenschmidt , Daniel Vetter References: <20161208140210.rfyjf2265flsfpfj@phenom.ffwll.local> <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> <20161209084154.rp4wqzv46tuvf3jv@phenom.ffwll.local> <1481284087.27965.13.camel@kernel.crashing.org> <20161209133512.nuohi42ho3rgghau@phenom.ffwll.local> <1481315223.17253.15.camel@kernel.crashing.org> Cc: Thomas Petazzoni , Linux Fbdev development list , Teddy Wang , Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , DRI Development , Tomi Valkeinen , Geert Uytterhoeven , Sudip Mukherjee , Arnaud Patard From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Message-ID: Date: Tue, 13 Dec 2016 16:18:49 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.5.1 MIME-Version: 1.0 In-Reply-To: <1481315223.17253.15.camel@kernel.crashing.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1188 Lines: 25 On 10/12/16 05:27 AM, Benjamin Herrenschmidt wrote: > On Fri, 2016-12-09 at 14:35 +0100, Daniel Vetter wrote: >>> As for multi userspace client, well, swapping an mmap between HW and >>> memory backing store is a somewhat solved problem already. >> >> Hm, I didn't know that, but then all existing drm drivers have fairly >> simplistic fbdev mmap implementations. > > Hrm, I though the TTM did it ... I remember talking with Thomas > Hellstrom about that back in the day... you use unmap_mapping_range > to unmap the existing mappings basically so you can take new faults > and route them to a different page, but I can't see a call in there > so maybe he ended up not doing it. I think he did, it was working fine for userspace mappings when I tried making radeon use a non-pinned BO for fbdev years ago (the problem was fbcon potentially trying to access the framebuffer at the most inconvenient times). There's still ttm_fbdev_mmap, but I'm not sure everything to make this fully work for userspace fbdev mappings is still there. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer