From 93b7eea67db418751e7fe4a86bc19430c153588b Mon Sep 17 00:00:00 2001 From: Nerdopolis Turfwalker Date: Wed, 13 Mar 2019 10:49:04 +0200 Subject: [PATCH] [platforms/fbdev] Use a better way to correct activating framebuffer devices Summary: My change in 304528e80b935efea05e2d5e3030266e0eddc44c has been reported to cause issues for PostMarketOS https://gitlab.com/postmarketOS/pmaports/issues/204 I originally submitted the change to activate Framebuffer devices as secondary framebuffer devices are not on by default, (such as a secondary DisplayLink device). Changing attributes usually forced some framebuffer devices to turn on, however I have found a more accurate way to turn on framebuffer devices, without messing with the color layout. Reviewers: #kwin, davidedmundson, graesslin, zzag Reviewed By: #kwin, zzag Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D19663 --- plugins/platforms/fbdev/fb_backend.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/plugins/platforms/fbdev/fb_backend.cpp b/plugins/platforms/fbdev/fb_backend.cpp index 871c661992..d1057c905c 100644 --- a/plugins/platforms/fbdev/fb_backend.cpp +++ b/plugins/platforms/fbdev/fb_backend.cpp @@ -126,20 +126,8 @@ bool FramebufferBackend::handleScreenInfo() return false; } - // correct the color info, and try to turn on screens, assuming this is a non-primary framebuffer device - varinfo.grayscale = 0; - varinfo.transp.offset = 24; - varinfo.transp.length = 8; - varinfo.transp.msb_right = 0; - varinfo.red.offset = 16; - varinfo.red.length = 8; - varinfo.red.msb_right = 0; - varinfo.green.offset = 8; - varinfo.green.length = 8; - varinfo.green.msb_right = 0; - varinfo.blue.offset = 0; - varinfo.blue.length = 8; - varinfo.blue.msb_right = 0; + // Activate the framebuffer device, assuming this is a non-primary framebuffer device + varinfo.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; ioctl(m_fd, FBIOPUT_VSCREENINFO, &varinfo); // Probe the device for new screen information.