summaryrefslogtreecommitdiff
path: root/kms++util/src
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-02-10 06:56:39 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-02-10 07:04:02 +0200
commitea26be116ab1e93871ccbfbb1267137f4d0ce47f (patch)
treed4a8c71c706828e91e34fb73be89c0fbd06ca50b /kms++util/src
parent643d678146f0e292ed211e9fe214c145e697d2d4 (diff)
fix race issue in threaded test pattern draw
Diffstat (limited to 'kms++util/src')
-rw-r--r--kms++util/src/testpat.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/kms++util/src/testpat.cpp b/kms++util/src/testpat.cpp
index 519f960..6cb5d85 100644
--- a/kms++util/src/testpat.cpp
+++ b/kms++util/src/testpat.cpp
@@ -155,6 +155,10 @@ static void draw_test_pattern_impl(IMappedFramebuffer& fb)
return;
}
+ // Create the mmaps before starting the threads
+ for (unsigned i = 0; i < fb.num_planes(); ++i)
+ fb.map(0);
+
unsigned num_threads = thread::hardware_concurrency();
vector<thread> workers;