[PATCH xserver] present: disable page flip only when a slave crtc is active

Michel Dänzer michel at daenzer.net
Wed Feb 1 08:33:37 UTC 2017


On 01/02/17 10:21 AM, Michel Dänzer wrote:
> On 01/02/17 04:05 AM, David Airlie wrote:
>>> From: "Michel Dänzer" <michel at daenzer.net>
>>> On 26/01/17 07:13 PM, Qiang Yu wrote:
>>>>
>>>> @@ -145,7 +157,7 @@ present_check_flip(RRCrtcPtr    crtc,
>>>>          return FALSE;
>>>>  
>>>>      /* Fail to flip if we have slave outputs */
>>>> -    if (screen->output_slaves)
>>>> +    if (screen->output_slaves &&
>>>> present_check_output_slaves_active(screen))
>>>>          return FALSE;
>>>>  
>>>>      /* Make sure the window hasn't been redirected with Composite */
>>>>
>>>
>>> Actually, I'm not sure why we need to check for slave outputs here at
>>> all. Dave, did you run into an actual problem without the check, or was
>>> it just a theoretical concern? The commit log says:
>>
>> You don't get an output on USB without the fix.
> 
> Hmm, why not? Flipping just replaces the screen pixmap's storage;
> copying from the screen pixmap to the shared pixmap should still work
> fine, and flips generate the damage needed to trigger it as well.

Testing revealed that Present flips actually don't change the screen
pixmap, but instead change the window pixmap of the root and flip
windows. This means that the screen pixmap doesn't receive any updates
while a window is being flipped. Which in turn means that PRIME slave
output freezes, because it attaches to the screen pixmap.

Shouldn't be hard to fix by attaching to the root window instead of the
screen pixmap, but might require an ABI break.

Meanwhile, I pushed Qiang's patch, thanks!

remote: Updating patchwork state for https://patchwork.freedesktop.org/project/Xorg/list/
remote: I: patch #135433 updated using rev bb9128fdc86decd6f6e3b0e145011a8c08b1d2b5.
remote: I: 1 patch(es) updated to state Accepted.
To ssh+git://git.freedesktop.org/git/xorg/xserver
   45e0eb4b1..bb9128fdc  master -> master


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list