summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2017-01-25 13:20:43 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-01-25 13:20:43 +0200
commit31070a67532095cf4f13e8bfcd5658ebb1d69c1c (patch)
treefadf6ff284dfda0312f22bfe7c9b426e16094707 /utils
parent526c26ceec669e4b317f9dc7dc1270ca8a3b4478 (diff)
wbcap: fix setup if a display is unconfigured
Diffstat (limited to 'utils')
-rw-r--r--utils/wbcap.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/wbcap.cpp b/utils/wbcap.cpp
index f4f2b71..19b8b46 100644
--- a/utils/wbcap.cpp
+++ b/utils/wbcap.cpp
@@ -288,6 +288,10 @@ int main(int argc, char** argv)
auto src_conn = resman.reserve_connector(src_conn_name);
auto src_crtc = resman.reserve_crtc(src_conn);
+ src_crtc->refresh();
+ Videomode src_mode = src_conn->get_default_mode();
+ DumbFramebuffer src_fb(card, src_mode.hdisplay, src_mode.vdisplay, PixelFormat::ARGB8888);
+ src_crtc->set_mode(src_conn, src_fb, src_mode);
uint32_t src_width = src_crtc->mode().hdisplay;
uint32_t src_height = src_crtc->mode().vdisplay;
@@ -296,6 +300,10 @@ int main(int argc, char** argv)
auto dst_conn = resman.reserve_connector(dst_conn_name);
auto dst_crtc = resman.reserve_crtc(dst_conn);
+ Videomode dst_mode = dst_conn->get_default_mode();
+ DumbFramebuffer dst_fb(card, dst_mode.hdisplay, dst_mode.vdisplay, PixelFormat::ARGB8888);
+ dst_crtc->set_mode(dst_conn, dst_fb, dst_mode);
+ dst_crtc->refresh();
auto dst_plane = resman.reserve_overlay_plane(dst_crtc, pixfmt);
FAIL_IF(!dst_plane, "Plane not found");