linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: "Geert Uytterhoeven" <geert@linux-m68k.org>,
	"Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>,
	"Tomi Valkeinen" <tomi.valkeinen@ti.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	"Sudip Mukherjee" <sudipm.mukherjee@gmail.com>,
	"Teddy Wang" <teddy.wang@siliconmotion.com>,
	"Arnaud Patard" <arnaud.patard@rtp-net.org>,
	"DRI Development" <dri-devel@lists.freedesktop.org>,
	"Linux Fbdev development list" <linux-fbdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 0/3] staging: remove fbdev drivers
Date: Sat, 10 Dec 2016 07:27:03 +1100	[thread overview]
Message-ID: <1481315223.17253.15.camel@kernel.crashing.org> (raw)
In-Reply-To: <20161209133512.nuohi42ho3rgghau@phenom.ffwll.local>

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.

We used to do that on Cell to "context switch" the local memory of
the SPU engines between the real SPU and the backing store. It's not
very hard to do.
 
The main issue is that the mapping attributes change between cached
and non-cached under the hood, so users have to be careful not to do
things like use instructions that only work on one type of mapping
(or do things like misaligned accesses).

> > > whereas drm has a multi-master model and proper isolation. IIrc we've hacked up
> > > something once, and if there's indeed more interest into vram dumb buffer
> > > drivers I'm pretty sure we can grow some nice ttm fb helpers (like the cma
> > > fb helpers we have) to make it all pretty and nice and fast and
> > > essentially plug-in-and-forget from a driver authors pov.
> > 
> > That would be nice. I don't have the bandwidth to swap-in enough
> > understanding of TTM guts right now but I might look into it some time next 
> > year if nobody beats me to it.
> 
> Probably best would be to first extract some helpers for ttm based vram
> dumb buffer management, and then start to implement some of the
> improvements so that all drivers can benefit. Like you've said it's not
> rocket science, it just needs to be done ;-)

Right :-)

Though getting ones head around the infrastructure in the DRM does take
time :-) There's a lot of stuff in there, between TTM, GEM etc... and
not all of it completely "obvious" ...

Cheers,
Ben.

> -Daniel
> -- 

  reply	other threads:[~2016-12-09 21:14 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23  8:03 [RFC PATCH 0/3] staging: remove fbdev drivers Tomi Valkeinen
2016-11-23  8:03 ` [RFC PATCH 1/3] staging: remove xgifb Tomi Valkeinen
2016-11-23  8:03 ` [RFC PATCH 2/3] staging: remove sm750fb Tomi Valkeinen
2016-11-23  8:03 ` [RFC PATCH 3/3] staging: remove fbtft Tomi Valkeinen
2016-11-23 17:26   ` Noralf Trønnes
2016-11-24  8:36     ` Tomi Valkeinen
2016-11-23 20:12   ` Drew Fustini
2016-11-23  8:19 ` [RFC PATCH 0/3] staging: remove fbdev drivers Daniel Vetter
2016-11-23  8:21   ` Tomi Valkeinen
2016-11-23  8:25   ` Geert Uytterhoeven
2016-11-23  8:45     ` Daniel Vetter
2016-11-23  8:52 ` Greg Kroah-Hartman
2016-11-23  9:12   ` Tomi Valkeinen
2016-11-23  9:49     ` Greg Kroah-Hartman
2016-11-23 10:05     ` Thomas Petazzoni
2016-12-22 20:36       ` Andy Shevchenko
2016-12-08 22:00     ` Sudip Mukherjee
2016-12-08  1:01 ` Benjamin Herrenschmidt
2016-12-08  8:01   ` Tomi Valkeinen
2016-12-08 21:23     ` Benjamin Herrenschmidt
2016-12-08 21:43       ` Benjamin Herrenschmidt
2016-12-09  8:13         ` Daniel Vetter
2016-12-13  7:36       ` Gerd Hoffmann
2016-12-08 10:10   ` Daniel Vetter
2016-12-08 12:15     ` Geert Uytterhoeven
2016-12-08 14:02       ` Daniel Vetter
2016-12-08 14:22         ` Geert Uytterhoeven
2016-12-08 14:37           ` Thomas Petazzoni
2016-12-08 14:44             ` Geert Uytterhoeven
2016-12-08 15:21               ` Daniel Vetter
2016-12-08 21:34                 ` Benjamin Herrenschmidt
2016-12-08 21:57                   ` Benjamin Herrenschmidt
2016-12-09  8:34                     ` Daniel Vetter
2016-12-09  8:41                       ` Daniel Vetter
2016-12-09 11:48                         ` Benjamin Herrenschmidt
2016-12-09 13:35                           ` Daniel Vetter
2016-12-09 20:27                             ` Benjamin Herrenschmidt [this message]
2016-12-13  7:18                               ` Michel Dänzer
2016-12-09 11:44                       ` Benjamin Herrenschmidt
2016-12-09 12:33                         ` Geert Uytterhoeven
2016-12-09 13:19                         ` Lucas Stach
2016-12-09 13:33                         ` Daniel Vetter
2016-12-09 13:57                           ` David Herrmann
2016-12-09 14:04                             ` Daniel Vetter
2016-12-09 20:29                             ` Benjamin Herrenschmidt
2016-12-09  8:30                 ` Daniel Vetter
2016-12-08 14:59           ` Jani Nikula
2016-12-08 14:22         ` Daniel Vetter
2016-12-08 21:28     ` Benjamin Herrenschmidt
2016-12-09  0:08       ` Dave Airlie
2016-12-09  8:04         ` Geert Uytterhoeven
2016-12-09 11:40         ` Benjamin Herrenschmidt
2016-12-13  7:33         ` Gerd Hoffmann
2016-12-13 15:17     ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1481315223.17253.15.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=arnaud.patard@rtp-net.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noralf@tronnes.org \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=teddy.wang@siliconmotion.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).