Weston dual screen issue at imx8

Hello,

I am using imx8 bases custom board which has one HDMI and one LVDS display port.
I am trying to clone display using below weston 9 based patch.
clone-from-LVDS-to-HDMI.patch (34.7 KB)

Also i have modified weston.ini file

[output]
name=DPI-1
mode=1280x800

[output]
name=HDMI-A-1
clone-from=DPI-1

currently both display’s supported modes is

root@imx8mp-cgtqx8p:~# cat /sys/class/drm/card1-DPI-1/modes 
1280x800

root@imx8mp-cgtqx8p:~# cat /sys/class/drm/card1-HDMI-A-1/modes                                                                                
1920x1080
1920x1080
1920x1080
1920x1080
1280x1024
1280x1024
1280x960
1152x864
1280x720
1280x720
1280x720
1280x720
800x600
800x600
720x576
720x480
720x480
720x480
720x480

The issue is clone working but there is some display gape in LVDS side.

My primary display is LVDS, and we need to clone in our secondary display that is HDMI.
We have custom resolutions of LVDS : 1280x800. But this resolutions is not there in HDMI edid display data.

On HDMI after cloning it takes some default resolution from HDMI available modes. So how can we achieve clone as per our custom LVDS resolutions?

on my other imx6 board LVDS : 800X480 cloning is working fine. issue occurs on imx8 board.

Hi, i think you should change the hdmi screen from 16:9 to 16:10 ratio. That is hardware issues not software.

Thanks for your support @HieuNong
I am trying to find the way to add new customise resolution 1280x800(16:10) in hdmi
currently available resolutions are:-

root@imx8mp-cgtqx8p:~# cat /sys/class/drm/card1-HDMI-A-1/modes                                                                                
1920x1080
1920x1080
1920x1080
1920x1080
1280x1024
1280x1024
1280x960
1152x864
1280x720
1280x720
1280x720
1280x720
800x600
800x600
720x576
720x480
720x480
720x480
720x480

And the second display which is lvds has this resolution.

root@imx8mp-cgtqx8p:~# cat /sys/class/drm/card1-DPI-1/modes 
1280x800

I want to clone from primary lvds to hdmi. Do you have suggestion how can i do that ?

Hi @bhavanihimanshu

I think the mode is supplied by Screen on chip side, the driver in imx8 will talking with the screen via i2c to get that info,

If you intend to add new resolution but the screen hardware does not support, what will happen. I think that it will not display.

You could see at bsp… /drivers/gpu/drm/drm_edid.c may have useful info for you.

However, that is my thinking, may be some one will help.

Hi @HieuNong

On my toradex board (imx8) I successfully able to set customise resolution using this command from u-boot command

setenv vidargs video=HDMI-A-1:1280x800@60e

And after that it will set on cmdline and showing on /modes

cat /proc/cmdline 
root=PARTUUID=94874b25-02 ro rootwait console=tty1 console=ttymxc2,115200 consoleblank=0 earlycon video=HDMI-A-1:1280x800@60e

cat /sys/class/drm/card1-HDMI-A-1/modes 
1280x800
1280x720
1280x720
1280x720
800x600
720x576
640x480
640x480
720x400

Also it is “1280x800” reflected on display. but in another board I am not able to set. that board is congatec imx8 when i set vidargs it will shoeing on /cmdline but not showing in /sys/class/drm/card1-HDMI-A-1/modes

Can you help me from which place I should start to debug ? I check /driver/gpu/drm/ files there is no any important changes and in edid.c file.

Hi @bhavanihimanshu ,

To debug the weston:
Modify the file /etc/default/weston to OPTARGS=“–debug”

After reboot: see the weston log file in /var/log/weston.log

To print out the imx-drm output by command: modetest -M imx-drm
To see more debug by command: weston-debug -a