开发者

Reading EDID from EEPROM

开发者 https://www.devze.com 2023-02-12 02:53 出处:网络
From the link: http://en.wikipedia.开发者_开发知识库org/wiki/Extended_display_identification_data

From the link: http://en.wikipedia.开发者_开发知识库org/wiki/Extended_display_identification_data

"The EDID is often stored in the monitor in a memory device called a serial PROM (programmable read-only memory) or EEPROM (electrically erasable PROM) and is accessible via the I²C bus at address 0x50.[1] The EDID PROM can often be read by the host PC even if the display itself is turned off.".

But I don't know, how to read this information.

Does somebody help me in this regard ?

Satish


Using the Linux package monitor-edid, you can read the edid data.

This is not installed by default nor is included in the standard repositories for me (CentOS 6). To install the repo (if not part of your distribution's repos)

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release*rpm

Then you can install monitor-edid

yum install monitor-edid

The typical way to use the command is to pipe the raw edid data through the parser

monitor-get-edid | monitor-parse-edid

and your output will look something like this:

Name: SyncMaster
EISA ID: SAM049b
EDID version: 1.3
EDID extension blocks: 0
Screen size: 47.7 cm x 26.8 cm (21.54 inches, aspect ratio 16/9 = 1.78)
Gamma: 2.2
Digital signal
Max video bandwidth: 170 MHz

        HorizSync 30-75
        VertRefresh 56-61

        # Monitor preferred modeline (59.9 Hz vsync, 66.6 kHz hsync, ratio 16/9, 102 dpi)
        ModeLine "1920x1080" 138.5 1920 1968 2000 2080 1080 1083 1088 1111 -hsync +vsync


If this question is still relevant, try using the following program read-edid-i2c. It scans the i2c buses and reads EDID data from them. You can optionally give it a bus number to check because it stops at the first EDID found (in case of multi-monitor setup). You may want to modprobe a relevant i2c driver like i2c-dev.


Exactly matching what u have quoted is here below - Linux kernel source code implementing the reading of EDID (0x80 bytes) using i2c interface.

drivers/gpu/drm/drm_edid.c:

/**
 * drm_get_edid - get EDID data, if available
 * @connector: connector we're probing
 * @adapter: i2c adapter to use for DDC
 *
 * Poke the given i2c channel to grab EDID data if possible.  If found,
 * attach it to the connector.
 *
 * Return edid data or NULL if we couldn't find any.
 */
struct edid *drm_get_edid(struct drm_connector *connector,
                          struct i2c_adapter *adapter)
{
    struct edid *edid = NULL;

    if (drm_probe_ddc(adapter))
            edid = (struct edid *)drm_do_get_edid(connector, adapter);

    connector->display_info.raw_edid = (char *)edid;

    return edid;
}     
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号