KMS timings (Re: [PATCH 6/8] drm/bochs: phase 3: provide a custom ->atomic_commit implementation)

Daniel Vetter daniel at ffwll.ch
Tue Jul 21 06:47:41 PDT 2015


On Tue, Jul 21, 2015 at 02:22:03PM +0300, Pekka Paalanen wrote:
> On Tue, 21 Jul 2015 11:02:58 +0200
> Daniel Vetter <daniel at ffwll.ch> wrote:
> 
> > On Tue, Jul 21, 2015 at 10:06:09AM +0300, Pekka Paalanen wrote:
> > > On Mon, 20 Jul 2015 10:32:31 -0700
> > > Stéphane Marchesin <stephane.marchesin at gmail.com> wrote:

> > > If one does not ask for ASYNC with a page flip, does it mean flipping
> > > on the next vblank, or flipping such that it cannot tear but allowing
> > > techiques like scanline waits?
> > 
> > Since legacy page_flip is always for the full primary plane you can't do
> > scanline waits - it covers everything anyway.
> 
> Ah, nice. Obvious in hindsight, at least if the display server does
> not mark dirty regions.
> 
> But there seems to be drmModeDirtyFB(), can that not be used with page
> flip? If userspace provided dirty regions, would scanline-wait be
> possible in theory? If yes, would it be acceptable for drivers to do?

DirtyFB is exclusively for frontbuffer rendering. We could easily add a
dirty-x/y/w/h rectangle to atomic (I don't think a list makes sense, most
hw can only do one), but right now there's no way to do FlipWithDamage.
Definitely something we want to look into (and we should be able to make
it work on skl on at least in some cases).

> > I guess for bochs/udl and others we could create a small drm driver which
> > keeps track of the last vblank ts (we have those already) and suitable
> > delays the even/timestamp to keep up the illusion. Or we just rip out
> > pageflip support for those drivers. But if weston&co can't cope with that
> > that would be worse.
> 
> Now that you ask, I'm not even really sure what the non-page-flip KMS
> display update way is, so no, I would say Weston cannot deal with it as
> is.
> 
> Who's up for the job? :-)

Implement a drm_send_fake_vblank_event in drm_irq.c and then roll it out
shouldnt be too much work really. We can store crtc-private date needed
for this in the drm_vblank structure (just need a timer plus maybe a
high-res timestamp to make the illusion better). Then we could replace the
send_vblank_event call with that helper in bochs/udl/...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list