How can I enable the Video Output on LS1028ARDB

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

How can I enable the Video Output on LS1028ARDB

2,554 Views
sebastian_plama
Contributor II

Is there any documentation or hints on how to actually get output on the Display Port?

0 Kudos
13 Replies

2,405 Views
sebastian_plama
Contributor II

After some more experiments, I think I got thefirmware loaded with `hdp load`.


The run sd_hdploadcmd does not work tough.

But the boot stops after these messages:

[    2.602646] [drm] Started firmware!
[    2.606148] [drm] CDN_API_CheckAlive returned ret = 0
[    2.611224] [drm] Firmware version: 23029, Lib version: 20691
[    2.617013] [drm] CDN_API_MainControl_blocking (ret = 0 resp = 1)
[    2.623165] [drm] CDN_API_General_Test_Echo_Ext_blocking (ret = 0 echo_resp = echo test)
[    2.631296] [drm] CDN_API_General_Write_Register_blockin ... setting LANES_CONFIG
[    2.638868] [drm] pixel engine reset
[    2.642460] [drm] CDN_*_Write_Register_blocking ... setting LANES_CONFIG 4e
[    2.651229] [drm] AFE_init
[    2.653951] [drm] deasserted reset
[    2.657448] Wait for A2 ACK
[    2.681809] [drm] AFE_power exit
[    2.685050] [drm] CDN_API_DPTX_SetVideo_blocking (ret = 0)
[    2.690642] mali-dp f080000.display: bound f1f0000.phy (ops imx_hdp_imx_ops)
[    2.697828] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.704470] [drm] No driver support for vblank timestamp query.

0 Kudos

2,405 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please configure Linux Kernel as the following to Enable IPUv3 Core, LCD controller driver, DRM driver,
Display Transmitter Controller driver, and Display pixel clock driver.

Device Drivers --->
       Graphics support --->
               <M> IPUv3 core support
               <M> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
       Arm devices --->
          [M] Arm Mali Display Processor
       [M] DRM Support for Freescale i.mx
       [M] IMX8 HD Display Controller
Common Clock Framework--->
          [*] Clock driver for LS1028A Display output

Loading the below display related modules when system boot up is done.

# insmod drm_panel_orientation_quirks.ko
# insmod drm.ko
# insmod drm_kms_helper.ko
# insmod imx_hdp_common.ko
# insmod mali-dp.ko
# insmod imx-hdptx.ko

0 Kudos

2,405 Views
sebastian_plama
Contributor II

There is no option for ''IPUv3 core support''

0 Kudos

2,405 Views
sebastian_plama
Contributor II

And when I built the kernel, how do I get onto the device?


edit:

I am trying to flash the sd card using this command: flex-installer -b bootpartition_LS_arm64_lts_5.4.tgz -r build/images/rootfs_lsdk2004_ubuntu_main_arm64_202007291456.tgz -f firmware_ls1028ardb_uboot_sdboot.img -d /dev/sda

but it fails with:

lsblk: /dev/sda2: not a block device

edit2:

you have to first run lex-installer -i auto -m ls1046ardb -d /dev/sda then it works

edit3:

now the system boots again, but:

root@localhost:~# vim /etc/systemd/network/20-wired.network
vim: error while loading shared libraries: /usr/lib/aarch64-linux-gnu/libgpm.so.2: file too short

Funnily enough, this system comes with networking disabled, so I need vim to enable the network. But I can't, because libc is broken. And I can't fix libc because the network is not enabled.

I do not understand why you are not shipping a standard image with network and video enabeld.

0 Kudos

2,405 Views
yipingwang
NXP TechSupport
NXP TechSupport

I used Image and fsl-ls1028a-rdb.dtb from the pre-built bootpartition package.

Under u-boot execute the following command

=> tftp 0xa0000000 nxa22585/ls1028ardb/ls1028a-dp-fw.bin
=> hdp load 0xa0000000 0x2000
Loading hdp firmware from 0x00000000a0000000 offset 0x0000000000002000
Loading hdp firmware Complete
=>

I got Linux Kernel boot up log as the following.

[ 2.532299] [drm] found ARM Mali-DP500 version r1p2
[ 2.537331] [drm] Resolution 3840x2160@60 is enabled
[ 2.542315] [drm] Resolution 1920x1080@60 is enabled
[ 2.547300] [drm] Resolution 1280x720@60 is enabled
[ 2.552195] [drm] Resolution 720x480@60 is enabled
[ 2.557006] i.mx8-hdp f200000.hdp: lane_mapping 0x4e
[ 2.561988] i.mx8-hdp f200000.hdp: edp_link_rate 0x06
[ 2.567059] i.mx8-hdp f200000.hdp: dp_num_lanes 0x04
[ 2.572106] [drm] Started firmware!
[ 2.575600] [drm] CDN_API_CheckAlive returned ret = 0
[ 2.580672] [drm] Firmware version: 32955, Lib version: 20691
[ 2.586461] [drm] CDN_API_MainControl_blocking (ret = 0 resp = 1)
[ 2.592609] [drm] CDN_API_General_Test_Echo_Ext_blocking (ret = 0 echo_resp = echo test)
[ 2.600739] [drm] CDN_API_General_Write_Register_blockin ... setting LANES_CONFIG
[ 2.608308] [drm] pixel engine reset
[ 2.611903] [drm] CDN_*_Write_Register_blocking ... setting LANES_CONFIG 4e
[ 2.620851] [drm] AFE_init
[ 2.623570] [drm] deasserted reset
[ 2.627076] Wait for A2 ACK
[ 2.651655] [drm] AFE_power exit
[ 2.654892] [drm] CDN_API_DPTX_SetVideo_blocking (ret = 0)
[ 2.660479] mali-dp f080000.malidp: bound f200000.hdp (ops imx_hdp_imx_ops)
[ 2.667592] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.674233] [drm] No driver support for vblank timestamp query.
[ 2.680232] [drm] Cannot find any crtc or sizes
[ 2.685041] [drm] Initialized mali-dp 1.0.0 20160106 for f080000.malidp on minor 0
[ 2.696315] brd: module loaded

0 Kudos

2,405 Views
yipingwang
NXP TechSupport
NXP TechSupport

The Kernel configuration mentioned in LSDK user manual is suitable for Linux Kernel 4.19 release.

Video feature has already been enabled in the default Linux Kernel configuration, please use the default Linux Kernel configuration file provided in LSDK 20.04 release, no need to do the customization.

0 Kudos

2,405 Views
sebastian_plama
Contributor II

You keep giving me contradictory and incomplete instructions, that are inconsistent with the documentation and reality.

Here is where I am at:

I followed this guide to get an SD card with a bootable Linux image: Getting Started with LS1028ARDB | NXP 

Then, I built `ls1028a-dp-fw.bin` using  flex-builder -c dp_firmware_cadence.

Then with ext4load usb 0:1 ls1028a-dp-fw.bin and hdp load 0x98000000 0x20000 I loaded the firmware.
Then I run boot.

The boot stops again at:

[    2.702767] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    2.709410] [drm] No driver support for vblank timestamp query.

Please answer the following questions:

* When I use hdp load, where is the firmware actually loaded to and does it persist there? Is it on the sd card, the internal flash, the spi storage?
* Can I use the image provided by the Getting Started guide I linked above or do I have to build my own?
* If I have to build my own, how can I do that and how can I then flash it to an sdcard.

Some of these things I already found in the documentation, but very often the things that are in the documentation do not actually work or are described in a way that is missing important context, making it hard to follow.

Currently, I am not able to boot the system anymore, not even with the image that worked before. I got into this situation following your documentation.

0 Kudos

2,405 Views
yipingwang
NXP TechSupport
NXP TechSupport

You should use command "ext4load usb 0:1 0x98000000 ls1028a-dp-fw.bin" 

1. You could load the firmware in any storage device.

2. No need to build Image by your own, you could download the pre-built image with the following command.

$ flex-installer -i download -m ls1028ardb

0 Kudos

2,405 Views
sebastian_plama
Contributor II

Thanks, now I can at least boot again. However, still no video out:

root@localhost:~# startx
xauth:  file /root/.Xauthority does not exist


X.Org X Server 1.19.6
Release Date: 2017-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-168-generic aarch64 Ubuntu
Current Operating System: Linux localhost 5.4.3 #2 SMP PREEMPT Thu Apr 9 04:37:43 CST 2020 aarch64
Kernel command line: console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 root=PARTUUID=a81eac31-04 rw rootwait video=1920x1080-32@60 cma=256M iommu.passthrough=1 arm-smmu.disable_bypass=0
Build Date: 14 November 2019  06:20:13PM
xorg-server 2:1.19.6-1ubuntu4.4 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.34.0
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) no[  976.230908] cdns-mhdp-imx f200000.display: [drm:cdns_mhdp_get_edid_block] *ERROR* get block[0] edid failed: -22
t implemented, ([  976.230926] [drm:cdns_dp_connector_get_modes] *ERROR* Invalid edid
??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Tue Aug  4 11:48:22 2020
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
MESA-LOADER: failed to open mali-dp (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
failed to load driver: mali-dp
MESA-LOADER: failed to open kms_swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast (search paths /usr/lib/aarch64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
failed to load swrast driver
couldn't get display device
[  976.332081] cdns-mhdp-imx f200000.display: [drm:cdns_mhdp_get_edid_block] *ERROR* get block[0] edid failed: -22
[  976.342289] [drm:cdns_dp_connector_get_modes] *ERROR* Invalid edid
[  976.394632] cdns-mhdp-imx f200000.display: [drm:cdns_mhdp_get_edid_block] *ERROR* get block[0] edid failed: -22
[  976.404780] [drm:cdns_dp_connector_get_modes] *ERROR* Invalid edid
(EE)
(EE) Backtrace:
(EE) 0: /usr/lib/xorg/Xorg (xorg_backtrace+0x5c) [0xaaaae7a3d174]
(EE)
(EE) Segmentation fault at address 0x822c50
(EE)
Fatal server error:
(EE) Caught signal 11 (Segmentation fault). Server aborting
(EE)
(EE)
Please consult the The X.Org Foundation support
     at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/var/log/Xorg.1.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

0 Kudos

2,405 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please setting bootargs to specify the display resolution and CMA memory size
• To support 480p resolution, add the following argument to bootargs (the minimum CMA size is 64M bytes):
video=720x480-32@60 cma=256M
• To support 720p resolution, add the following argument to bootargs:
video=1280x720-32@60 cma=256M
• To support 1080p resolution, add the following argument to bootargs:
video=1920x1080-32@60 cma=256M
• To support 4k resolution, add the following arguments to bootargs:
video=3840x2160-32@60 cma=256M

After Linux Kernel boot up, please use "gst-play-1.0" to play an video.

0 Kudos

2,405 Views
sebastian_plama
Contributor II

For anyone who is wondering, you can build a kernel with your own configuration using this command:

flex-builder -c linux:custom -a arm64
0 Kudos

2,405 Views
sebastian_plama
Contributor II

Thank you.

This guide is hard to follow.

When I run `flex-builder -c dp_firmware_cadence` as described, the `‘build/firmware/dp_firmware_cadence/dp/` does not get created and the `ls1028a-dp-fw.bin` is nowhere to be found.

0 Kudos

2,405 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to section  "7.2.19 LCD and display transmitter controller" in LSDK 20.04 user manual which could be downloaded from Layerscape SDK | NXP .

0 Kudos