aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-06-03 03:27:35 -0400
committerEric Anholt <eric@anholt.net>2009-06-04 07:44:22 -0400
commitb962442e46a9340bdbc6711982c59ff0cc2b5afb (patch)
tree12cfe74d0061728951b004c5519e961bd9e0b33c /drivers/gpu/drm/i915/i915_dma.c
parent1fd1c624362819ecc36db2458c6a972c48ae92d6 (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 53d544552625..0c222c28b8c1 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1273,8 +1273,7 @@ int i915_driver_open(struct drm_device *dev, struct drm_file *file_priv)
1273 1273
1274 file_priv->driver_priv = i915_file_priv; 1274 file_priv->driver_priv = i915_file_priv;
1275 1275
1276 i915_file_priv->mm.last_gem_seqno = 0; 1276 INIT_LIST_HEAD(&i915_file_priv->mm.request_list);
1277 i915_file_priv->mm.last_gem_throttle_seqno = 0;
1278 1277
1279 return 0; 1278 return 0;
1280} 1279}
@@ -1311,6 +1310,7 @@ void i915_driver_lastclose(struct drm_device * dev)
1311void i915_driver_preclose(struct drm_device * dev, struct drm_file *file_priv) 1310void i915_driver_preclose(struct drm_device * dev, struct drm_file *file_priv)
1312{ 1311{
1313 drm_i915_private_t *dev_priv = dev->dev_private; 1312 drm_i915_private_t *dev_priv = dev->dev_private;
1313 i915_gem_release(dev, file_priv);
1314 if (!drm_core_check_feature(dev, DRIVER_MODESET)) 1314 if (!drm_core_check_feature(dev, DRIVER_MODESET))
1315 i915_mem_release(dev, file_priv, dev_priv->agp_heap); 1315 i915_mem_release(dev, file_priv, dev_priv->agp_heap);
1316} 1316}