Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to get HDMI interface EDID

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "how to get HDMI interface EDID", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "How to get HDMI interface EDID"!

I. EDID Introduction

EDID(Extended display identification data): Extended display identification data, generally stored in the EEPROM of the display.

In EDID1.0->EDID1.3, EDID has a capacity of 128 bytes, and since EDID1.3, EDID has expanded to 256 bytes.

EDID is generally read through the DDC (or I2C) channel, and the slave device address is 0x50.

The data structure of EDID version 1.3 is shown in the following figure:

II. EDID acquisition

The application calls the drmModeGetConnector() function in the libdrm code, passing the macro DRM_IOCTL_MODE_GETCONNECTOR via ioctl to notify the Linux kernel to fetch the relevant data (including EDID).

In the Linux kernel, if the macro CONFIG_DRM_LOAD_EDID_FIRMWARE is defined, the kernel will first call the drm_load_edid_firmware() function to read EDID data from the corresponding file under the/lib/firmware path; if the reading fails or the macro CONFIG_DRM_LOAD_EDID_FIRMWARE is not defined, the kernel communicates with the display through the DDC channel to obtain EDID data.

1. EDID acquisition process

Note: Some functions of DRM Connector are mentioned in the flowchart above, and the initialization process of Connector is described later.

2. DDC communication flow

3. EDID debugging

EDID data can be displayed in two ways.

1) System dump

## 1. Enter the board system root@linaro-alip:/sys/class/drm/card0-HDMI-A-1# lsaudioformat device edid mode power subsystemcontent_protection dpms enabled modes status ueventroot@linaro-alip:/sys/class/drm/card0-HDMI-A-1# cat edid > edid.bin## 2. If the board system does not have the hexdump command, copy it to pcroot@ubuntu:/home/run/code# hexdump -C -n 256 edid.bin000000 00 ff ff|........ A.UU....| 00000010 0a 19 01 03 80 79 44 78 2a 16 4d 9f 5a 52 9f 26 |..... yDx*.M.ZR.&| 00000020 0e 47 4a a1 08 00 95 00 b3 00 01 01 01 01 01 01 |.GJ.............| 00000030 01 01 01 01 01 01 02 3a 80 18 71 38 2d 40 58 2c |.......:.. q8-@X,|00000040 45 00 b9 a8 42 00 00 1e 66 21 50 b0 51 00 1b 30 |E... B... f! P.Q.. 0|00000050 40 70 36 00 b9 a8 42 00 00 18 00 00 00 fd 00 14 |@p6... B.........| 00000060 4c 1e 53 0f 00 0a 20 20 20 20 20 20 00 00 00 fc |L.S... ....| 00000070 00 50 68 69 6c 69 70 73 20 54 56 0a 20 20 01 2d |.Philips TV. .-| 00000080 02 03 28 f1 4d 1f 90 14 05 13 04 02 03 20 01 12 |.. (.M........ ..| 00000090 06 07 29 09 07 07 15 07 50 57 06 00 83 01 00 00 |..)..... PW......| 000000a0 67 03 0c 00 10 00 b0 2d 02 3a 80 18 71 38 2d 40 |g......-.:.. q8-@|000000b0 58 2c 25 00 b9 a8 42 00 00 1e 8c 0a a0 14 51 f0 |X,%... B....... Q.| 000000c0 16 00 26 7c 43 00 b9 a8 42 00 00 98 01 1d 80 18 |..&| C... B.......| 000000d0 71 1c 16 20 58 2c 25 00 b9 a8 42 00 00 9e 8c 0a |q.. X,%... B.....| 000000e0 d0 8a 20 e0 2d 10 10 3e 96 00 b9 a8 42 00 00 18 |.. .-..>.... B...| 000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3d |...............=| 00000100

2), modetest command

Stop applications using the/dev/dri/card0 node before using the modetest command.

In "Linux DRM Things-libdrm Debugging Preparation", it is mentioned that using the killall command is troublesome in subsequent debugging (reason: the system will start the desktop display). You can use the systemctl command to stop the desktop display service and then test it with the modetest command.

## 1. Stop desktop display root@linaro-alip:~# systemctl stop lightdm.service[ 682.983722] rockchip-vop ff90000.vop: [drm:vop_crtc_enable] Update mode to 1024x768p60, type: 11## 2.modetest root@linaro-alip:~# ./ modetesttrying to open device 'rockchip'... doneEncoders:id crtc type possible crtcs possible clones87 61 TMDS 0x00000001 0x00000000Connectors:id encoder status name size (mm) modes encoders88 87 connected HDMI-A-1 1210x680 26 87 modes: name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot) 1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: preferred, driver 1920x1080 60 1920 2008 2052 2200 1080 1082 1087 1125 148500 flags: phsync, pvsync; type: driver ... props: 1 EDID: flags: immutable blob blobs: value: 00ffffffffffff00410c555501010101 0a190103807944782a164d9f5a529f26 0e474aa108009500b300010101010101 010101010101023a801871382d40582c 4500b9a84200001e662150b051001b30 40703600b9a842000018000000fd0014 4c1e530f000a202020202020000000fc 005068696c6970732054560a2020012d 020328f14d1f90140513040203200112 06072909070715075057060083010000 67030c001000b02d023a801871382d40 582c2500b9a84200001e8c0aa01451f0 1600267c4300b9a842000098011d8018 711c1620582c2500b9a84200009e8c0a d08a20e02d10103e9600b9a842000018 0000000000000000000000000000003d...## 3. Restore desktop display root@linaro-alip:~# systemctl start lightdm.service At this point, I believe that everyone has a deeper understanding of "how to get HDMI interface EDID", may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report