[PATCH xserver v2] present: Only call present_flip_notify if vblank->queued == FALSE

Alex Deucher alexdeucher at gmail.com
Sat Jan 7 21:43:06 UTC 2017


On Sat, Jan 7, 2017 at 3:36 AM, Michel Dänzer <michel at daenzer.net> wrote:
>
> Any takers?
>
> In the absence of a negative review, I'll push this next week, since
> more people are running into this.


Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

>
>
> On 28/11/16 10:54 AM, Michel Dänzer wrote:
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> We are no longer using the present_flip_queue list only for presents
>> which have already been submitted to the driver for page flipping, but
>> also for those which we are queueing up to be flipped later, marked
>> with vblank->queued == TRUE. We were incorrectly calling
>> present_flip_notify for such entries, failing the assertion in
>> present_flip_notify (or presumably resulting in other undesirable
>> behaviour with assertions disabled).
>>
>> Reproduction recipe: Run the JavaFX test case referenced by
>> https://bugs.freedesktop.org/show_bug.cgi?id=98831#c6 and alt-tab out
>> of it while it's fullscreen. May take a few attempts to hit the
>> assertion failure.
>>
>> Fixes: bab0f450a719 ("present: Fix presentation of flips out of order")
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98854
>> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
>> ---
>>
>> v2: Add bugzilla reference
>>
>>  present/present.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/present/present.c b/present/present.c
>> index a7ca06e..ef89045 100644
>> --- a/present/present.c
>> +++ b/present/present.c
>> @@ -536,7 +536,10 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc)
>>      }
>>      xorg_list_for_each_entry(vblank, &present_flip_queue, event_queue) {
>>          if (vblank->event_id == event_id) {
>> -            present_flip_notify(vblank, ust, msc);
>> +            if (vblank->queued)
>> +                present_execute(vblank, ust, msc);
>> +            else
>> +                present_flip_notify(vblank, ust, msc);
>>              return;
>>          }
>>      }
>>
>
>
> --
> Earthling Michel Dänzer               |               http://www.amd.com
> Libre software enthusiast             |             Mesa and X developer
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list