tests/pm_pc8: try to reuse FBs when possible
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Thu, 21 Nov 2013 20:19:07 +0000 (18:19 -0200)
committerPaulo Zanoni <paulo.r.zanoni@intel.com>
Thu, 21 Nov 2013 20:47:29 +0000 (18:47 -0200)
commit0df88f5e647a38b52b46d010c54f2594c98d8018
tree483b85eb9656208f4eadcc7630025b8c12567ee2
parent78227101e27471b81af69b54e2de203678243338
tests/pm_pc8: try to reuse FBs when possible

Instead of creating a new FB every time we need one, create a cache of
FBs and reuse whenever possible. That means we'll create at most two
FBs, and reuse them hundreds and hundreds of times.

The kmstest_paint_test_pattern function takes about 1-2 seconds to
run, and we'll avoid it whenever we reuse the FB.

This makes the time taken to run the modeset-lpsp-stress subtest go
from 2:29 to 1:29.

A full "time ./pm_pc8 --quick" goes from 8:14 to 6:27.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
tests/pm_pc8.c