There's now a patch in https://codereview.qt-project.org/#/c/201604/ 
demonstrating the concept. (only tried with 2 screens on Mesa 17 on Intel) It 
is against dev and part of bigger patch set, and will not apply to 5.8 for 
sure. But could be helpful.


Cheers,

Laszlo


________________________________
From: Development <development-bounces+laszlo.agocs=qt...@qt-project.org> on 
behalf of Laszlo Agocs <laszlo.ag...@qt.io>
Sent: Wednesday, August 2, 2017 9:18:50 AM
To: Quentin Schulz; development@qt-project.org
Cc: Thomas Petazzoni; Boris Brezillon; Alexandre Belloni
Subject: Re: [Development] Screen mirroring

Hi,

Don't you need to duplicate the drmModePageFlip call too? drmModeSetCrtc is 
called only once. Other than that it should be alright conceptually (as long as 
the two screens support the same mode). Proper plumbing with config file 
support can get more complicated, of course. There is some work 
planned/on-going around eglfs_kms (see umbrella task at 
https://bugreports.qt.io/browse/QTBUG-62132 ) which could provide this 
(configurable cloning) as well, but all that won't land before 5.11 at 
earliest. So current versions need custom patches for the time being.

Cheers,
Laszlo


-----Original Message-----
From: Development 
[mailto:development-bounces+laszlo.agocs=qt...@qt-project.org] On Behalf Of 
Quentin Schulz
Sent: onsdag 2. august 2017 08.34
To: development@qt-project.org
Cc: Thomas Petazzoni <thomas.petazz...@free-electrons.com>; Boris Brezillon 
<boris.brezil...@free-electrons.com>; Alexandre Belloni 
<alexandre.bell...@free-electrons.com>
Subject: [Development] Screen mirroring

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
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to