[PATCH 4/5] drm/amdgpu: Wait for end of last waited-for vblank before programming flip

Daniel Vetter daniel at ffwll.ch
Thu Jun 16 08:14:38 UTC 2016


On Thu, Jun 16, 2016 at 11:15:14AM +0900, Michel Dänzer wrote:
> On 15.06.2016 18:23, Daniel Vetter wrote:
> > On Wed, Jun 15, 2016 at 05:03:41PM +0900, Michel Dänzer wrote:
> >> On 14.06.2016 17:06, Daniel Vetter wrote:
> > Yeah I think there's a bit of confusion going on here ;-) Of course I'm
> > not against fixing this, and I agree that fixing it by delaying the vblank
> > drm event (like I proposed at first) is not good. What I think would be
> > best to fix this:
> > 
> > - For all current userspace (i.e. no flags or anything) force vrefresh to
> >   to be fixed, and delay page flips which hit the vblank window to be
> >   after that. This way amd drivers are consistent with every other kms
> >   drivers, and work like current userspace seems to expect: Wait for
> >   vblank, then assume any flips will only hit after the next vblank.
> 
> This series preserves this behaviour. A flip is only allowed to complete
> during the current vertical blank period if userspace either:
> 
> * expected it to complete in this vertical blank (or an earlier one).
>   In other words, if the flip doesn't complete in this vertical blank,
>   it is delayed (further) compared to userspace expectations.
> 
> * hasn't called DRM_IOCTL_WAIT_VBLANK at all (so apparently it doesn't
>   care about when the flip completes).
> 
> It sounds like you're saying we aren't allowed to fix cases where flips
> are completing later than expected by userspace, because other drivers
> haven't fixed those cases yet. Quite frankly, that sucks. Nothing other
> than possible hardware restrictions prevents other drivers from fixing
> this as well.

I'm not objecting against fixing this. I'm objecting against fixing this
through clever inferring of what userspace wants, aka the above, instead
of an explicit flag or something. And without that flag the rule is that a
pageflip after vblank hits the next vblank and can't squeeze into the
current one.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list