Custom 1920x720 resolution monitor timing calculation

Hello, since Apalis imx6 board doesn’t interact with 1920x720 custom monitor (LA123WF4)

Here is what I have been done so far

  1. With devshell command, I have modified mxc_hdmi.c / mxc_edid.c / mxc_edid_h as following in HDMI LCD Screen Resolution 1920x720 (vidargs not working)! - Technical Support - Toradex Community

in mxc_hdmi.c

static const struct fb_videomode vga_mode = {
        /* 1920x720 @ 60 Hz, 31.5 kHz hsync */
        NULL, 60, 1920, 720, 11112, 56, 56, 4, 4, 16, 2,
        FB_VMODE_NONINTERLACED | FB_VMODE_ASPECT_8_3, 0
};

in mxc_edid.c

/* #48: 1920x720p@60 16:9 */
 [48] = {
    NULL, 60, 1920, 720, 11112, 56, 56, 4, 4, 16, 2,
    FB_VMODE_NONINTERLACED | FB_VMODE_ASPECT_8_3, 0
 },

in mxc_edid.h

#define FB_VMODE_ASPECT_8_3  	0x40
#define FB_VMODE_ASPECT_MASK    (FB_VMODE_ASPECT_4_3 | FB_VMODE_ASPECT_16_9 | FB_VMODE_ASPECT_8_3)
  1. compiling all the changes, and building all images including zImage and dts with yocto

  2. in uboot, I have changed

    setenv vidargs ‘video=mxcfb0:dev=hdmi,1920x720@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M’

But still, it does not work well, the display only gives white screen.

I suspect sereral possible reasons.

  1. Might hdmi_timing is wrong calculated. If it is, I was wondering if you could check it out with https://www.lcdtek.co.uk/img/cms/PDF/LA123WF4-SL01_2017.pdf detail information

  2. Might use HDMI_ASPECT_64_27 not FB_VMODE_ASPECT_8_3, because I already confirmed that the display works well with the raspberry pie 3 board and below command in config.txt
    hdmi_timings=1920 0 0 2 126 720 0 2 2 4 0 0 0 60 0 89456640 8
    The last 8 option means HDMI_ASPECT_64_27. So if it is, how can I need to change in mxc_edid.h

    #define FB_VMODE_ASPECT_64_27 ???

  3. Based on the display T-Con board specifications, its input is DVI input using HDMI cable (TMDS), it might be a problem?

Thanks in advance!

Dear @hkhunkim

  1. I would try to redo your changes in the mxc_hdmi.c file and leave the default values there.
  2. The changes in the mxc_edid.c file mostly seems to be OK to me. But you could try another pixclock in the fb_videomode arguments.

I would try following parameters:

 /* #48: 1920x720p@60 8:3 */
  [48] = {
     NULL, 60, 1920, 720, 37037, 56, 56, 4, 4, 16, 2,
     FB_VMODE_NONINTERLACED | FB_VMODE_ASPECT_8_3, 0
  },
  1. You missed a character in your u-boot vidargs (‘M’ after the resolution):

    setenv vidargs ‘video=mxcfb0:dev=hdmi,1920x720M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M’

  2. If all these changes do not work at all, you could also try to boot without any vidargs and check if the native HDMI resolution works at least and your display has a proper connection. (For this step, the first step is required).

Best regards, Diego

Hi @diego_b.tx

I have tried to redo your 1) timing and default mxc_hdmi.c setup

and 2) With

 setenv vidargs 'video=mxcfb0:dev=hdmi,1920x720M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M'

and 3) without vidargs which work well with another native HDMI monitor

But, still no luck in my targeted display (1920x720)…

Is it possible to solve this issue by set up ‘mxc_hdmi.only_cea=0’

or modifying mxc_hdmi.c (github)?

Hi @diego_b.tx

I think I could narrow down reason why our board does not interact with the display.

After listing our target 1920x720 display information on CEA lists in mxc_edid.c, I am thinking that the reason why our display does not show anything is that the driving board only allows DVI input.

So it might be resolved by 1) changing CEA mode into DMT mode (non CEA, like mxc_hdmi.only_cea=0 in digi-key imx6 board like here, HDMI video) or 2) using CEA mode without using Audio signal. (it is possible? don’t know…)

If you could tell me how to do that it will be so helpful! Thanks!

Dear @hkhunkim

Okay. Could you try to add the ‘mxc_hdmi.only_cea=0’?

vidargs=mxc_hdmi.only_cea=0 video=mxcfb0:dev=hdmi,1920x720M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M

If this is not working, please send me

  1. The EDID file of your display
  2. The output of dmesg after startup

After that, we can proceed with the analysis.

Best regards, Diego

Dear @diego_b.tx

Nothing changed with mxc_hdmi_only_cea=0…

  1. EDID with xrandr --verbose command in Desktop (Ubuntu 16.04)

    Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 16384 x 16384
    HDMI-0 connected 1920x720+1920+0 (0x405) normal (normal left inverted right x axis y axis) 8mm x 3mm
    Identifier: 0x23e
    Timestamp: 267133824
    Subpixel: unknown
    Gamma: 1.0:1.0:1.0
    Brightness: 1.0
    Clones:
    CRTC: 1
    CRTCs: 1 2 3 4
    Transform: 1.000000 0.000000 0.000000
    0.000000 1.000000 0.000000
    0.000000 0.000000 1.000000
    filter:
    EDID:
    00ffffffffffff001274000000000000
    07150103800803780a1601a94e4ca923
    11505420000001010101010101010101
    0101010101010a23808070d00a203c08
    4200080300000018023a801871382d40
    582c450010090000001e000000fc0049
    464c3132330a202020202020000000fd
    003b3d2b2d11000a202020202020003f
    CscMatrix: 65536 0 0 0 0 65536 0 0 0 0 65536 0
    BorderDimensions: 4
    supported: 4
    Border: 0 0 0 0
    range: (0, 65535)
    SignalFormat: TMDS
    supported: TMDS
    ConnectorType: HDMI
    ConnectorNumber: 2
    _ConnectorLocation: 2
    1920x720 (0x405) 89.700MHz -HSync -VSync *current +preferred
    h: width 1920 start 1980 end 1988 total 2048 skew 0 clock 43.80KHz
    v: height 720 start 724 end 726 total 730 clock 60.00Hz

  2. dmesg | grep ‘fb’ (Default setting)

    [ 0.611030] mxc_sdc_fb fb@0: registered mxc display driver ldb
    [ 0.748442] fbcvt: 1920x1080@60: CVT Name - 2.073M9
    [ 0.748586] mxc_sdc_fb fb@1: registered mxc display driver hdmi
    [ 2.773352] platform caam_sm: [0056] e2 ae c3 5d 7d 65 fb 03
    [ 3.201148] imx_epdc_fb 20f4000.epdc: can’t get/select pinctrl

dmesg | grep ‘hdmi’ (Default setting)

[    0.610153] 20e0000.hdmi_video supply HDMI not found, using dummy regulator
[    0.748415] mxc_hdmi 20e0000.hdmi_video: Detected HDMI controller 0x13:0x1a:0xa0:0xc1
[    0.748586] mxc_sdc_fb fb@1: registered mxc display driver hdmi
[    0.805308] mxc_hdmi 20e0000.hdmi_video: Read EDID again
[    1.044793] mxc_hdmi 20e0000.hdmi_video: create default modelist
[    2.077220] mxc_hdmi_cec soc:hdmi_cec@00120000: HDMI CEC initialized
[    3.092913] imx-audio-hdmi sound-hdmi: hdmi-hifi.0 <-> soc:hdmi_audio@00120000 mapping ok
[    3.390012]   #2: imx-hdmi-soc

ONE THING I FOUND TODAY is even though I changed mxc_hdmi.c/mxc_edid.c/mxc_edid.h, I have got below ‘fbset’ results after booting

mode “1920x1080-60”
# D: 148.500 MHz, H: 67.500 kHz, V: 60.000 Hz
geometry 1920 1080 1920 1080 16
timings 6734 148 88 36 4 44 5
hsync high
vsync high
rgba 5/11,6/5,5/0,0/0
endmode

It means the board does not get EDID, doesn’t it?

Thanks!!

Thanks! Finally it worked!! Thank you so much!!

Perfect. Thanks for the feedback.

Hi @hkhunkim

Sorry for the late answer, I had first to analyse the problem and some things confused me really. I realized that the datasheet you sent before is the datasheet to the display, with the timings of the LVDS connection and not the HDMI converter in between. So the recommended timings of my previous post don’t work obviously, but I generated the new ones now.

Your EDID-File is following:

00 ff ff ff ff ff ff 00 12 74 00 00 00 00 00 00
07 15 01 03 80 08 03 78 0a 16 01 a9 4e 4c a9 23
11 50 54 20 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 0a 23 80 80 70 d0 0a 20 3c 08
42 00 08 03 00 00 00 18 02 3a 80 18 71 38 2d 40
58 2c 45 00 10 09 00 00 00 1e 00 00 00 fc 00 49
46 4c 31 32 33 0a 20 20 20 20 20 20 00 00 00 fd
00 3b 3d 2b 2d 11 00 0a 20 20 20 20 20 20 00 3f

With http://www.edidreader.com/ you get following informations:
Pixel Clock: 89.7MHz
Horizontal Active: 1920
Horizontal Blanking: 128
Vertical Active: 720
Vertical Blanking: 10
Horizontal Sync Offset: 60
Horizontal Sync Pulse: 8
Vertical Sync Offset: 4
Vertical Sync Pulse: 2
Horizontal Display Size: 8
Vertical Display Size: 3
Horizontal Border: 0
Vertical Border: 0
Interlaced: false
Stereo Mode: 0
Sync Type: 3

You need now to edit the mxc_edid.c - file and the mxc_edid.h - file as you did before. In the mxc_edid.c you need to add an additional entry in the array of the type struct fb_videomode, which has following attributes:

struct fb_videomode {
	const char *name;	/* optional */
	u32 refresh;		/* Framerate in Hz */
	u32 xres;		/* Horizontal Active */
	u32 yres;		/* Vertical Active */
	u32 pixclock;		/* Hz in picoseconds */
	u32 left_margin;	/* = Horizontal Blanking - Horizontal Sync Offset - Horizontal Sync Pulse */
	u32 right_margin;	/* = Horizontal Sync Offset */
	u32 upper_margin;	/* = Vertical Blanking - Vertical Sync Offset - Vertical Sync Pulse */
	u32 lower_margin;	/* = Vertical Sync Offset */
	u32 hsync_len;		/* = Horizontal Sync Pulse */
	u32 vsync_len;		/* = Vertical Sync Pulse */
	u32 sync;		
	u32 vmode;
	u32 flag;
};

With the knowledge of the struct, you can add following entry to the end of the mentioned array:

/* #48: 1920x720p@60Hz 8:3  --> (1/89700000)*1000000000000 = 11148.2720178 */
[48] = {
   NULL, 60, 1920, 720, 11148, 60, 60, 4, 4, 8, 2,
   FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
   FB_VMODE_NONINTERLACED | FB_VMODE_ASPECT_8_3, 0
},

After applying these changes, you should be able to boot with following vidards:

vidargs=mxc_hdmi.only_cea=0 video=mxcfb0:dev=hdmi,1920x720M@60,if=RGB24 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M

Could you try this?

Best regards, Diego