From 1852a37054072aca377cc0e46d88d8b6d8c575a6 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Fri, 30 Sep 2016 10:19:43 +0300 Subject: kmstest: enable display even if crtc doesn't have fb With atomic modesetting we can enable the crtc without a primary plane. This allows enabling only a plane on the screen. Change set_crtcs_n_planes() to allow this. Signed-off-by: Tomi Valkeinen --- utils/kmstest.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'utils') diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp index 5fb46f9..52e4614 100644 --- a/utils/kmstest.cpp +++ b/utils/kmstest.cpp @@ -670,20 +670,20 @@ static void set_crtcs_n_planes(Card& card, const vector& outputs) auto conn = o.connector; auto crtc = o.crtc; - if (!o.fbs.empty()) { - auto fb = o.fbs[0]; + blobs.emplace_back(o.mode.to_blob(card)); + Blob* mode_blob = blobs.back().get(); - blobs.emplace_back(o.mode.to_blob(card)); - Blob* mode_blob = blobs.back().get(); + req.add(conn, { + { "CRTC_ID", crtc->id() }, + }); - req.add(conn, { - { "CRTC_ID", crtc->id() }, - }); + req.add(crtc, { + { "ACTIVE", 1 }, + { "MODE_ID", mode_blob->id() }, + }); - req.add(crtc, { - { "ACTIVE", 1 }, - { "MODE_ID", mode_blob->id() }, - }); + if (!o.fbs.empty()) { + auto fb = o.fbs[0]; req.add(o.primary_plane, { { "FB_ID", fb->id() }, -- cgit v1.2.3