diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-02 14:35:45 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-02 14:47:12 +0000 |
commit | def6b5e733e623333abf596bbdbabf8dd0ac8b00 (patch) | |
tree | 40e9e1a69016f5137803195e85d0e8177fda62ac | |
parent | 088b875affb8655010bc678ca4a3e87703c92daf (diff) |
sna: Only execute the accel block handler if we are about to block
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_driver.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 0df7ca0c..cacee4bf 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -567,12 +567,14 @@ static void sna_block_handler(int i, pointer data, pointer timeout, pointer read_mask) { struct sna *sna = data; + struct timeval *tv = timeout; DBG(("%s\n", __FUNCTION__)); sna->BlockHandler(i, sna->BlockData, timeout, read_mask); - sna_accel_block_handler(sna); + if (tv == NULL || (tv->tv_usec | tv->tv_sec)) + sna_accel_block_handler(sna); } static void |