Is drmWaitVBlank() or drmModePageFlip necessary after drmModeSetPlane()

Daniel Vetter daniel at ffwll.ch
Wed Jan 4 09:08:47 UTC 2017


On Tue, Jan 03, 2017 at 12:27:10PM +0800, Randy Li wrote:
> Hello all,
>   Recently, I meet a performance problem with drmModeSetPlane(), it works
> quite slow with drm_atomic_commit(), I have to force it use
> drm_atomic_async_commit() for drmModeSetPlane() which modifies the drm base
> system. I want to optimize the performance in standard way, so I think I
> could move those sync job to one of drmWaitVBlank() or drmModePageFlip.
>   But I found most of atomic_commit() would have a sync internal, waiting
> vbank. So those functions like drmWaitVBlank() or drmModePageFlip are not
> necessary after drmModeSetPlane()?

Don't use the legacy plane functions when you have an atomic driver,
instead just do all the plane updates together in one nonblocking atomic
commit. Legacy plane functions only work well if you only touch one plane
and leave all others unchanged (plus maybe move the cursor).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list