查看: 3264|回复: 0

HDMI调试常用命令

[复制链接]

10

主题

0

回帖

3034

积分

论坛元老

Rank: 8Rank: 8

积分
3034
发表于 2019-5-24 10:52:00 | 显示全部楼层 |阅读模式
查看VOP状态
1、VOP状态(开启/关闭)
2、VOP对应接口类型(MIPI/HDMI)
3、对应显示的分辨率、详细信息
rk3399pro:/ # cat /d/dri/0/summary
VOP [ff900000.vop]: ACTIVE        //VOPB状态
    Connector: DSI                                //VOPB连接DSI
        overlay_mode[0] bus_format[0] output_mode[0] color_space[0]
    Display mode: 1920x1080p60
        clk[148500] real_clk[148500] type[8] flag[a]
        H: 1920 2080 2100 2200
        V: 1080 1090 1100 1125
    win0-0: ACTIVE
        format: XB24 little-endian (0x34324258) SDR[0] color_space[0]
        csc: y2r[0] r2r[0] r2y[0] csc mode[0]
        zpos: 0
        src: pos[0x420] rect[1920x1080]
        dst: pos[0x0] rect[1920x1080]
        buf[0]: addr: 0x00000000012be000 pitch: 7680 offset: 0
    win1-0: ACTIVE
        format: AB24 little-endian (0x34324241) SDR[0] color_space[0]
        csc: y2r[0] r2r[0] r2y[0] csc mode[0]
        zpos: 1
        src: pos[0x0] rect[1920x1080]
        dst: pos[0x0] rect[1920x1080]
        buf[0]: addr: 0x0000000007278000 pitch: 7680 offset: 0
    win2-0: ACTIVE
        format: AB24 little-endian (0x34324241) SDR[0] color_space[0]
        csc: y2r[0] r2r[0] r2y[0] csc mode[0]
        zpos: 2
        src: pos[0x0] rect[1920x24]
        dst: pos[0x0] rect[1920x24]
        buf[0]: addr: 0x000000000621f000 pitch: 7680 offset: 0
    win2-1: ACTIVE
        format: AB24 little-endian (0x34324241) SDR[0] color_space[0]
        csc: y2r[0] r2r[0] r2y[0] csc mode[0]
        zpos: 2
        src: pos[0x0] rect[1920x56]
        dst: pos[0x1024] rect[1920x56]
        buf[0]: addr: 0x00000000060b7000 pitch: 7680 offset: 0
    win2-2: DISABLED
    win2-3: DISABLED
    win3-0: DISABLED
    win3-1: DISABLED
    win3-2: DISABLED
    win3-3: DISABLED
    post: sdr2hdr[0] hdr2sdr[0]
    pre : sdr2hdr[0]
    post CSC: r2y[0] y2r[0] CSC mode[0]
VOP [ff8f0000.vop]: ACTIVE                        //VOPL状态
    Connector: HDMI-A                                //VOP连接HDMI
        overlay_mode[1]
bus_format[2025]                                 //输出格式YUV444 8BIT
output_mode[0]                                 //输出总线ROCKCHIP_OUT_MODE_P888
color_space[3]
    Display mode: 1280x1024p60                //当前HDMI分辨率1280x1024
        clk[108000] real_clk[108000] type[48] flag[5]
        H: 1280 1328 1440 1688
        V: 1024 1025 1028 1066
    win0-0: ACTIVE
        format: XB24 little-endian (0x34324258) SDR[0] color_space[0]
        csc: y2r[0] r2r[0] r2y[1] csc mode[0]
        zpos: 0
        src: pos[0x420] rect[1920x1080]
        dst: pos[0x0] rect[1280x1024]
        buf[0]: addr: 0x00000000012be000 pitch: 7680 offset: 0
    win2-0: ACTIVE
        format: AB24 little-endian (0x34324241) SDR[0] color_space[0]
        csc: y2r[0] r2r[0] r2y[1] csc mode[0]
        zpos: 1
        src: pos[0x0] rect[1280x1024]
        dst: pos[0x0] rect[1280x1024]
        buf[0]: addr: 0x0000000000dbe000 pitch: 5120 offset: 0
    win2-1: DISABLED
    win2-2: DISABLED
    win2-3: DISABLED
    post: sdr2hdr[0] hdr2sdr[0]
    pre : sdr2hdr[0]
    post CSC: r2y[0] y2r[0] CSC mode[1]

PS:
常用的 bus_format 由内核 uapi/linux/media-bus-format.h 定义:
#define MEDIA_BUS_FMT_RGB888_1X24 0x100a                 //RGB888
#define MEDIA_BUS_FMT_RGB101010_1X30 0x1018                //RGB101010
#define MEDIA_BUS_FMT_YUV8_1X24 0x2025                         //YUV444 8bit
#define MEDIA_BUS_FMT_YUV10_1X30 0x2016                        //YUV444 10bit
#define MEDIA_BUS_FMT_UYYVYY8_0_5X24 0x2026                 //YUV420 8bit
#define MEDIA_BUS_FMT_UYYVYY10_0_5X30 0x2027        //YUV420 10bit
常用的 output_mode 由内核 drivers/gpu/drm/rockchip/rockchip_drm_vop.h 定义:
#define ROCKCHIP_OUT_MODE_P888 0
#define ROCKCHIP_OUT_MODE_P666 1
#define ROCKCHIP_OUT_MODE_P565 2
#define ROCKCHIP_OUT_MODE_S888 8
#define ROCKCHIP_OUT_MODE_S888_DUMMY 12
#define ROCKCHIP_OUT_MODE_YUV420 14
/* for use special outface */
#define ROCKCHIP_OUT_MODE_AAAA 15




查看对应接口的详细信息
rk3399pro:/ # cd /sys/class/drm/
D:/%E7%AC%94%E8%AE%B0%E5%AD%98%E5%BD%95/qq7505C10212B71EF1000A21D6633021DA/57d77133df3a45ee8e693685fdc836e0/clipboard.png
以card0-HDMI-A-1为例
enabled 使能状态
status 连接状态
mode 当前输出分辨率
modes 连接设备支持的分辨率列表
audioformat 连接设备支持的音频格式
edid 连接设备的 EDID,可以通过命令 cat edid > /data/edid.bin 保存下来。



查看HDMI的状态
rk3399pro:/ # cat /d/dw-hdmi/status
PHY: enabled                    Mode: HDMI
Pixel Clk: 108000000Hz          TMDS Clk: 108000000Hz
Color Format: YUV444            Color Depth: 8 bit
Colorimetry: ITU.BT709          EOTF: Off



当前可用显示分辨率列表:
cat /sys/devices/platform/display-subsystem/drm/card0/card0-HDMI-A-1/modes

查看当前显示分辨率:
cat /sys/devices/platform/display-subsystem/drm/card0/card0-HDMI-A-1/mode

设置HDMI分辨率:
setprop persist.sys.resolution.main 1920x1080@60
setprop sys.display.timeline 1

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

源创嵌入式官网

GMT+8, 2024-5-17 15:38 , Processed in 0.092908 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表