Cloning a display

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cloning a display

3,529 Views
stevenborley
Contributor I

I currently have two displays (both 800x600) on on the LDVS and one on the LCD interface (two 'video=' parameters in bootargs). Under Linux (3.0.55 kernel) I can independently stream video to one and run my QT app in the other.  However, I now need to clone the main display instead - so that the screen showing the App is cloned to the other display (ie. both screens showing the same image). I don't understand how to do this.

I've seen some mention of bootargs for doing this but the few examples I've found don't work on an i.MX6 (or I don't understand how to adapt them). Is there a guide for the parameters to pass for the video? I've not yet found one that's relevant to the i.MX6

My current bootargs for this are (LDB_SVGA is a custom fb_videomode in the kernel that is 800x600):

bootargs= .... video=mxcfb0:dev=ldb,LDB_SVGA,if=RGB666,bpp=16 video=mxcfb1:dev=lcd,800x600M@60

To get display cloning do I need to modify the bootargs or is there another way?

0 Kudos
6 Replies

1,782 Views
EricNelson
Senior Contributor II

Hi Steven,

Using the separate "video=" clauses will give you independent frame buffers. If you need different content, this is the way to go.

If the displays are identical (from a timing perspective), you can also manipulate the LDB driver to tell both panels to use the same frame-buffer. I don't recall the kernel command-line details, but it's something like ldb=dual.

You should be able to find the details in the i.MX6 Linux Reference manual in the document package here: https://community.freescale.com/docs/DOC-95560

1,782 Views
woutervh
Contributor IV

Hello Eric,

I want to accomplish the same as the topic starter. However, altering the ldb driver for dual-mode is only interesting when both displays are lvds-displays, no?

Furthermore, I'm on fullhd lcd panel, using dual channel (split-mode). And impossible to set dual-mode together with split mode.

However, I want to get to something you explained. One framebuffer, and ldb and lcd get their content from it

0 Kudos

1,782 Views
stevenborley
Contributor I

Hi Eric,

The two displays are both 800x600 but have different timings. One is on the LDVS and the other is on the LCD interface.

I'll try experimenting with ldb=dual. The link you gave was useful, but so far I've not found the right document that explains what ldb=dual means.

With lots of pages to search through now the problem  might be simply be knowing what the correct terminology is. neither of the terms 'bootargs' or 'clone' appear in the i.MX6 Linux reference manual (and 'dual' is on all 300+ pages). I'm using the term 'clone' to describe showing the same video on two different screens - is that the right terminology? is is documented under some other name?

0 Kudos

1,782 Views
EricNelson
Senior Contributor II

Hi Steven,

If the displays can't be made to use the same timings, you're out of luck with this approach. If you need different timings, you need separate IPU channels, and from there, you need different frame-buffers (memory).

If that's the case, you'll need something in kernel or user-space to either BLT from one to the other in order to duplicate the other or you'll need to hack the display drivers to share one set of video memory. I'm not aware of anything that will handle this in the general case.

Android on i.MX6 is configured to do this automatically.

Is it too late in your project to swap one of the displays?

Is double-buffering needed? Hacking the kernel to force a shared frame-buffer is probably the easiest kernel-level solution, but getting page-flipping to work will likely be a challenge.

To your question about docs: I'm not sure where this is documented. Perhaps looking through the kernel sources (drivers/video/mxc/ldb.c) for LDB_SEP[0|1]. This is an area where the hardware is simpler than the software (see register IOMUXC_GPR2, bits 0-3 in the reference manual).

1,782 Views
stevenborley
Contributor I

Hi Eric,

Hacking the kernel looks a step too far for this project (not enough time). But before I give it up a as a bad job, do you think it would be possible to do this in user space my creating a fake framebuffer device that's actually an input of a pipe that sends the data to the two different real frame buffers. I'm assuming Qt and gstreamer use the /dev/fbn devices and I can tell them to use the fake devices in place of the real device. I'm not sure that's possible. I'm guessing that it needs more than just a simple pipe.

I could also see what happens if I use the same timing for both. Maybe there's a good compromise. Unfortunately it's too late to switch displays. Do you understand that ldb=dual could work with a combination of LDVS and LCD? The source code only mentions two LVDS channels.

Or I switch to Android -  I wonder if my QT App would run on Android.

0 Kudos

1,782 Views
EricNelson
Senior Contributor II

Hi Steven,

I'm not at all certain what you mean by "pipe", but I think it's the wrong approach. It is possible that you can simply swap the physical frame-buffer addresses for the second display if you're not doing page flipping, but it will likely cause issues in re-booting since the second display didn't allocate the memory.

Digia also has a nice "Boot to Qt" package for SABRE Lite/Nitrogen6x:

     Preparing Sabre Lite i.MX 6 | QtEnterpriseEmbedded 1.0

     Qt Enterprise Embedded Hardware - YouTube

0 Kudos