[Development] Screen mirroring

Quentin Schulz quentin.schulz at free-electrons.com
Wed Aug 2 08:34:02 CEST 2017


Hi all,

I'm currently working on getting screen mirroring working on an iMX6Q
with Qt5.8 and eglfs plugin.

On this SoC, there is an IPU (Image Processing Unit) which has two DI
(Display Interface). The DI is connected to encoders (HDMI and LVDS
in our case) and can each handle one screen. It is my understanding that
a DI can be assimilated as a CRTC.

We use the eglfs plugin (via -platform) with kms back-end.

I'm able to display content on the two screens connected to the HDMI and
LVDS with Qt5_Cinematicexperience (one screen at a time) or
quickmwtest[1] (both screens at the same time, but different images)
thanks to a JSON file I specify with QT_QPA_EGLFS_KMS_CONFIG.

What I would like to achieve is to have the same image on both screens
at the same time (same resolution of 1024x768 limited by the LVDS)
without having to code the application to explicitly "copy" what is
displayed on one screen to the other.

I managed to achieve this goal by using the same framebuffer for both
CRTCs. I basically added a drmModeSetCrtc to QEglFSKmsGbmScreen::flip[2]
with hardcoded connectors and CRTCs ids. See horrible patch here[3].

Is it (using the same framebuffer for both CRTCs) the right way to do
it? How do you see it being implemented? I guess that we should also
adapt the JSON file to be able to specify screen mirroring.

Else, what do you suggest?

Thanks,
Quentin

[1] https://github.com/alpqr/quickmwtest
[2]
https://git.qt.io/consulting-usa/qtbase-xcb-rendering/blob/dev/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp#L193
[3] http://code.bulix.org/vs6d7z-176162
-- 
Quentin Schulz, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the Development mailing list