Damien
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # EDID 介紹 EDID全名為Extended Display Identification Data,是由VESA協會制定的顯示器標準資訊格式。具體來說,可以把 EDID 當成一個顯示器的 metadata / 身分證,其內容會包含顯示器的相關資訊,如顯示器名稱、產品序號、支援解析度、聲音格式等等。目的為告訴輸出端顯示器支援的能力,確保電腦或是機上盒等影音輸出裝置,在連接上顯示器後,能根據資訊輸出正確的影音格式,因此可以避免無法顯示或顯示比例不正常等狀況發生。 目前此項技術已廣泛應用於影音顯示介面如 DisplayPort、HDMI。在實作上,為了要容納先前提到的EDID資訊於顯示器中,儲存在 EEPROM 中,並且在HDMI介面會利用I2C的介面來進行雙向的資料傳輸。 EDID 透過 I2C 與 source 進行傳輸 ![image](https://hackmd.io/_uploads/Bk9xGxZ0kx.png) ![image](https://hackmd.io/_uploads/SkxVEx-AJl.png) 目前 HDMI 介面使用 EDID v1.3,DP 介面則使用 EDID v1.4 ## EDID 資料結構(v1.3) EDID 由 1 ~ 4 個 block 組成,每個 block 大小為 128 Byte。第一個 block 又稱為 EDID Base Block,由 VESA EDID 標準制定。隨著越來越多的顯示/聲音格式,需要更多的容量存放訊息,所以也發展成利用 Extension Block 格式在 EDID 內放置多個 Block,最多可放置 255個 Block。 EDID Base Block 又稱為 Block,每個 Byte 採用 16 進位資料格式。 TODO: write the detail of the first block ## UEFI EDID related protocol 在 UEFI 環境下,常會需要透過 GOP 與其相關的 Protocol 進行顯示相關功能開發,而 UEFI 定義了相關的 protocol 來取得 EDID 資訊 ### EdidDiscovered ```c! typedef struct { UINT32 SizeOfEdid; UINT8 *Edid; } EFI_EDID_DISCOVERED_PROTOCOL; ``` #### SizeofEdid: Edid buffer 大小,最小值 128 byte。 若沒有 EDID 資訊,則設為 0。 #### Edid 指向唯讀位元陣列的指標,該位元陣列為顯示器(video output device) EDID 資訊。 #### 說明 該 Protocol 包含從顯示器回傳的 EDID 資訊,若該顯示器沒有任何 EDID 資訊,則 SizeofEdid = 0 且 \*Edid = NULL; 當 GOPDriverBinding -> Start() 被呼叫時,該 Protocol 會被 installed 在每個實體連接的 display device 的 child handle 上 Ex: 當一個 HDMI display device 連接到 video controller 時,HDMI ddevice 會被 installed 成一個 child handle,並同時 install EdidDiscovered. 若連接著 video output device 並非 EDID capable(非常老的類比 CRT 螢幕),或是 EDID 資訊無法取得,則該 protocol 會以 SizeofEdid = 0 且 \*Edid = NULL 的方式被安裝。 ### EdidOverride ```c! typedef struct _EFI_EDID_OVERRIDE_PROTOCOL { EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID GetEdid; } EFI_EDID_OVERRIDE_PROTOCOL; ``` #### GetEdid 回傳 EDID value & attribute #### 說明 由 platform firmware 產生,該 protocol 允許系統提供另一個 EDID 資訊給 GOP。 #### EFI_EDID_OVERRIDE_PROTOCOL.GetEdid() ```c typedef EFI_STATUS (EFIAPI \*EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID) ( IN EFI_EDID_OVERRIDE_PROTOCOL *This, IN EFI_HANDLE *ChildHandle, OUT UINT32 *Attributes, OUT UINTN *EdidSize, OUT UINT8 **Edid ); ``` #### 說明 Returns policy information and potentially a replacement EDID for the specified video output device. This protocol is optionally provided by the platform to override or provide EDID information and/or output device display properties to the producer of the Graphics Output protocol. If ChildHandle does not represent a video output device, or there are no override for the video output device specified by ChildHandle, then EFI_UNSUPPORTED is returned. Otherwise, the Attributes, EdidSize, and Edid parameters are returned along with a status of EFI_SUCCESS. ### EdidActive ```c! typedef struct { UINT32 SizeOfEdid; UINT8 *Edid; } EFI_EDID_ACTIVE_PROTOCOL; ``` #### 說明: 包含 **正在使用**的(Active)顯示器的 EDID 資訊, 該資訊由 EFI_EDID_OVERRIDE_PROTOCOL 或 EFI_EDID_DISCOVERED_PROTOCOL 提供。 若沒有 override,則 EDID 資訊和 EFI_EDID_DISCOVERED_PROTOCOL 相同 When the set of active video output devices attached to a frame buffer are selected, the EFI_EDID_ACTIVE_PROTOCOL must be installed onto the handles that represent the each of those active video output devices. If the EFI_EDID_OVERRIDE_PROTOCOL has override EDID information for an active video output device, then the EDID information specified by GetEdid() is used for the EFI_EDID_ACTIVE_PROTOCOL. Otherwise, the EDID information from the EFI_EDID_DISCOVERED_PROTOCOL is used for the EFI_EDID_ACTIVE_PROTOCOL. Since all EDID information is read-only, it is legal for the pointer associated with the EFI_EDID_ACTIVE_PROTOCOL to be the same as the pointer associated with the EFI_EDID_DISCOVERED_PROTOCOL when no overrides are present. ## UEFI Application 取得 EDID 資訊 下列程式為一個 UEFI application,透過 EdidDiscoveredProtocol 取得 EDID 資訊。 ```c #include <Uefi.h> #include <Library/UefiLib.h> #include <Library/UefiBootServicesTableLib.h> #include <Protocol/EdidDiscovered.h> EFI_STATUS EFIAPI UefiMain ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; EFI_EDID_DISCOVERED_PROTOCOL *EdidDiscovered; // Locate the EDID Discovered Protocol. Status = gBS->LocateProtocol(&gEfiEdidDiscoveredProtocolGuid, NULL, (VOID **)&EdidDiscovered); if (EFI_ERROR(Status)) { Print(L"Failed to locate EDID Discovered Protocol: %r\n", Status); return Status; } // Check if EDID data is available. if (EdidDiscovered->Edid == NULL || EdidDiscovered->SizeOfEdid == 0) { Print(L"No EDID data available.\n"); return EFI_NOT_FOUND; } // Print the EDID data in hexadecimal format. Print(L"EDID Data (%d bytes):\n", EdidDiscovered->SizeOfEdid); for (UINTN i = 0; i < EdidDiscovered->SizeOfEdid; i++) { Print(L"%02x ", EdidDiscovered->Edid[i]); if ((i + 1) % 16 == 0) { Print(L"\n"); } } Print(L"\n"); return EFI_SUCCESS; } ``` ## Reference https://www.graniteriverlabs.com/zh-tw/technical-blog/edid-overview https://silverwind1982.pixnet.net/blog/post/365351044 https://uefi.org/sites/default/files/resources/2_-_AMD_UEFI_Plugfest_EDID_Spring2012.pdf https://glenwing.github.io/docs/VESA-EEDID-A1.pdf

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully