diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-21 14:49:30 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-21 14:49:30 +0000 |
commit | 2715a455f7bfbecd7a6977184dc6180a09d06e1f (patch) | |
tree | fd9b8266476d03002fe6ceb1481683135751271b /src/intel_uxa.c | |
parent | 26721893cb41cef66db7ef626881d1eba8a5bdea (diff) |
uxa: Prevent laggy applications by throttling after rendering
Before blocking and waiting for further input, we need to make sure that
we have not developed too large a queue of outstanding rendering. As we
rendering to the front-buffer with no natural throttling and allow X
clients to render as fast as they wish, it is entirely possible for a
large queue of outstanding rendering to develop. For such an example,
watch firefox rendering the fishietank demo and notice the delay that
can build up before the tooltips appear.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_uxa.c')
-rw-r--r-- | src/intel_uxa.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel_uxa.c b/src/intel_uxa.c index 0cb8df37..ed4f3753 100644 --- a/src/intel_uxa.c +++ b/src/intel_uxa.c @@ -32,6 +32,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #endif #include <xf86.h> +#include <xf86drm.h> #include <xaarop.h> #include <string.h> #include <errno.h> @@ -1001,6 +1002,11 @@ static void intel_flush_rendering(intel_screen_private *intel) intel->needs_flush = 0; } +static void intel_throttle(intel_screen_private *intel) +{ + drmCommandNone(intel->drmSubFD, DRM_I915_GEM_THROTTLE); +} + void intel_uxa_block_handler(intel_screen_private *intel) { if (intel->shadow_damage && @@ -1015,6 +1021,7 @@ void intel_uxa_block_handler(intel_screen_private *intel) */ intel_glamor_flush(intel); intel_flush_rendering(intel); + intel_throttle(intel); } static PixmapPtr |