mirror of
https://github.com/X11Libre/xf86-video-intel.git
synced 2026-03-24 01:24:12 +00:00
sna: Tweak number of threads for short areas
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
@@ -259,8 +259,8 @@ int sna_use_threads(int width, int height, int threshold)
|
||||
if (max_threads <= 0)
|
||||
return 1;
|
||||
|
||||
if (height <= max_threads)
|
||||
return height;
|
||||
if (height <= 1)
|
||||
return 1;
|
||||
|
||||
if (width < 128)
|
||||
height /= 128/width;
|
||||
@@ -271,6 +271,9 @@ int sna_use_threads(int width, int height, int threshold)
|
||||
|
||||
if (num_threads > max_threads)
|
||||
num_threads = max_threads;
|
||||
if (num_threads > height)
|
||||
num_threads = height;
|
||||
|
||||
return num_threads;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user