EDID 簡介

擴展顯示標識數據(EDID, Extended Display Identification Data) 和 增強擴展顯示標識數據(E-EDID, Enhanced EDID) 都是顯示設備的數據格式,用於視訊來源(例如顯示卡或機上盒)描述其功能。
數據格式由 視訊電子標準協會(VESA, Video Electronics Standards Association) 發布標準定義。

具體來說,EDID 其實就像是顯示器的身分證,其內容會包含顯示器的相關資訊,如製造商名稱、顯示器名稱、產品序號、支援解析度、聲音格式等等。
目的為告知視訊來源端顯示器支援的能力,確保電腦或是機上盒等影音視訊來源裝置,在連接上顯示器後,能根據資訊視訊來源正確的影音格式。

此項技術已廣泛應用於影音顯示介面如 DisplayPort、HDMI。

EDID 版本範圍從 v1.0 到 v1.4;所有這些都定義了向上兼容的 128-byte 資料。
2.0 版定義了一個新的 256-byte 資料,但 2.0 版本已經被支持多擴充的 E-EDID 取代。

一般 EDID 存在於顯示器的 PROM 或 EEPROM 內,如果要讀取 EDID 通常都是透過 I2C,其 slave address 是 0x50。

Display ID 是另一項 VESA 標準,全名為 Display Identification Data,又稱第二世代的 EDID,適用於 PC 顯示器和消費電子設備的統一格式用來取代 EDID 和 E-EDID。


完整的 EDID 溝通過程

當視訊來源端連結上顯示器後,顯示器確認連結成功會將 HPD(Hot-Plug Detect) 電壓拉高。
視訊來源端確認 HPD 電壓狀態後,會透過 SDA/SCL 兩條數據線,向顯示器要求 EDID 資訊讀取。

值得注意的是,HDMI 規範允許產品透過硬體設計,讓顯示器關機時能藉由視訊來源端給提供的 5V 將 HPD 拉高,這使得視訊來源端能在顯示器關機時也能讀取 EDID。

當視訊來源端能正確的讀取 EDID 格式時,就會根據雙方能力做出預設影音視訊來源。

但若 EDID 格式有誤,或是顯示卡無法正確理解 EDID 資訊,此時會依據各家顯示卡廠商設計方式不同。
電腦有可能會將螢幕識別為 Non-PNP,並會視訊來源大部分顯示器所支援的解析度,如 HDMI 最低要求的 640x480p60Hz。
其餘狀況顯示卡有可能會顯示 Inactive 並呈現反灰,代表不會有任何畫面視訊來源。

 

EDID 包結的資料

EDID 包結的資料大致包含:
製造商、製造商ID、產生序號、生產年及週、EDID 版本號、類比或數位訊號、螢幕圖形尺寸、電源狀況、影像格式、CIE 1931 色彩空間的紅綠藍白座標值、標準解析度+時脈、詳細的時脈描述、監視器描述。

其中詳細的時脈描述包括:
Horizontal front port/active/blanking pixels、Virtical front port/active/blanking lines、影像尺寸、邊界像素、interlaced、stereo mode、類比或數位訊號同步。

 

 

EDID 結構

EDID 結構主要由如下幾個部分組成,總長為 128/256 bytes:

1、標頭資訊(Header information) (0-19)

2、基本顯示參數(Basic display parameters) (20-24)

3、色度調節(Chromaticity coordinates) (25-34)

4、時脈(Established timing bitmap) (35-37)

5、標準時脈識別(Standard timing information) (38–53)

6、詳細時脈描述1(Descriptor 1) (54–71)

7、詳細時脈描述1(Descriptor 2) (72–89)

8、詳細時脈描述1(Descriptor 3) (90–107)

9、詳細時脈描述1(Descriptor 4) (108–125)

10、擴展標示(Number of extensions to follow) (126)

11、校驗和(Checksum) (127)

 

詳細介紹如下:


1、標頭資訊(Header information) (0-19)

    1-1、標頭檔(0-7) - Header
         固定值為:00h, FFh, FFh, FFh, FFh, FFh, FFh, 00h,是 EDID 開始的標示。
    
    1-2、製造廠商 ID(8-9),由 UEFI 組織分配的 3 個字母組成,排序方式為 big-endian:
         Bit 15: 保留
         Bit 14-10: 第一個字母。(byte 8, bits 6–2)
         Bit 9-5: 第二個字母。(byte 8, bit 1 through byte 9 bit 5)
         Bit 4-0: 第三個字母。(byte 9 bits 4–0)
         舉例來說,"IBM" 的表示方式為: 0 01001 00010 01101。
         字母與編碼的對應關係為 ASCII code 的後 5碼。
    
    1-3、製造產品廠商 ID(10-11),排序方式為 little-endian。
    
    1-4、序號(12-15),排序方式為 little-endian。
    
    1-5、製造週(16),週的計算方式因廠商而異,有效範圍是 1-54。
    
    1-6、製造年(17),加上 1990 才是確實的年份。
    
    1-7、EDID版本號(18-19),主版本號 + 副版本號:
         舉例來說,"1.3" 的表示方式為: 01 + 03。 "1.4" 的表示方式為: 01 + 04。


2、基本顯示參數(Basic display parameters) (20-24)

    2-1、支援數位/類比訊號(byte 20, bit 7)
    2-1-1、支援數位訊號(byte 20, bit 7 = 1)
           像素深度(byte 20, bit 6-4)
                000 = undefined
                001 = 6
                010 = 8
                011 = 10
                100 = 12
                101 = 14
                110 = 16 bits per color
                111 = reserved
           影像介面(byte 20, bit 3-0)
                0000 = undefined
                0001 = DVI
                0010 = HDMIa
                0011 = HDMIb
                0100 = MDDI
                0101 = DisplayPort
    2-1-2、支援類比訊號(byte 20, bit 7 = 0)
           影像等級(byte 20, bit 6-5)
                00 = +0.7/−0.3 V
                01 = +0.714/−0.286 V
                10 = +1.0/−0.4 V
                11 = +0.7/0 V (EVC)
           白黑設定(byte 20, bit 4)
           分離同步(byte 20, bit 3)
           合成同步(byte 20, bit 2)
           綠色同步(byte 20, bit 1)
           鋸齒垂直同步(byte 20, bit 0)

    2-2、最大水平圖形尺寸,以公分為單位。(21)

    2-3、最大垂直圖形尺寸,以公分為單位。(22)

    2-4、Gamma 值(23):
         除以 100 再加 1 才是真正的 gamma 值。

    2-5、電源管理和支援的影像格式(24):
         待命(byte 24, bit 7)
         暫停(byte 24, bit 6)
         關閉/低電源(byte 24, bit 5)
         支援的影像格式(byte 24, bit 4-3)
            數位訊號
                00 = RGB 4:4:4
                01 = RGB 4:4:4 + YCrCb 4:4:4
                10 = RGB 4:4:4 + YCrCb 4:2:2
                11 = RGB 4:4:4 + YCrCb 4:4:4 + YCrCb 4:2:2
            類比訊號
                00 = monochrome or grayscale (黑白)
                01 = RGB color
                10 = non-RGB color
                11 = undefined
         標準色彩空間(byte 24, bit 2)
         偏好時脈模式(byte 24, bit 1)
         支援 GTF/CVT(byte 24, bit 0)


3、色度調節(Chromaticity coordinates) (25-34)
    分別以 10-bit 表示在 CIE 1931 色彩空間的 red, green, blue, and white point
    表示範圍: 0–255 encodes fractional 0–0.996 (255/256); 0–0.999 (1023/1024) with lsbits。

    3-1、Red X 軸的 least significant 2 bits(byte 25, bit 7-6)

    3-2、Red Y 軸的 least significant 2 bits(byte 25, bit 5-4)

    3-3、Green X 軸的 least significant 2 bits(byte 25, bit 3-2)

    3-4、Green Y 軸的 least significant 2 bits(byte 25, bit 1-0)

    3-5、Blue X 軸的 least significant 2 bits(byte 26, bit 7-6)

    3-6、Blue Y 軸的 least significant 2 bits(byte 26, bit 5-4)

    3-7、White X 軸的 least significant 2 bits(byte 26, bit 3-2)

    3-8、White Y 軸的 least significant 2 bits(byte 26, bit 1-0)

    3-9、Red X 軸的 most significant 8 bits(byte 27)

    3-10、Red Y 軸的 most significant 8 bits(byte 28)

    3-11、Green X 軸的 most significant 8 bits(byte 29)

    3-12、Green Y 軸的 most significant 8 bits(byte 30)

    3-11、Blue X 軸的 most significant 8 bits(byte 31)

    3-12、Blue Y 軸的 most significant 8 bits(byte 32)

    3-11、White X 軸的 most significant 8 bits(byte 33)

    3-12、White Y 軸的 most significant 8 bits(byte 34)


4、已知的時脈(Established timing bitmap) (35-37)
   
   支援哪些已知的時脈:
   (byte 35)
        Bit 7    720×400 @ 70 Hz (VGA)
        Bit 6    720×400 @ 88 Hz (XGA)
        Bit 5    640×480 @ 60 Hz (VGA)
        Bit 4    640×480 @ 67 Hz (Apple Macintosh II)
        Bit 3    640×480 @ 72 Hz
        Bit 2    640×480 @ 75 Hz
        Bit 1    800×600 @ 56 Hz
        Bit 0    800×600 @ 60 Hz
   (byte 36)
        Bit 7    800×600 @ 72 Hz
        Bit 6    800×600 @ 75 Hz
        Bit 5    832×624 @ 75 Hz (Apple Macintosh II)
        Bit 4    1024×768 @ 87 Hz, interlaced (1024×768i)
        Bit 3    1024×768 @ 60 Hz
        Bit 2    1024×768 @ 70 Hz
        Bit 1    1024×768 @ 75 Hz
        Bit 0    1280×1024 @ 75 Hz
   (byte 36)
        Bit 7    1152x870 @ 75 Hz (Apple Macintosh II)
        Bits 6–0    Other manufacturer-specific display modes


5、標準時脈識別(Standard timing information) (38–53)

    最多支援 8 組 2-byte 的標準時脈,表示方式為解析度 + 頻率:
    5-1、X 軸的解析度(byte 1),計算方式為 (datavalue + 31) × 8,範圍為 256 ~ 2288 pixels。
    
    5-2、Y 軸的解析度(byte 2, bit 7-6):
        00 = 16:10
        01 = 4:3
        10 = 5:4
        11 = 16:9
        計算方式為依比例與 X 軸解析度計算,取得 Y 軸解析度。
    
    5-3、垂直頻率(byte 2, bit 5-0),計算方式為 datavalue + 60,範圍為 60 ~ 123 Hz。


6、詳細時脈描述1(Detailed Timing Descriptor 1) (54–71)

    詳細時脈描述(Detailed Timing Descriptor),愈前面的優先權愈高:
    6-1、pixel clock(byte 0-1),以 10 kHz 為單位,範圍為 0.01 ~ 655.35 MHz。

    6-2、Horizontal active pixels(byte 2)

    6-3、Horizontal blanking pixels(byte 3)

    6-4、Horizontal active pixels 4 msbits(byte 4, bit 7-4)

    6-5、Horizontal blanking pixels 4 msbits(byte 4, bit 3-0)

    6-6、Vertical active lines (byte 5)

    6-7、Vertical blanking lines (byte 6)

    6-8、Vertical active lines  4 msbits(byte 7, bit 7-4)

    6-9、Vertical blanking lines  4 msbits(byte 7, bit 3-0)

    6-10、Horizontal front porch (sync offset) pixels(byte 8)

    6-11、Horizontal sync pulse width pixels(byte 9)

    6-12、Vertical front porch (sync offset) lines(byte 10, bit 7-4)

    6-13、Vertical sync pulse width lines(byte 10, bit 3-0)

    6-14、Horizontal front porch (sync offset) pixels 2 msbits(byte 11, bit 7-6)

    6-15、Horizontal sync pulse width pixels 2 msbits(byte 11, bit 5-4)

    6-16、Vertical front porch (sync offset) lines 2 msbits(byte 11, bit 3-2)

    6-17、Vertical sync pulse width lines 2 msbits(byte 11, bit 1-0)

    6-18、水平影像尺寸(byte 12),單位為公釐。

    6-19、垂直影像尺寸(byte 13),單位為公釐。

    6-20、水平影像尺寸的 msbits(byte 14, bit 7-4)。

    6-21、垂直影像尺寸的 msbits(byte 14, bit 3-0)。
    
    6-22、水平邊界像素(byte 15),單邊,共兩邊。
    
    6-23、垂直邊界像素(byte 16),單邊,共兩邊。
    
    6-24、Signal Interface Type(byte 17, bit 7):
          0 = non-interlaced;
          1 = interlaced.
    
    6-25、Stereo mode(byte 17, bit 6-5 & 0):
          00 x = none, bit 0 is "don't care";
          01 0 = field sequential, right during stereo sync;
          10 0 = field sequential, left during stereo sync;
          01 1 = 2-way interleaved, right image on even lines;
          10 1 = 2-way interleaved, left image on even lines;
          11 0 = 4-way interleaved;
          11 1 = side-by-side interleaved.
    
    6-26、訊號同步(byte 17, bit 4):
        0 = 類比訊號同步
        1 = 數位訊號同步

        6-26-1、類比訊號同步
            Sync type(byte 17, bit 3):
                0 = analog composite;
                1 = bipolar analog composite.
            Sync type(byte 17, bit 2):
                0 = without serrations;
                1 = with serrations (H-sync during V-sync).
            Sync on red and blue lines additionally to green(byte 17, bit 1):
                0 = sync on green signal only;
                1 = sync on all three (RGB) video signals.
        6-26-2、數位訊號同步(byte 17, bit 3)
            0 = 數位訊號同步 composite 
            1 = 數位訊號同步 separate

            6-26-2-1、數位訊號同步 composite:
                Serration(byte 17, bit 2):
                    0 = without serration;
                    1 = with serration (H-sync during V-sync).
                Horizontal sync polarity(byte 17, bit 1):
                    0 = negative;
                    1 = positive.
            6-26-2-1、數位訊號同步 separate:
                Vertical sync polarity(byte 17, bit 2):
                    0 = negative;
                    1 = positive.
                Horizontal sync polarity(byte 17, bit 1):
                    0 = negative;
                    1 = positive.


7、詳細時脈描述1(Detailed Timing Descriptor 2) 或 監視器描述符(Display descriptor) (72–89)

    監視器描述符(Display Descriptors)
    7-1、表示為 Display Descriptor(byte 0-1),區別 Detailed Timing Descriptor。

    7-2、保留值為 0(byte 2)。

    7-3、Descriptor type(byte 3)。
        FF: Display serial number (ASCII text)
        FE: Unspecified text (ASCII text)
        FD: Display range limits. 6- or 13-byte (with additional timing) binary descriptor.
        FC: Display name (ASCII text).
        FB: Additional white point data. 2× 5-byte descriptors, padded with 0A 20 20.
        FA: Additional standard timing identifiers. 6× 2-byte descriptors, padded with 0A.
        F9: Display Color Management (DCM).
        F8: CVT 3-Byte Timing Codes.
        F7: Additional standard timing 3.
        10: Dummy identifier.
        00–0F: Manufacturer reserved descriptors.

    7-4、根據 Descriptor type,有兩種模式:
        7-4-1、如果 Descriptor type 不是 FD,則為保留值 0。(byte 4)
        7-4-2、如果 Descriptor type 是 FD,則:
            7-4-2-1、保留值 0(byte 4, bit 7-4)。
            7-4-2-2、Horizontal rate offsets(byte 4, bit 3-2):
                00 = none;
                10 = +255 kHz for max. rate;
                11 = +255 kHz for max. and min. rates.
            7-4-2-3、Vertical rate offsets(byte 4, bit 1-0):
                00 = none;
                10 = +255 Hz for max. rate;
                11 = +255 Hz for max. and min. rates.

    7-5、根據 Descriptor type 來決定內容值(byte 5-17)。


8、詳細時脈描述1(Detailed Timing Descriptor 3) 或 監視器描述符(Display descriptor) (90–107)


9、詳細時脈描述1(Detailed Timing Descriptor 4) 或 監視器描述符(Display descriptor) (108–125)


10、擴展標示(Number of extensions to follow) (126)

    後續有多少組擴展資料,0 表示沒有。


11、校驗和(Checksum) (127)

    這個位元組應該被程式化使得所有 128 位元組的資料加總等於 00h.

 

 

現成的 EDID 解析工具

在 linux 環境下,解析 EDID 的系統工具為 parse-edid,只要將螢幕的 EDID 檔案作為輸入,即可進行解析:
$ parse-edid < ~/shared/edid.bin
Checksum Correct

Section "Monitor"
...

 

 

 

Reference
Wiki: Extended Display Identification Data

Wiki: EDID

Extended Display Identification Data (EDID) 介紹及說明

顯示器的身份證 – EDID 是什麼?

 

 

文字內容 或 影像內容 部份參考、引用自網路,如有侵權,請告知。

 

arrow
arrow
    全站熱搜

    silverwind1982 發表在 痞客邦 留言(0) 人氣()