How to read EDID data of Linux system adapted to Loongson system

By pre-storing and reading EDID data in Linux systems and open source firmware PMON, hardware manufacturers have solved the problem that the display driver cannot read EDID data caused by eeprom devices, ensuring that the display driver can read the identification data of the monitor normally.

CN114741035BActive Publication Date: 2024-11-22KYLIN CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202210412766.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2024-11-22
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

On the Loongson 2K1000 platform, when the hardware manufacturer does not consider the eeprom device, the display driver cannot read the EDID data from the eeprom, resulting in the inability to read the identification data of the monitor normally.

Method used

Provide a method for reading EDID data for the Linux system adapted to Loongson's entire machine. The display driver first tries to read data from eeprom. If it fails, it reads preinstalled EDID data from Linux system or open source firmware PMON. By installing the edid tool software Package, generate edid.bin files with specified resolution, create a directory that stores EDID data, modify boot parameters and read hardware configuration data to realize data reading.

Benefits of technology

Ensure that the display driver can read pre-stored EDID data from Linux system or open source firmware PMON when it is unable to read EDID data from eeprom, and ensure that the display driver can read the identification data of the monitor normally.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114741035B_ABST
    Figure CN114741035B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for reading EDID data of a Linux system adapted to a Loongson complete machine, wherein the Loongson is Loongson 2K1000, and the reading method is as follows: a display driver is instructed to read EDID data from eeprom; or, when the display driver fails to read EDID data from eeprom, the EDID data is read from the Linux system; or, when the display driver fails to read EDID data from both eeprom and the Linux system, the display driver reads EDID data from an open source firmware PMON. The main purpose of the present invention is to provide a method for reading EDID data of a Linux system adapted to a Loongson complete machine, so as to solve the problem that the display driver cannot read EDID data when the hardware manufacturer does not consider eeprom.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for reading EDID data, and in particular to a method for reading EDID data of a Linux system adapted to a Loongson complete machine. Background Art

[0002] Extended Display Identification Data (EDID) is the standard for display identification data developed by VESA when developing the DDC display data channel communication protocol. EDID is stored in the DDC memory of the display. When the computer host is connected to the display, the computer host will read the EDID data stored in the DDC memory of the display through the DDC channel.

[0003] On the Loongson 2K1000 platform, an eeprom (electronically erasable programmable read-only memory) is hung on the i2c bus, and the EEID data is stored in the eeprom.

[0004] The EDID data is stored in the eeprom, and the display driver reads the EDID data from the i2c bus address mounted on the eeprom. The display driver reads the edid data stored in the eeprom through the i2c bus.

[0005] However, if the hardware manufacturer does not consider the eeprom device (this device is used to store EDID data) when designing the hardware, there will be a problem that the display driver cannot read the EDID data from the eeprom. Summary of the invention

[0006] The main purpose of the present invention is to provide a method for reading EDID data of a Linux system adapted to a Loongson complete machine, so as to solve the problem that when the hardware manufacturer does not consider eeprom, the display driver can still read the EDID data.

[0007] In order to achieve the above purpose, the present invention provides a method for reading EDID data of a Linux system adapted to a Loongson complete machine, the Loongson complete machine is Loongson 2K1000, and the reading method is as follows:

[0008] Instruct the display driver to read EDID data from eeprom;

[0009] Alternatively, when the display driver fails to read the EDID data from the eeprom, the EDID data pre-installed in the Linux system is read from the Linux system;

[0010] Alternatively, when the display driver fails to read the EDID data from the eeprom and the Linux system, the display driver reads the EDID data pre-installed in the open source firmware PMON from the open source firmware PMON.

[0011] Preferably, the storage method of EDID data in the Linux system is:

[0012] S10: Install the edid tool software package in the Linux system;

[0013] S20: Generate an edid.bin file of a specified resolution, wherein the specified resolution is the optimal resolution of the current display;

[0014] S30: Create an edid directory folder to store EDID data;

[0015] S40: Generate new EDID data using the edid.bin file in step S20, and copy the EDID data to the edid directory folder in step S30;

[0016] S50: Modify the boot parameters and directly modify the system boot file on the Loongson open source firmware PMON platform;

[0017] S60: confirm whether the kernel configuration item is turned on. If it is turned on, the storage of EDID data is completed. If it is not turned on, the kernel configuration item is turned on, the kernel is updated, and replaced to the target system.

[0018] Further preferably, in step S40, generating new EDID data is obtained by:

[0019] By loading a fake edid.bin file of a specified resolution from the Linux system directory, and then generating new EDID data through the get-edid tool or monitor-get-edid tool;

[0020] Or, directly copy the existing EDID data from the edid-generator software.

[0021] Further preferably, in step S50, the system boot file is modified as follows:

[0022] Add the following parameters to the system boot file:

[0023] GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=edid / display resolution value.bin quiet". After the modification is completed, update the gruby boot.

[0024] Preferably, the method for reading EDID data in the open source firmware PMON is as follows:

[0025] Read all hardware configuration data from the open source firmware PMON, and confirm whether the node / soc / edid@0 exists in the read hardware configuration data. If the node / soc / edid@0 exists, continue to confirm whether there is an edid-buf child node for storing EDID data. If the edid-buf child node exists, read the EDID data. If the edid-buf child node does not exist, read the EDID data and return if it fails.

[0026] If the node / soc / edid@0 does not exist, reading EDID data fails and returns.

[0027] The beneficial effects of the present invention are:

[0028] The present invention provides another method for a display driver to read EDID data. First, the EDID data is pre-stored in a disk partition of a Linux system and / or an open source firmware PMON. In this way, when the display driver cannot read the EDID data from the eeprom, the display driver can read the pre-stored EDID data from the Linux system partition. Alternatively, when the EDID data cannot be read in the Linux system, the display driver can also read the EDID data from the open source firmware PMON. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0030] Figure 1 It is a schematic diagram of the workflow of the present invention. DETAILED DESCRIPTION

[0031] The technical scheme in the embodiment of the present invention is described clearly and completely below in conjunction with the accompanying drawings in the embodiment of the present invention. In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited by the specific embodiments disclosed below.

[0032] like Figure 1 As shown, this embodiment provides a method for reading EDID data of a Linux system adapted to a Loongson complete machine, where the Loongson complete machine is Loongson 2K1000. The reading method is as follows:

[0033] First, let the display driver read EDID data from eeprom; if the display driver cannot read EDID data from eeprom, the display driver can read EDID data pre-installed in the Linux system from the Linux system. In addition, when the display driver cannot read EDID data from eeprom and the Linux system, the display driver can read EDID data pre-installed in the open source firmware PMONED from the open source firmware PMON.

[0034] Specifically, in this embodiment, the storage and reading method of EDID data in the Linux system is:

[0035] S10: Install the EDID tool software package in the Linux system, such as the read-edid or monitor-edid tool software package; in this embodiment, read-edid is used as an application embodiment: the command for installing the tool software package read-edid is as follows:

[0036] $sudo apt-get install read-edid.

[0037] S20: Generate an edid.bin file of a specified resolution, wherein the specified resolution is the optimal resolution of the current display. In this embodiment, the optimal resolution of 1600x1050 is used as an example:

[0038] $ sudo get-edid > 1600x1050.bin

[0039] The detailed contents of the edid.bin file can be confirmed through edid-decode.

[0040] S30: Create an edid directory folder to store EDID data; the specific operation is as follows:

[0041] $sudo mkdir / usr / lib / firmware / edid.

[0042] S40: Generate new EDID data using the edid.bin file in step S20, and copy the EDID data to the edid directory folder in step S30; the operation is as follows:

[0043] $sudo cp 1600x1050.bin / usr / lib / firmware / edid.

[0044] In this step, the newly generated EDID data is obtained as follows:

[0045] By loading a forged edid file (edid.bin, with the suffix .bin) of a specified resolution from the Linux system directory ( / usr / lib / firmware / edid / ), and then generating it through the get-edid tool or the monitor-get-edid tool. In addition, the newly generated EDID data can also copy the ready-made data in the edid-generator software directly to the target directory under the firmware (usually / usr / lib / firmware / edid / ).

[0046] In addition, if the data content in the edid file is incorrect, it can be modified through the editing software (Phoenix+EDID+Designer+Display EDID Editor).

[0047] S50: Modify the boot parameters. On the Loongson open source firmware PMON platform, directly modify the system boot file (path: / boot / boot.cfg); the specific operations are as follows:

[0048] $sudo edit / etc / default / grub.

[0049] Add the following parameters to the / boot / boot.cfg file:

[0050] GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=edid / (display resolution value).bin quiet", the resolution value used here is 1600x1050,

[0051] Therefore, the added parameters are:

[0052] GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=edid / 1600x1050.bin quiet";

[0053] In addition, if the operator is not sure whether the above operation is correct, you can add debugging parameters, such as drm.debug = 14 and video = VGA-1: e---------------------@VGA-1. After adding drm.debug = 14, check the output log to determine. The output result may also be other names, which can be determined according to the actual situation. In addition, you can also use the edid-decode command to view the edid binary file in the / sys / devices directory to confirm whether there is an edid binary file (including EDID format data) in the corresponding path. Finally, update the grub boot file ($sudo update-grub).

[0054] S60: confirm whether the kernel configuration item (CONFIG_DRM_LOAD_EDID_FIRMWARE) is turned on. If it is turned on, the storage of EDID data is completed. If it is not turned on, the kernel configuration item is turned on, the kernel is updated, and replaced to the target system.

[0055] To check whether the EDID data format information contained in the edid binary file is valid, you can use the following command. The corresponding software package is read-edid (or monitor-edid). Here, the command parse-edid in the read-edid software package is used to parse the binary file with a resolution of 1600x1050, as follows:

[0056] $parse-edid<1600x1050.bin:

[0057] parse-edid: parse-edid version 2.0.0

[0058] parse-edid:EDID checksum passed.

[0059] #EDID version 1 revision 3

[0060] Section "Monitor"

[0061] #Block type:2:0 3:fc

[0062] Identifier"22T41-H-AN"

[0063] Vendor Name "KTC"

[0064] Model Name"22T41-H-AN"

[0065] #Block type:2:0 3:fc

[0066] #Block type:2:0 3:fd

[0067] HorizSync 15-68

[0068] VertRefresh 49-61

[0069] #Max dot clock(video bandwidth)150MHz

[0070] #DPMS capabilities:Active off:no Suspend:no Standby:no

[0071] Mode"1280x720"

[0072] #vfreq 60.000Hz,hfreq 45.000kHz

[0073] DotClock 74.250000

[0075] HTimings 1280 1390 1430 1650

[0077] VTimings 720 725 730 750

[0079] Flags"+HSync""+Vsync"

[0080] EndMode

[0081] Mode"1680x1050"#vfreq 59.883Hz,hfreq 64.674kHz

[0082] DotClock 119.000000

[0084] HTimings 1680 1728 1760 1840

[0086] VTimings 1050 1053 1059 1080

[0088] Flags"-HSync""+Vsync"

[0089] EndMode#Block type:2:0 3:fc

[0090] #Block type:2:0 3:fd

[0091] EndSection

[0092] View the startup item information command loaded by the system, similar output is as follows:

[0093] $cat / proc / cmdline

[0094] Kernel command line:BOOT_IMAGE= / boot / vmlinuz-3.8.0-30-genericroot=UUID=939b3111-4906-46ae-9ad7-7faa783d490d rodrm_kms_helper.edid_firmware=edid / 1600x1050.bin video=VGA-1:e quiet…

[0095] Specify to load the edid file from the firmware. The startup parameter setting method is as follows:

[0096] 'drm_kms_helper.edid_firmware=edid / 1600x1050.bin'

[0097] Video related parameters are introduced in the following format:

[0098] video= <conn> : <xres> x <yres>[M][R][- <bpp> ][@ <refresh>][i][m][eDd]

[0099] <conn>:Connector,e.g.DVI-I-1,see / sys / class / drm / foravailableconnectors

[0100] <xres> x <yres>:resolution

[0101] M:compute a CVT mode?

[0102] R:reduced blanking?

[0103] - <bpp>:color depth

[0104] @ <refresh>:refresh rate

[0105] i:interlaced(non-CVT mode)

[0106] m:margins?

[0107] e:output forced to on

[0108] d:output forced to off

[0109] D:digital output forced to on(egDVI-I connector)

[0110] If multiple outputs are used, such as DVI-1 is turned on and TV-1 is turned off, the startup parameters are set as follows:

[0111] 'video=DVI-1:1024x768@85video=TV-1:d'.

[0112] In this embodiment, PMON is an early BIOS firmware of Loongson, which is used to guide and store hardware information, and is written into the boot flash storage. The method of reading EDID data from the open source firmware PMON is as follows: read all hardware configuration data from the open source firmware PMON, confirm whether the node / soc / edid@0 exists in the read hardware configuration data, if the node / soc / edid@0 exists, then continue to confirm whether there is an edid-buf child node for storing EDID data, if the edid-buf child node exists, read the EDID data, if the edid-buf child node does not exist, read the EDID data failed to return; if the node / soc / edid@0 does not exist, read the EDID data failed to return.

[0113] Alternatively, you can also add the following reading method to the kernel code:

[0114]

[0115] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.< / refresh> < / bpp> < / yres> < / xres> < / conn> < / refresh> < / bpp> < / yres> < / xres> < / conn>

Claims

1. A method for reading EDID data of a Linux system adapted to a Loongson system, characterized in that: The Loongson machine is Loongson 2K1000, and the reading method is as follows: The display driver is instructed to read EDID data from eeprom; the storage method of the EDID data in the Linux system is: S10: Install the edid tool software package in the Linux system; S20: Generate an edid.bin file of a specified resolution, wherein the specified resolution is the optimal resolution of the current display; S30: Create an edid directory folder to store EDID data; S40: Generate new EDID data using the edid.bin file in step S20, and copy the EDID data to the edid directory folder in step S30; S50: Modify the boot parameters and directly modify the system boot file on the Loongson open source firmware PMON platform; S60: confirm whether the kernel configuration item is turned on. If it is turned on, the storage of EDID data is completed. If it is not turned on, the kernel configuration item is turned on, the kernel is updated, and replaced to the target system; Alternatively, when the display driver fails to read the EDID data from the eeprom, the EDID data pre-installed in the Linux system is read from the Linux system; Alternatively, when the display driver fails to read EDID data from the eeprom and the Linux system, the display driver reads EDID data pre-installed in the open source firmware PMON from the open source firmware PMON; the method for reading EDID data in the open source firmware PMON is as follows: Read all hardware configuration data from the open source firmware PMON, and confirm whether the node / soc / edid@0 exists in the read hardware configuration data. If the node / soc / edid@0 exists, continue to confirm whether there is an edid-buf child node for storing EDID data. If the edid-buf child node exists, read the EDID data. If the edid-buf child node does not exist, read the EDID data and return if it fails. If the node / soc / edid@0 does not exist, reading EDID data fails and returns.

2. The method for reading EDID data of a Linux system adapted to a Loongson complete machine according to claim 1, characterized in that: In step S40, generating new EDID data is obtained by: By loading the edid.bin file of the specified resolution from the Linux system directory, and then generating new EDID data through the get-edid tool or monitor-get-edid tool; Or, directly copy the existing EDID data from the edid-generator software.

3. The method for reading EDID data of a Linux system adapted to a Loongson complete machine according to claim 1, characterized in that: In step S50, the system boot file is modified as follows: Add the following parameters to the system boot file: GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=edid / display resolution value.bin quiet". After the modification is completed, update the gruby boot.

Citation Information

Patent Citations

  • Method for dynamically identifying and configuring external display

    CN102455886A

  • Method and device for preparing graphical installation system of Loongson platform

    CN102567051A

  • Android system display management method and device, equipment and storage medium

    CN113282256A

  • Air Gapping / Offboarding of Software

    US20160371097A1

  • Display system for an array of video displays

    US20170229093A1