zoukankan      html  css  js  c++  java
  • 在VCUTRD 2020.1 里设置HDMI-TX显示QT界面

     

    1. 作者

    付汉杰 hankf@xilinx.com 2020-08-26

    2. 测试环境

    1. ZCU106 Rev 1.0
    2. Vivado 2020.1
    3. PetaLinux 2020.1
    4. VCU TRD 2020.1

    3. Mixer的硬件设置

    将VCU TRD 2020.1 的Vivado工程中的Mixer的Layer 8按如下修改。

    1. Video format修改为BGRA8
    2. 勾选 Enable Global Alpha

    编译整个工程, 得到bit文件,导出含有bit的xsa文件。

    4. PetaLinux 工程

    基于rdf0428-zcu106-vcu-trd-2020.1/apu/vcu_petalinux_bsp/xilinx-vcu-zcu106-v2020.1-final.bsp创建工程,导入上述xsa文件。

    4.1. Mixer的软件设置

    在project-spec/meta-user/recipes-bsp/device-tree/files/vcu_trd.dtsi里,设置Mixer的DMA和Primary Plane等信息。

    VCU TRD 参考设计中的硬件工程和devicetree必须对应。vcu_trd.dtsi需要和Vivado工程vcu_trd对应使用。在project-spec/meta-user/recipes-bsp/device-tree/files/目录下,system-user.dtsi必须指向vcu_trd.dtsi。

    4.1.1. 删除layer0的primary

        &xx_mix_master {
    		/delete-property/ xlnx,layer-primary;
        };
    

    4.1.2. 增加layer 8的primary

    	&xx_mix_overlay_8 {
    		xlnx,layer-alpha;
            xlnx,layer-primary;
    		xlnx,layer-max-height = <1080>;
    		xlnx,layer-max-width = <1920>;
    		xlnx,vformat = "AR24";
    	};
    

    4.2. 指定xorg使用DRI设备

    把文件project-spec/meta-user/recipes-graphics/xorg-xserver/xserver-xf86-config/zynqmp/xorg.conf中的DRICard值,从0改为1。修改后,Section "Device"如下。

    	Section "Device"
    			Identifier      "ZynqMP"
    			Driver          "armsoc"
    			Option          "DRICard"               "1"
    			Option          "DRI2"                  "true"
    			Option          "DRI2_PAGE_FLIP"        "false"
    			Option          "DRI2_WAIT_VSYNC"       "true"
    			Option          "SWcursorLCD"           "false"
    			Option          "DEBUG"                 "false"
    			Option          "DPMS"                  "false"
    	EndSection
    
    单板启动后,文件在目录/etc/X11/下,也可以在单板启动后修改/etc/X11/xorg.conf中的DRICard值为1。

    4.3. 编译PetaLinux 工程

    编译PetaLinux工程,生成BOOT.BIN、boot.scr、Image.ub文件。

    5. 测试过程

    5.1. 启动开发板

    将BOOT.BIN、boot.scr、Image.ub文件,拷入SD卡中,启动开发板。

    5.2. 查看DRI设备信息

    查看DRI设备信息, ls -l /dev/dri/by-path/,可以得到准确的mixer信息。

    root@vcu_trd:~# ls -l /dev/dri/by-path/
    total 0
    lrwxrwxrwx    1 root     root             8 Aug 26 01:41 platform-a0070000.v_mix-card -> ../card1
    lrwxrwxrwx    1 root     root             8 Aug 26 01:41 platform-fd4a0000.zynqmp-display-card -> ../card0
    

    5.3. 查看并设置mixer primary Plane

    root@vcu_trd:~# ls -l /sys/module/xlnx_mixer/parameters/mixer_primary_enable
    -rw-------    1 root     root          4096 Aug 26 01:46 /sys/module/xlnx_mixer/parameters/mixer_primary_enable
    root@vcu_trd:~# cat /sys/module/xlnx_mixer/parameters/mixer_primary_enable
    N
    root@vcu_trd:~# echo Y > /sys/module/xlnx_mixer/parameters/mixer_primary_enable
    root@vcu_trd:~# cat /sys/module/xlnx_mixer/parameters/mixer_primary_enable
    Y
    

    5.4. 使用命令modetest查看HDMI-TX信息

    modetest的设备信息与硬件相关。根据DRI设备信息,本设计的modetest命令是“modetest -D a0070000.v_mix”。通过查看HDMI-TX信息,可以得到Connectors ID。

    上述命令的执行记录很长,也可以使用grep过滤输出,比如使用grep -A 8 -i "connectors",之输出 Connectors字段后的8行打印。过滤后的信息如下:

    root@vcu_trd:~# modetest -D a0070000.v_mix | grep -A 8 -i "connectors"
    Connectors:
    id      encoder status          name            size (mm)       modes   encoders
    44      43      connected       HDMI-A-1        610x350         57      43
      modes:
            name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
      3840x2160 60.00 3840 4016 4104 4400 2160 2168 2178 2250 594000 flags: phsync, nvsync; type: preferred, driver
      3840x2160 60.00 3840 4016 4104 4400 2160 2168 2178 2250 594000 flags: phsync, pvsync; type: driver
      3840x2160 59.94 3840 4016 4104 4400 2160 2168 2178 2250 593407 flags: phsync, pvsync; type: driver
      3840x2160 50.00 3840 4896 4984 5280 2160 2168 2178 2250 594000 flags: phsync, pvsync; type: driver
    root@vcu_trd:~#
    

    命令“modetest -D a0070000.v_mix”的完整执行记录如下:

    使用命令modetest -D a0070000.v_mix查看HDMI-TX信息

      
    root@vcu_trd:~# modetest -D a0070000.v_mix
    Encoders:
    id      crtc    type    possible crtcs  possible clones
    43      42      TMDS    0x00000001      0x00000000
    Connectors:
    id      encoder status          name            size (mm)       modes   encoders
    44      43      connected       HDMI-A-1        610x350         57      43
    modes:
    name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
    3840x2160 60.00 3840 4016 4104 4400 2160 2168 2178 2250 594000 flags: phsync, nvsync; type: preferred, driver
    3840x2160 60.00 3840 4016 4104 4400 2160 2168 2178 2250 594000 flags: phsync, pvsync; type: driver
    3840x2160 59.94 3840 4016 4104 4400 2160 2168 2178 2250 593407 flags: phsync, pvsync; type: driver
    3840x2160 50.00 3840 4896 4984 5280 2160 2168 2178 2250 594000 flags: phsync, pvsync; type: driver
    3840x2160 30.00 3840 4016 4104 4400 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
    3840x2160 30.00 3840 4016 4104 4400 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
    3840x2160 29.97 3840 4016 4104 4400 2160 2168 2178 2250 296703 flags: phsync, pvsync; type: driver
    3840x2160 25.00 3840 4896 4984 5280 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
    3840x2160 25.00 3840 4896 4984 5280 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
    3840x2160 24.00 3840 5116 5204 5500 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
    3840x2160 24.00 3840 5116 5204 5500 2160 2168 2178 2250 297000 flags: phsync, pvsync; type: driver
    3840x2160 23.98 3840 5116 5204 5500 2160 2168 2178 2250 296703 flags: phsync, pvsync; type: driver
    2560x1440 59.95 2560 2608 2640 2720 1440 1443 1448 1481 241500 flags: phsync, nvsync; type: driver
    2048x1280 59.99 2048 2192 2416 2784 1280 1281 1284 1325 221277 flags: nhsync, pvsync; type:
    2048x1080 24.00 2048 2096 2128 2208 1080 1083 1093 1099 58230 flags: phsync, nvsync; type: driver
    1920x1080 60.00 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: nhsync, nvsync; type: driver
    1920x1080 60.00 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
    1920x1080 59.94 1920 2008 2052 2200 1080 1084 1089 1125 148352 flags: phsync, pvsync; type: driver
    1920x1080 50.00 1920 2448 2492 2640 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
    1920x1080 30.00 1920 2008 2052 2200 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
    1920x1080 29.97 1920 2008 2052 2200 1080 1084 1089 1125 74176 flags: phsync, pvsync; type: driver
    1920x1080 25.00 1920 2448 2492 2640 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
    1920x1080 24.00 1920 2558 2602 2750 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
    1920x1080 23.98 1920 2558 2602 2750 1080 1084 1089 1125 74176 flags: phsync, pvsync; type: driver
    1600x1200 60.00 1600 1664 1856 2160 1200 1201 1204 1250 162000 flags: phsync, pvsync; type: driver
    1600x900 60.00 1600 1624 1704 1800 900 901 904 1000 108000 flags: phsync, pvsync; type: driver
    1280x1024 75.02 1280 1296 1440 1688 1024 1025 1028 1066 135000 flags: phsync, pvsync; type: driver
    1280x1024 60.02 1280 1328 1440 1688 1024 1025 1028 1066 108000 flags: phsync, pvsync; type: driver
    1920x1080i 30.00 1920 2008 2052 2200 540 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
    1920x1080i 29.97 1920 2008 2052 2200 540 1084 1094 1125 74176 flags: phsync, pvsync, interlace; type: driver
    1920x1080i 25.00 1920 2448 2492 2640 540 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
    1920x1080i 25.00 1920 1952 2120 2304 540 1126 1136 1250 72000 flags: phsync, nvsync, interlace; type: driver
    1152x864 75.00 1152 1216 1344 1600 864 865 868 900 108000 flags: phsync, pvsync; type: driver
    1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver
    1280x720 59.94 1280 1390 1430 1650 720 725 730 750 74176 flags: phsync, pvsync; type: driver
    1280x720 50.00 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver
    1024x768 75.03 1024 1040 1136 1312 768 769 772 800 78750 flags: phsync, pvsync; type: driver
    1024x768 60.00 1024 1048 1184 1344 768 771 777 806 65000 flags: nhsync, nvsync; type: driver
    800x600 75.00 800 816 896 1056 600 601 604 625 49500 flags: phsync, pvsync; type: driver
    800x600 60.32 800 840 968 1056 600 601 605 628 40000 flags: phsync, pvsync; type: driver
    720x576 50.00 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync; type: driver
    720x576 50.00 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync; type: driver
    720x480 60.00 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync; type: driver
    720x480 60.00 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync; type: driver
    720x480 59.94 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync; type: driver
    720x480 59.94 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync; type: driver
    640x480 75.00 640 656 720 840 480 481 484 500 31500 flags: nhsync, nvsync; type: driver
    640x480 60.00 640 656 752 800 480 490 492 525 25200 flags: nhsync, nvsync; type: driver
    640x480 59.94 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync; type: driver
    640x480 59.94 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync; type: driver
    720x400 70.08 720 738 846 900 400 412 414 449 28320 flags: nhsync, pvsync; type: driver
    720x576i 50.00 720 732 795 864 288 580 586 625 27000 flags: nhsync, nvsync, interlace, dblclk; type: driver
    720x576i 50.00 720 732 795 864 288 580 586 625 27000 flags: nhsync, nvsync, interlace, dblclk; type: driver
    720x480i 60.00 720 739 801 858 240 488 494 525 27028 flags: nhsync, nvsync, interlace, dblclk; type: driver
    720x480i 60.00 720 739 801 858 240 488 494 525 27028 flags: nhsync, nvsync, interlace, dblclk; type: driver
    720x480i 59.94 720 739 801 858 240 488 494 525 27000 flags: nhsync, nvsync, interlace, dblclk; type: driver
    720x480i 59.94 720 739 801 858 240 488 494 525 27000 flags: nhsync, nvsync, interlace, dblclk; type: driver
    props:
    1 EDID:
    flags: immutable blob
    blobs:
                value:
                        00ffffffffffff0010ac27a14c543830
                        171d0103803d2378eeee95a3544c9926
                        0f5054a54b00714f8180a9c0a940d1c0
                        e1000101010108e80030f2705a80b058
                        8a00615d2100001a000000ff004d5950
                        464b3936323038544c0a000000fc0044
                        454c4c205532373138514d0a000000fd
                        0031560a893c000a2020202020200101
                        02033ef15861605f5e5d100504020716
                        01141f1213272021220306111523091f
                        07830100006d030c0010003044200060
                        03020167d85dc401788001e20f03565e
                        00a0a0a0295030203500615d2100001a
                        04740030f2705a80b0588a00615d2100
                        001ebf1600a08038134030203a00615d
                        2100001a0000000000000000000000a4
        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
        6 non-desktop:
                flags: immutable range
                values: 0 1
                value: 0
        4 TILE:
                flags: immutable blob
                blobs:
    
                value:
        20 CRTC_ID:
                flags: object
                value: 42
    
    CRTCs:
    id      fb      pos     size
    42      48      (0,0)   (3840x2160)
    60.00 3840 4016 4104 4400 2160 2168 2178 2250 594000 flags: phsync, nvsync; type:
    props:
    22 ACTIVE:
    flags: range
    values: 0 1
    value: 1
    23 MODE_ID:
    flags: blob
    blobs:
                value:
                        50100900000fb00f0810301100007008
                        78088208ca0800000000000009000000
                        00000000000000000000000000000000
                        00000000000000000000000000000000
                        00000000
        19 OUT_FENCE_PTR:
                flags: range
                values: 0 18446744073709551615
                value: 0
        24 VRR_ENABLED:
                flags: range
                values: 0 1
                value: 0
    
    Planes:
    id      crtc    fb      CRTC x,y        x,y     gamma size      possible crtcs
    33      0       0       0,0             0,0     0               0x00000001
    formats: NV12
    props:
    8 type:
    flags: immutable enum
    enums: Overlay=0 Primary=1 Cursor=2
    value: 0
    17 FB_ID:
    flags: object
    value: 0
    18 IN_FENCE_FD:
    flags: signed range
    values: -1 2147483647
    value: -1
    20 CRTC_ID:
    flags: object
    value: 0
    13 CRTC_X:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    14 CRTC_Y:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    15 CRTC_W:
    flags: range
    values: 0 2147483647
    value: 0
    16 CRTC_H:
    flags: range
    values: 0 2147483647
    value: 0
    9 SRC_X:
    flags: range
    values: 0 4294967295
    value: 0
    10 SRC_Y:
    flags: range
    values: 0 4294967295
    value: 0
    11 SRC_W:
    flags: range
    values: 0 4294967295
    value: 0
    12 SRC_H:
    flags: range
    values: 0 4294967295
    value: 0
    34      0       0       0,0             0,0     0               0x00000001
    formats: NV12
    props:
    8 type:
    flags: immutable enum
    enums: Overlay=0 Primary=1 Cursor=2
    value: 0
    17 FB_ID:
    flags: object
    value: 0
    18 IN_FENCE_FD:
    flags: signed range
    values: -1 2147483647
    value: -1
    20 CRTC_ID:
    flags: object
    value: 0
    13 CRTC_X:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    14 CRTC_Y:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    15 CRTC_W:
    flags: range
    values: 0 2147483647
    value: 0
    16 CRTC_H:
    flags: range
    values: 0 2147483647
    value: 0
    9 SRC_X:
    flags: range
    values: 0 4294967295
    value: 0
    10 SRC_Y:
    flags: range
    values: 0 4294967295
    value: 0
    11 SRC_W:
    flags: range
    values: 0 4294967295
    value: 0
    12 SRC_H:
    flags: range
    values: 0 4294967295
    value: 0
    35      0       0       0,0             0,0     0               0x00000001
    formats: NV12
    props:
    8 type:
    flags: immutable enum
    enums: Overlay=0 Primary=1 Cursor=2
    value: 0
    17 FB_ID:
    flags: object
    value: 0
    18 IN_FENCE_FD:
    flags: signed range
    values: -1 2147483647
    value: -1
    20 CRTC_ID:
    flags: object
    value: 0
    13 CRTC_X:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    14 CRTC_Y:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    15 CRTC_W:
    flags: range
    values: 0 2147483647
    value: 0
    16 CRTC_H:
    flags: range
    values: 0 2147483647
    value: 0
    9 SRC_X:
    flags: range
    values: 0 4294967295
    value: 0
    10 SRC_Y:
    flags: range
    values: 0 4294967295
    value: 0
    11 SRC_W:
    flags: range
    values: 0 4294967295
    value: 0
    12 SRC_H:
    flags: range
    values: 0 4294967295
    value: 0
    36      0       0       0,0             0,0     0               0x00000001
    formats: NV12
    props:
    8 type:
    flags: immutable enum
    enums: Overlay=0 Primary=1 Cursor=2
    value: 0
    17 FB_ID:
    flags: object
    value: 0
    18 IN_FENCE_FD:
    flags: signed range
    values: -1 2147483647
    value: -1
    20 CRTC_ID:
    flags: object
    value: 0
    13 CRTC_X:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    14 CRTC_Y:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    15 CRTC_W:
    flags: range
    values: 0 2147483647
    value: 0
    16 CRTC_H:
    flags: range
    values: 0 2147483647
    value: 0
    9 SRC_X:
    flags: range
    values: 0 4294967295
    value: 0
    10 SRC_Y:
    flags: range
    values: 0 4294967295
    value: 0
    11 SRC_W:
    flags: range
    values: 0 4294967295
    value: 0
    12 SRC_H:
    flags: range
    values: 0 4294967295
    value: 0
    37      0       0       0,0             0,0     0               0x00000001
    formats: NV12
    props:
    8 type:
    flags: immutable enum
    enums: Overlay=0 Primary=1 Cursor=2
    value: 0
    17 FB_ID:
    flags: object
    value: 0
    18 IN_FENCE_FD:
    flags: signed range
    values: -1 2147483647
    value: -1
    20 CRTC_ID:
    flags: object
    value: 0
    13 CRTC_X:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    14 CRTC_Y:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    15 CRTC_W:
    flags: range
    values: 0 2147483647
    value: 0
    16 CRTC_H:
    flags: range
    values: 0 2147483647
    value: 0
    9 SRC_X:
    flags: range
    values: 0 4294967295
    value: 0
    10 SRC_Y:
    flags: range
    values: 0 4294967295
    value: 0
    11 SRC_W:
    flags: range
    values: 0 4294967295
    value: 0
    12 SRC_H:
    flags: range
    values: 0 4294967295
    value: 0
    38      0       0       0,0             0,0     0               0x00000001
    formats: NV12
    props:
    8 type:
    flags: immutable enum
    enums: Overlay=0 Primary=1 Cursor=2
    value: 0
    17 FB_ID:
    flags: object
    value: 0
    18 IN_FENCE_FD:
    flags: signed range
    values: -1 2147483647
    value: -1
    20 CRTC_ID:
    flags: object
    value: 0
    13 CRTC_X:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    14 CRTC_Y:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    15 CRTC_W:
    flags: range
    values: 0 2147483647
    value: 0
    16 CRTC_H:
    flags: range
    values: 0 2147483647
    value: 0
    9 SRC_X:
    flags: range
    values: 0 4294967295
    value: 0
    10 SRC_Y:
    flags: range
    values: 0 4294967295
    value: 0
    11 SRC_W:
    flags: range
    values: 0 4294967295
    value: 0
    12 SRC_H:
    flags: range
    values: 0 4294967295
    value: 0
    39      0       0       0,0             0,0     0               0x00000001
    formats: NV12
    props:
    8 type:
    flags: immutable enum
    enums: Overlay=0 Primary=1 Cursor=2
    value: 0
    17 FB_ID:
    flags: object
    value: 0
    18 IN_FENCE_FD:
    flags: signed range
    values: -1 2147483647
    value: -1
    20 CRTC_ID:
    flags: object
    value: 0
    13 CRTC_X:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    14 CRTC_Y:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    15 CRTC_W:
    flags: range
    values: 0 2147483647
    value: 0
    16 CRTC_H:
    flags: range
    values: 0 2147483647
    value: 0
    9 SRC_X:
    flags: range
    values: 0 4294967295
    value: 0
    10 SRC_Y:
    flags: range
    values: 0 4294967295
    value: 0
    11 SRC_W:
    flags: range
    values: 0 4294967295
    value: 0
    12 SRC_H:
    flags: range
    values: 0 4294967295
    value: 0
    40      42      48      0,0             0,0     0               0x00000001
    formats: AR24
    props:
    8 type:
    flags: immutable enum
    enums: Overlay=0 Primary=1 Cursor=2
    value: 1
    17 FB_ID:
    flags: object
    value: 48
    18 IN_FENCE_FD:
    flags: signed range
    values: -1 2147483647
    value: -1
    20 CRTC_ID:
    flags: object
    value: 42
    13 CRTC_X:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    14 CRTC_Y:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    15 CRTC_W:
    flags: range
    values: 0 2147483647
    value: 3840
    16 CRTC_H:
    flags: range
    values: 0 2147483647
    value: 2160
    9 SRC_X:
    flags: range
    values: 0 4294967295
    value: 0
    10 SRC_Y:
    flags: range
    values: 0 4294967295
    value: 0
    11 SRC_W:
    flags: range
    values: 0 4294967295
    value: 251658240
    12 SRC_H:
    flags: range
    values: 0 4294967295
    value: 141557760
    32 alpha:
    flags: range
    values: 0 256
    value: 256
    41      0       0       0,0             0,0     0               0x00000001
    formats: BG24
    props:
    8 type:
    flags: immutable enum
    enums: Overlay=0 Primary=1 Cursor=2
    value: 0
    17 FB_ID:
    flags: object
    value: 0
    18 IN_FENCE_FD:
    flags: signed range
    values: -1 2147483647
    value: -1
    20 CRTC_ID:
    flags: object
    value: 0
    13 CRTC_X:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    14 CRTC_Y:
    flags: signed range
    values: -2147483648 2147483647
    value: 0
    15 CRTC_W:
    flags: range
    values: 0 2147483647
    value: 0
    16 CRTC_H:
    flags: range
    values: 0 2147483647
    value: 0
    9 SRC_X:
    flags: range
    values: 0 4294967295
    value: 0
    10 SRC_Y:
    flags: range
    values: 0 4294967295
    value: 0
    11 SRC_W:
    flags: range
    values: 0 4294967295
    value: 0
    12 SRC_H:
    flags: range
    values: 0 4294967295
    value: 0

    Frame buffers:
    id size pitch

    5.4.0.1. 使用命令modetest设置分辨率

    modetest的Connectors ID与硬件设计相关。根据HDMI-TX设备信息,本设计的Connectors ID是44。对应的modetest命令是“modetest -D a0070000.v_mix -s 41:1920x1080-60@AR24”。执行记录如下。

    root@vcu_trd:~# modetest -D a0070000.v_mix -s 44:1920x1080-60@AR24
    setting mode 1920x1080-60.00Hz@AR24 on connectors 44, crtc 42
    

    5.4.0.2. 启动Xorg

    使用新的配置启动Xorg,需要先杀掉旧的Xorg。

    root@vcu_trd:~# ps -A |grep -i xorg
      853 root      0:00 xinit /etc/X11/Xsession -- /usr/bin/Xorg :0 -br -pn
      859 root      0:00 /usr/bin/Xorg :0 -br -pn
     1095 root      0:00 grep -i xorg
    root@vcu_trd:~# kill 853
    
    xinit: connection to X server lost
    waiting for X server to shut down dbus-daemon[896]: Reloaded configuration
    [  696.359949] Warning: Unknown drm_fourcc format code: 875713089
    (II) Server terminated successfully (0). Closing log file.
    xinit: unexpected signal 15
    
    root@vcu_trd:~# ps -A |grep -i xorg
     1100 root      0:00 grep -i xorg
     
    root@vcu_trd:~# Xorg &
    [1] 1101
    X.Org X Server 1.20.5
    X Protocol Version 11, Revision 0
    Build Operating System: Linux 3.10.0-693.el7.x86_64 x86_64
    Current Operating System: Linux vcu_trd 5.4.0-xilinx-v2020.1 #1 SMP Tue Aug 25 09:25:42 UTC 2020 aarch64
    Kernel command line: earlycon clk_ignore_unused consoleblank=0 cma=1700M uio_pdrv_genirq.of_id=generic-uio
    Build Date: 26 May 2020  09:01:47PM
    Current version of pixman: 0.38.4
            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) not implemented, (??) unknown.
    (==) Log file: "/var/log/Xorg.0.log", Time: Wed Aug 26 01:53:07 2020
    (==) Using config file: "/etc/X11/xorg.conf"
    (==) Using system config directory "/usr/share/X11/xorg.conf.d"
    root@vcu_trd:~# The XKEYBOARD keymap compiler (xkbcomp) reports:
    > Warning:          Unsupported high keycode 372 for name <I372> ignored
    >                   X11 cannot support keycodes above 255.
    >                   This warning only shows for the first high keycode.
    Errors from xkbcomp are not fatal to the X server
    

    5.5. 运行QT程序

    运行QT程序后,HDMI显示器上,能看到六个每面有数字立方体。

    root@vcu_trd:~# export DISPLAY=:0.0
    root@vcu_trd:~# QT_QPA_PLATFORM=eglfs /usr/share/examples/opengl/textures/textures
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/var/volatile/tmp/runtime-root'
    Unable to query physical screen size, defaulting to 100 dpi.
    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
    Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.
    

    6. 常见问题

    6.1. modetest设置格式失败。

    因为primary layer没有使能AR24格式,modetest报告错误“failed to set mode: Function not implemented”。请检查硬件和devicetree。

    root@vcu_trd:~# modetest -D a0070000.v_mix -s 44:1920x1080-60@AR24
    setting mode 1920x1080-60.00Hz@AR24 on connectors 44, crtc 42
    failed to set mode: Function not implemented
    

    6.2. Xorg设置格式失败。

    因为primary layer没有使能AR24格式,Xorg报告错误“ERROR: drm failed to set mode: Invalid argument”。请检查硬件和devicetree设置。

    root@vcu_trd:~# cat /var/log/Xorg.0.log
    [   400.794] (II) ARMSOC(0): Setting swap chain size: 2
    [   400.794] (II) ARMSOC(0): [DRI2] Setup complete
    [   400.794] (II) ARMSOC(0): [DRI2]   DRI driver: armsoc
    [   400.794] (==) ARMSOC(0): Backing store enabled
    [   400.794] (==) ARMSOC(0): Silken mouse enabled
    [   400.794] (II) ARMSOC(0): HW cursor init()
    [   400.794] (EE) ARMSOC(0): ERROR: drm failed to set mode: Invalid argument
    [   400.794] (EE) ARMSOC(0): ERROR: xf86SetDesiredModes() failed!
    [   400.794] (EE) ARMSOC(0): ERROR: ARMSOCEnterVT() failed!
    [   400.800] (EE)
    Fatal server error:
    [   400.800] (EE) AddScreen/ScreenInit failed for driver 0
    [   400.800] (EE)
    [   400.800] (EE)
    Please consult the The X.Org Foundation support
             at http://wiki.x.org
     for help.
    [   400.800] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
    [   400.800] (EE)
    [   400.801] (EE) Server terminated with error (1). Closing log file.
    

    7. 参考文档

    https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841850/Video+Mixer#Test+Procedure

    https://github.com/Xilinx/linux-xlnx/blob/master/Documentation/devicetree/bindings/display/xlnx/xlnx%2Cmixer.txt

    https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/460948332/Zynq+UltraScale+MPSoC+VCU+TRD+2020.1

    https://xilinx.sharepoint.com/sites/xkb/SitePages/ArticleViewer.aspx?articleNumber=73119

    8. 支持人员

    Lonley Zhang,Jimmy Chen, Liu Ka。
  • 相关阅读:
    search for a range
    search in rotated sorted array
    MSDN--Windows Server
    Windows Server 2016- Windows Server 2016 上 HYPER-V 中的新增功能
    Azure 媒体服务产品简介
    EMC Avamar Virtual Edition 7.1.1 for Microsoft Azure and Hyper-V Released
    漫游用户配置文件 -文件夹重定向
    How to Install office 365 Plus without ODT
    Azure IoT
    AD FS deployment in Azure
  • 原文地址:https://www.cnblogs.com/hankfu/p/13589203.html
Copyright © 2011-2022 走看看