On 15/09/16 10:47 PM, Hans De Goede wrote: > When using secondary GPU outputs the primary GPU's blockhandler > will copy changes from its framebuffer to a pixmap shared with the > secondary GPU. > > In reverse prime setups the secondary GPU's blockhandler will do another > copy from the shared pixmap to its own framebuffer. > > Before this commit, if the primary GPU's blockhandler would run after > the secondary GPU's blockhandler and no events were pending, then the > secondary GPU's blockhandler would not run until some events came in > (WaitForSomething() would block in the poll call), resulting in the > secondary GPU output sometimes showing stale contents (e.g. a just closed > window) for easily up to 10 seconds. > > This commit fixes this by setting the timeout passed into the > blockhandler to 0 if any shared pixmaps were updated by the primary GPU, > forcing an immediate re-run of all blockhandlers.
This could also be solved using the SyncSharedPixmap hook added by https://patchwork.freedesktop.org/patch/108076/ , by driving the whole update process from the scanout driver. That could also save some bandwidth wasted on copying from the screen pixmap to the shared pixmap, especially if the scanout driver only updates once per CRTC scanout refresh cycle. Feel free to take a look at xf86-video-amdgpu for how this can be done. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel