This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: kmscube application not working proper on HDMI interface

Part Number: AM5728

Tool/software: Linux

Hello we are using AM5728 with processor sdk linux 5.02 base board to drive display using HDMI interface.

where we've used CONFIG_DRM_LOAD_EDID_FIRMWARE to load edid on boot without EEPROM and settings below environments to enable loading firmware.

setenv optargs drm_kms_helper.edid_firmware=edid/1280x800.bin
setenv optargs ${optargs} video=HDMI-A-1:1280x800

We are using 1280x800 24bit TFT .

Here is my EDID which i've replaced in 

${SDK_PATH}/board-support/linux-4.14.79+gitAUTOINC+bde58ab01e-gbde58ab01e/drivers/gpu/drm/drm_edid_load.c
	0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
	0x34, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x10, 0x1d, 0x01, 0x04, 0xa5, 0x19, 0x10, 0x78,
	0x22, 0x64, 0x45, 0x90, 0x58, 0x5c, 0x8d, 0x29,
	0x25, 0x50, 0x54, 0x00, 0x08, 0x00, 0x01, 0x01,
	0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
	0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xbc, 0x1b,
	0x00, 0xa0, 0x50, 0x20, 0x17, 0x30, 0x14, 0x8b,
	0x14, 0x00, 0x00, 0xa0, 0x10, 0x00, 0x00, 0x1a,
	0x00, 0x00, 0x00, 0xff, 0x00, 0x4c, 0x69, 0x6e,
	0x75, 0x78, 0x20, 0x23, 0x30, 0x0a, 0x20, 0x20,
	0x20, 0x20, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x3b,
	0x3d, 0x30, 0x32, 0x08, 0x00, 0x0a, 0x20, 0x20,
	0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xfc,
	0x00, 0x4d, 0x41, 0x58, 0x2d, 0x58, 0x56, 0x47,
	0x41, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x00, 0x4d,

Using EGLFS interface to draw gui app.

While running kmscube sample application it shows weird colors like this one.

Here is the launch log.


root@am57xx-evm:~# ./kmscube 
trying to load module omapdrm...success.[   28.574362] [drm] Got built-in EDID base block and 0 extensions from "ed
id/1280x800.bin" for connector "HDMI-A-1"

### Display [0]: CRTC = 39, Connector = 35, format = 0x34325258
        Mode chosen [1280x800] : Clock => 71000, Vertical refresh => 60, Type => 72
        Horizontal => 1280, 1300, 1439, 1440, 0
        Vertical => 800, 801, 805, 823, 0
### Primary display => ConnectorId = 35, Resolution = 1280x800
failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
loaded module : gbm_pvr.so
found valid GBM backend : gbm_pvr.so
Using display 0x1 with EGL version 1.4
EGL Version "1.4 build 1.14@3699939 (MAIN)"
EGL Vendor "Imagination Technologies"
EGL Extensions "EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_text
ure_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_cl_image EGL_KHR_fence_sync EGL_IMG
_context_priority EGL_IMG_hibernate_process EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context EGL_KHR_wait_sy
nc EGL_KHR_create_context EGL_WL_bind_wayland_display EGL_EXT_image_dma_buf_import"
^CHandling signal number = 2
Cleanup of GL, GBM and DRM completed

While default login prompt screen looks ok .

Does it related to EDID or EGLFS?

  • Hi,

    Thanks for your post. Due to the Easter Holiday in the US, we will not be able to get back to you until early next week. We're sorry for the delay.
  • Is there any update or resolution for the issue?

    Thanks
  • Hi,

    Have you tested that display show well without any of your changes?

    Regards,
    Manisha
  • Well without any changes display doesn't show anything remains white.
  • Is there anyone who can guide us how to troubleshoot this issue.
  • Hi,

    Sorry for delay in my response. Can you run the modetest application and share with us the output?

    You can as well test the display with modetest -

    Test options:

    -P <plane_id>@<crtc_id>:<w>x<h>[+<x>+<y>][*<scale>][@<format>]

    For example:
    modetest -P 35@56:800x480@RG24

    Regards,
    Manisha
  • Hello,

    I'm using HDMI interface with 24bit color bit depth .

    Enabled eglfs in Qt.

    Here is the output of modetest

    root@am57xx-evm:~# modetest 
    trying to open device 'i915'...failed
    trying to open device 'amdgpu'...failed
    trying to open device 'radeon'...failed
    trying to open device 'nouveau'...failed
    trying to open device 'vmwgfx'...failed
    trying to open device 'omapdrm'...done
    [   59.291798] [drm] Got built-in EDID base block and 0 extensions from "edid/1280x800.bin" for connector "HDMI-A-1"
    Encoders:
    id      crtc    type    possible crtcs  possible clones
    34      39      TMDS    0x00000001      0x00000000
    
    Connectors:
    id      encoder status          name            size (mm)       modes   encoders
    35      34      connected       HDMI-A-1        250x160         2       34
      modes:
            name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
      1280x800 60 1280 1310 1410 1440 800 801 816 823 71000 flags: phsync, pvsync; type: preferred, driver
      1024x768 60 1024 1048 1184 1344 768 771 777 806 65000 flags: nhsync, nvsync; type: driver
      props:
            1 EDID:
                    flags: immutable blob
                    blobs:
    
                    value:
                            00ffffffffffff0031d8000000000000
                            101d0104a519100022644590585c8d29
                            25505400080001010101010101010101
                            010101010101bc1b00a0502017301e64
                            1f0000a01000001e000000ff004c696e
                            75782023300a20202020000000fd003b
                            3d303208000a202020202020000000fc
                            004d41582d585647410a202020200036
            2 DPMS:
                    flags: enum
                    enums: On=0 Standby=1 Suspend=2 Off=3
                    value: 0
            5 link-status:
                    flags: enum
                    enums: Good=0 Bad=1
                    value: 0
    
    CRTCs:
    id      fb      pos     size
    39      59      (0,0)   (1280x800)
      1280x800 60 1280 1310 1410 1440 800 801 816 823 71000 flags: phsync, pvsync; type: preferred, driver
      props:
            23 CTM:
                    flags: blob
                    blobs:
    
                    value:
            24 GAMMA_LUT:
                    flags: blob
                    blobs:
    
                    value:
            25 GAMMA_LUT_SIZE:
                    flags: immutable range
                    values: 0 4294967295
                    value: 256
            30 background:
                    flags: range
                    values: 0 16777215
                    value: 0
            31 trans-key-mode:
                    flags: enum
                    enums: disable=0 gfx-dst=1 vid-src=2
                    value: 0
            32 trans-key:
                    flags: range
                    values: 0 16777215
                    value: 0
            33 alpha_blender:
                    flags: range
                    values: 0 1
                    value: 0
            37 rotation:
                    flags: bitmask
                    values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10 reflect-y=0x20
                    value: 1
            27 zorder:
                    flags: range
                    values: 0 3
                    value: 0
    
    Planes:
    id      crtc    fb      CRTC x,y        x,y     gamma size      possible crtcs
    36      39      59      0,0             0,0     0               0x00000001
      formats: RX12 AR12 RG16 XR24 RG24 AR24 RA24 RX24 AR15 XR12 RA12 XR15
      props:
            6 type:
                    flags: immutable enum
                    enums: Overlay=0 Primary=1 Cursor=2
                    value: 1
            37 rotation:
                    flags: bitmask
                    values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10 reflect-y=0x20
                    value: 1
            27 zorder:
                    flags: range
                    values: 0 3
                    value: 0
            38 zpos:
                    flags: range
                    values: 0 3
                    value: 0
            28 global_alpha:
                    flags: range
                    values: 0 255
                    value: 255
            29 pre_mult_alpha:
                    flags: range
                    values: 0 1
                    value: 0
    40      0       0       0,0             0,0     0               0x00000001
      formats: RG16 RX12 YUYV AR15 RA24 NV12 RA12 XR24 RG24 UYVY AR12 XR15 AR24 XR12 RX24
      props:
            6 type:
                    flags: immutable enum
                    enums: Overlay=0 Primary=1 Cursor=2
                    value: 0
            41 rotation:
                    flags: bitmask
                    values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10 reflect-y=0x20
                    value: 1
            27 zorder:
                    flags: range
                    values: 0 3
                    value: 1
            42 zpos:
                    flags: range
                    values: 0 3
                    value: 1
            28 global_alpha:
                    flags: range
                    values: 0 255
                    value: 255
            29 pre_mult_alpha:
                    flags: range
                    values: 0 1
                    value: 0
    45      0       0       0,0             0,0     0               0x00000001
      formats: RG16 RX12 YUYV AR15 RA24 NV12 RA12 XR24 RG24 UYVY AR12 XR15 AR24 XR12 RX24
      props:
            6 type:
                    flags: immutable enum
                    enums: Overlay=0 Primary=1 Cursor=2
                    value: 0
            46 rotation:
                    flags: bitmask
                    values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10 reflect-y=0x20
                    value: 1
            27 zorder:
                    flags: range
                    values: 0 3
                    value: 2
            47 zpos:
                    flags: range
                    values: 0 3
                    value: 2
            28 global_alpha:
                    flags: range
                    values: 0 255
                    value: 255
            29 pre_mult_alpha:
                    flags: range
                    values: 0 1
                    value: 0
    50      0       0       0,0             0,0     0               0x00000001
      formats: RG16 RX12 YUYV AR15 RA24 NV12 RA12 XR24 RG24 UYVY AR12 XR15 AR24 XR12 RX24
      props:
            6 type:
                    flags: immutable enum
                    enums: Overlay=0 Primary=1 Cursor=2
                    value: 0
            51 rotation:
                    flags: bitmask
                    values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10 reflect-y=0x20
                    value: 1
            27 zorder:
                    flags: range
                    values: 0 3
                    value: 3
            52 zpos:
                    flags: range
                    values: 0 3
                    value: 3
            28 global_alpha:
                    flags: range
                    values: 0 255
                    value: 255
            29 pre_mult_alpha:
                    flags: range
                    values: 0 1
                    value: 0
    
    Frame buffers:
    id      size    pitch
    

    Here is the output of individual modetest on separate plane ids

    root@am57xx-evm:~# modetest -P 36@39:1280x800@RG24
    trying to open device 'i915'...failed
    trying to open device 'amdgpu'...failed
    trying to open device 'radeon'...failed
    trying to open device 'nouveau'...failed
    trying to open device 'vmwgfx'...failed
    trying to open device 'omapdrm'...done
    [  163.799329] [drm] Got built-in EDID base block and 0 extensions from "edid/1280x800.bin" for connector "HDMI-A-1"
    no unused plane available for CRTC 39
    
    root@am57xx-evm:~# modetest -P 40@39:1280x800@RG24
    trying to open device 'i915'...failed
    trying to open device 'amdgpu'...failed
    trying to open device 'radeon'...failed
    trying to open device 'nouveau'...failed
    trying to open device 'vmwgfx'...failed
    trying to open device 'omapdrm'...done
    [  267.839511] [drm] Got built-in EDID base block and 0 extensions from "edid/1280x800.bin" for connector "HDMI-A-1"
    testing 1280x800@RG24 overlay plane 40
    
    root@am57xx-evm:~# modetest -P 45@39:1280x800@RG24
    trying to open device 'i915'...failed
    trying to open device 'amdgpu'...failed
    trying to open device 'radeon'...failed
    trying to open device 'nouveau'...failed
    trying to open device 'vmwgfx'...failed
    trying to open device 'omapdrm'...done
    [  283.362912] [drm] Got built-in EDID base block and 0 extensions from "edid/1280x800.bin" for connector "HDMI-A-1"
    testing 1280x800@RG24 overlay plane 45
    
    root@am57xx-evm:~# modetest -P 50@39:1280x800@RG24
    trying to open device 'i915'...failed
    trying to open device 'amdgpu'...failed
    trying to open device 'radeon'...failed
    trying to open device 'nouveau'...failed
    trying to open device 'vmwgfx'...failed
    trying to open device 'omapdrm'...done
    [  290.657240] [drm] Got built-in EDID base block and 0 extensions from "edid/1280x800.bin" for connector "HDMI-A-1"
    testing 1280x800@RG24 overlay plane 50
    

  • How does your display output look for the last three modetest run?
  • Here are the outputs of those commands

    modetest -P 50@39:1280x800@RG24


    modetest -P 45@39:1280x800@RG24


    modetest -P 40@39:1280x800@RG24


  • Can someone guide me how to resolve this issue further.
  • Hello,

    Could you please share the boot log without modifying the edid? Also, I am wondering if you could please explain the reason for modifying the edid.

    Regards,
    Krunal
  • Hello,

    I will be closing the ticket and if you have more questions, please feel free to open the ticket in the future.

    Regards,
    Krunal

  • In our PCB RGB to LVDS interface connected as per vesa standard where tft output is not as per vesa standard.

    Correcting this have solved our issue.