kmstest: don't reserve primary_plane if it's not needed
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 20 Dec 2016 09:17:13 +0000 (11:17 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 20 Dec 2016 09:17:13 +0000 (11:17 +0200)
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
utils/kmstest.cpp

index e9493682e456d4f93c78704a82c39741c0704a50..557c3e56c3b36304b55cba07ec4582f178c01ad1 100644 (file)
@@ -991,9 +991,12 @@ int main(int argc, char **argv)
 
        if (card.has_atomic()) {
                for (OutputInfo& o : outputs) {
+                       if (o.fbs.empty())
+                               continue;
+
                        o.primary_plane = resman.reserve_primary_plane(o.crtc);
 
-                       if (!o.fbs.empty() && !o.primary_plane)
+                       if (!o.primary_plane)
                                EXIT("Could not get primary plane for crtc '%u'", o.crtc->id());
                }
        }