drm/i915: Change GEM throttling to be 20ms like the comment says.
authorEric Anholt <eric@anholt.net>
Wed, 3 Jun 2009 07:27:35 +0000 (07:27 +0000)
committerEric Anholt <eric@anholt.net>
Thu, 4 Jun 2009 11:44:22 +0000 (11:44 +0000)
commitb962442e46a9340bdbc6711982c59ff0cc2b5afb
tree12cfe74d0061728951b004c5519e961bd9e0b33c
parent1fd1c624362819ecc36db2458c6a972c48ae92d6
drm/i915: Change GEM throttling to be 20ms like the comment says.

keithp didn't like the original 20ms plan because a cooperative client could
be starved by an uncooperative client.  There may even have been problems
with cooperative clients versus cooperative clients.  So keithp changed
throttle to just wait for the second to last seqno emitted by that client.
It worked well, until we started getting more round-trips to the server
due to DRI2 -- the server throttles in BlockHandler, and so if you did more
than one round trip after finishing your frame, you'd end up unintentionally
syncing to the swap.

Fix this by keeping track of the client's requests, so the client can wait
when it has an outstanding request over 20ms old.  This should have
non-starving behavior, good behavior in the presence of restarts, and less
waiting.  Improves high-settings openarena performance on my GM45 by 50%.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c