From 4f97a45fba58743a1ccd1f905cc5207d4d5045bf Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Mon, 12 Dec 2016 12:26:26 +0200 Subject: kmstest: use resman to get primary planes We need to ensure that a primary plane is not already in use. ResourceManager does this for us. Signed-off-by: Tomi Valkeinen --- utils/kmstest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp index 43cb557..3a98468 100644 --- a/utils/kmstest.cpp +++ b/utils/kmstest.cpp @@ -939,9 +939,11 @@ int main(int argc, char **argv) vector outputs = setups_to_outputs(card, output_args); + ResourceManager resman(card); + if (card.has_atomic()) { for (OutputInfo& o : outputs) { - o.primary_plane = o.crtc->get_primary_plane(); + o.primary_plane = resman.reserve_primary_plane(o.crtc); if (!o.fbs.empty() && !o.primary_plane) EXIT("Could not get primary plane for crtc '%u'", o.crtc->id()); -- cgit v1.2.3