summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-07-04 12:14:11 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-07-04 12:19:25 +0100
commit04ddea075e9e07cf3158594130d5ba7d1f50f7f1 (patch)
treeb5ba704b392018113dcd9cdb35bbb122ee720f48
parent228a22fe8db044a18556a9fdb989323274817771 (diff)
sna: Do a quirk early check for short areas before threading
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_threads.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_threads.c b/src/sna/sna_threads.c
index f263d241..e2bb8042 100644
--- a/src/sna/sna_threads.c
+++ b/src/sna/sna_threads.c
@@ -259,6 +259,9 @@ int sna_use_threads(int width, int height, int threshold)
if (max_threads <= 0)
return 1;
+ if (height <= num_threads)
+ return height;
+
if (width < 128)
height /= 128/width;