mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-01 17:40:11 +01:00
DRI2: throttle swaps at submission time too
We need to throttle swaps here in addition to when the context is made
current to avoid causing problems with clients that just swap.
Throttling here also ensures our swaps get ordered as long as we block
the client occasionally.
Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
(cherry picked from commit 0294ff2a5c)
This commit is contained in:
parent
c7e9e36fd3
commit
fcd76ddfc5
1 changed files with 7 additions and 0 deletions
|
|
@ -384,6 +384,13 @@ ProcDRI2SwapBuffers(ClientPtr client)
|
|||
DixReadAccess | DixWriteAccess, &pDrawable, &status))
|
||||
return status;
|
||||
|
||||
/*
|
||||
* Ensures an out of control client can't exhaust our swap queue, and
|
||||
* also orders swaps.
|
||||
*/
|
||||
if (DRI2ThrottleClient(client, pDrawable))
|
||||
return client->noClientException;
|
||||
|
||||
target_msc = vals_to_card64(stuff->target_msc_lo, stuff->target_msc_hi);
|
||||
divisor = vals_to_card64(stuff->divisor_lo, stuff->divisor_hi);
|
||||
remainder = vals_to_card64(stuff->remainder_lo, stuff->remainder_hi);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue