Method and device for adapting to display equipment, equipment and computer storage medium

By obtaining the attribute data of the target display device and modifying the device tree during the boot loader startup phase of the system, the complexity and error risk problems of adapting display devices in the existing technology are solved, automatic adaptation is realized, and product reliability is improved. and efficiency.

CN118642806APending Publication Date: 2024-09-13BEIJING THUNDERSTONE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410854828.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

Existing methods of adapting display devices require the management of a large number of DTS files, which makes version control and system updates difficult, and increases the risk of errors on the production line, which may cause the system to fail to start normally.

Method used

During the boot loader startup phase of the system, the attribute data of the target display device is obtained based on the parameters burned in the private partition or the hardware interface, the device tree is modified to match the screen display timing parameters, and the modified device is added after the boot loader startup is completed. The tree is passed to the kernel.

Benefits of technology

Without manual intervention, the automated adaptation process improves product reliability and adaptation efficiency, avoids errors such as system black screens, and simplifies operations in the product production stage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118642806A
    Figure CN118642806A
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a method, a device and equipment for adapting to display equipment and a computer readable storage medium, the method comprises the following steps: in a boot loader starting stage of a system, obtaining attribute data of target display equipment based on parameters burnt by a private partition of the system or a hardware interface of the system; according to the attribute data of the target display device, modifying the device tree to enable the screen display time sequence parameters in the device tree to be matched with the attribute data of the target display device; and after the boot loader of the system is started, transmitting the modified device tree to a kernel of the system. According to the technical scheme, the reliability of products can be enhanced, and the adaptation efficiency of the display equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and computer storage medium for adapting a display device. Background Art

[0002] In embedded systems such as Android, especially for devices with screens in various forms, display technology is one of the core components. Low-voltage differential signaling (LVDS) interface is widely used to connect the motherboard and display devices of embedded systems due to its advantages of high-speed transmission and low power consumption. With the diversification of product forms, more and more LVDS-based display devices, i.e. LVDS screens, with various resolutions need to be adapted. This process involves configuring different screen display timing parameters in the kernel's device tree (DTS) to support display devices with different resolutions.

[0003] The existing method for adapting display devices is to solve the adaptation problem by pre-defining a series of firmware for LVDS screens with different resolutions. Specifically, when the burning system is started, according to the specific model, resolution and other parameters of the LVDS screen, the burning personnel manually selects the corresponding firmware file for burning, thereby loading the screen display timing parameters of the device tree file matching the firmware.

[0004] The main disadvantage of the above existing methods is that a large number of DTS files need to be managed, which is a challenge for version control and system updates. In addition, on the production line, different system files need to be flashed for LVDS screens with different resolutions, which increases the risk of errors and may cause the system to fail to start normally and a black screen problem. Summary of the invention

[0005] The present application provides a method, apparatus, device and computer storage medium for adapting a display device, which can enhance product reliability and improve the adaptation efficiency of the display device.

[0006] In one aspect, the present application provides a method for adapting a display device, the method comprising:

[0007] During the boot loader startup phase of the system, based on the parameters burned into the private partition of the system or the hardware interface of the system, the attribute data of the target display device is acquired;

[0008] According to the attribute data of the target display device, modify the device tree so that the screen display timing parameters in the device tree match the attribute data of the target display device;

[0009] After the boot loader of the system is started, the modified device tree is passed to the kernel of the system.

[0010] On the other hand, the present application provides a device for adapting a display device, the device comprising:

[0011] An acquisition module, used for acquiring attribute data of the target display device based on parameters burned into a private partition of the system or a hardware interface of the system during the boot loader startup phase of the system;

[0012] An updating module, configured to modify a device tree according to the attribute data of the target display device so that the screen display timing parameters in the device tree match the attribute data of the target display device;

[0013] The transfer module is used to transfer the modified device tree to the kernel of the system after the boot loader of the system is started.

[0014] In a third aspect, the present application provides a device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the technical solution of the method for adapting a display device as described above when executing the computer program.

[0015] In a fourth aspect, the present application provides a computer storage medium storing a computer program, which, when executed by a processor, implements the steps of the technical solution of the method for adapting a display device as described above.

[0016] From the technical solution provided by the present application, it can be known that, during the boot loader startup phase of the system, based on the parameters burned into the private partition of the system or the hardware interface of the system, the attribute data of the target display device is obtained, and according to the attribute data of the target display device, the device tree is modified so that the screen display timing parameters in the device tree match the attribute data of the target display device, and after the boot loader startup of the system is completed, the modified device tree is passed to the kernel of the system. Compared with the prior art, which is prone to errors, the burning personnel select the corresponding firmware file for burning according to the specific model, resolution and other parameters of the LVDS screen, the technical solution of the present application does not require any manual intervention, and the entire adaptation process is automatically carried out according to the program, thus avoiding errors such as system black screens that may be caused by improper manual selection of production line operators during the product production phase, improving the reliability of the product, and the automated process can also improve the adaptation efficiency of the display device. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 is a flow chart of a method for adapting a display device provided in an embodiment of the present application;

[0019] Figure 2 is a schematic diagram of the structure of an apparatus for adapting a display device provided in an embodiment of the present application;

[0020] Figure 3 It is a schematic diagram of the structure of the device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] In this specification, adjectives such as first and second may be used only to distinguish one element or action from another element or action, without necessarily requiring or implying any actual such relationship or order. Where circumstances permit, reference to an element or component or step (etc.) should not be interpreted as being limited to only one of the elements, components, or steps, but may be one or more of the elements, components, or steps, etc.

[0023] In this specification, for the convenience of description, the sizes of various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0024] As attached Figure 1 As shown, this application proposes a flow chart of a method for adapting a display device, which mainly includes steps S101 to S103, which are described in detail as follows:

[0025] Step S101: During the boot loader startup phase of the system, attribute data of a target display device is acquired based on parameters burned into a private partition of the system or a hardware interface of the system.

[0026] Here, the system boot loader is a special software in the system, whose main function is to load the kernel of the operating system and other necessary startup information when the terminal device (such as a computer or smartphone, etc.) starts. The more common universal boot loader (Universal Boot Loader) or U-Boot is a popular open source boot loader, commonly used in embedded systems. It provides a flexible boot environment, allowing developers to perform various configuration and initialization tasks during the system startup process.

[0027] The hardware interface of the system is a port on the system's motherboard used to connect the main control chip and the display device, storage device, input device and other hardware, such as a general-purpose input / output (GPIO) port, an I2C interface, etc. In the embodiment of the present application, the target display device is the display device that needs to be adapted, and the attribute data of the target display device includes the resolution, clock frequency, single / dual channel display and color bit (6bit, 8bit, etc.) of the target display device, etc. These attribute data indicate the capabilities of the display device and are also key parameters that can distinguish one display device from another.

[0028] As mentioned above, the hardware interface of the system is a port on the motherboard of the system for connecting the main control chip and the hardware such as the display device, storage device, and input device. In addition to connecting the above-mentioned devices, the hardware interface can also connect other hardware, such as a dip switch. The dip switch can be connected through the GPIO pin, for example, each dip key of each pin dip switch in a set of GPIO pins of the system is connected one by one, and the coded value obtained by encoding the state of each set of GPIO pins corresponds to the attribute data of a display device. It should be noted that in the embodiment of the present application, the state of the GPIO pin can be a high level or a low level, and the state of the GPIO pin connected to the dip switch can be encoded as a coded value composed of a combination of logic "0" and logic "1", for example, when the state of the GPIO pin is a high level, it is encoded as a logic "1", and when it is a low level, it is encoded as a logic "0", and the coded value can be a combination of logic "0" and logic "1", for example, 000, 010, 101, etc., and these coded values ​​correspond to the attribute data of a display device. For example, a code value of 000 corresponds to a display device resolution of 800*600, a code value of 010 corresponds to a display device resolution of 1024*768, a code value of 101 corresponds to a display device resolution of 1024*1024, and so on. Based on this, as an embodiment of the present application, based on the hardware interface of the system, obtaining the attribute data of the target display device can be implemented by steps S1011 and S1012, as described in detail as follows:

[0029] Step S1011: read the status of the GPIO pins in the hardware interface of the system to obtain a corresponding set of coding values.

[0030] As mentioned above, the state of the GPIO pin is high or low, which depends on the user's operation on the dip switch connected to the GPIO pin. For example, if the user turns on a dip key of the dip switch, the state of the GPIO pin connected to the dip key is high. Conversely, if the user turns off a dip key of the dip switch, the state of the GPIO pin connected to the dip key is low. According to the state of the GPIO pin in the hardware interface of the read system, a set of corresponding encoding values ​​can be obtained.

[0031] Step S1012: Determine the attribute data of the target display device according to the correspondence between the currently acquired set of coding values ​​and the attribute data of the display device.

[0032] After obtaining a set of coding values, the attribute data of the target display device can be determined according to the correspondence between the coding values ​​and the attribute data of the display device. Since the correspondence between the coding values ​​and the attribute data of the display device is preset in advance, as long as the coding values ​​are obtained, the attribute data of the target display device can be directly determined according to the correspondence between the attribute data of the display device. For example, according to the correspondence between the coding value set of 000 and the resolution of the display device 800*600, the resolution of the target display device is determined to be 800*600; for another example, according to the correspondence between the coding value set of 101 and the resolution of the display device 1024*1024, the resolution of the target display device is determined to be 1024*1024, and so on.

[0033] The above-mentioned embodiments of S1011 and step S1012 are implemented based on each pin in a set of GPIO pins of the system being connected to each toggle key of the toggle switch. In other words, a toggle switch hardware needs to be added. Considering that the I2C interface is a hardware interface that most systems have, in another embodiment of the present application, it is also possible not to add a toggle switch, that is, in the bootloader startup phase of the system, based on the hardware interface of the system, before obtaining the attribute data of the target display device, the extended display identification data (Extended Display Identification Data, EDID) of the target display device is embedded into the initialization code of the I2C interface of the system, wherein the EDID includes the attribute data of the target display device. Subsequently, based on the hardware interface of the system, the attribute data of the target display device is obtained. The specific implementation process can be to determine the calling relationship of the bootloader startup phase to the EDID in the initialization code, and obtain the attribute data of the target display device through the calling relationship. It should be noted that the EDID mentioned in the above-mentioned embodiment is a data format supported by the standard protocol, which is used to identify the capabilities of the display device, such as manufacturer information, product serial number, supported resolution and refresh rate, etc. In other words, EDID includes the display device's manufacturer information, product serial number, supported resolution and refresh rate, and other attribute data of a display device. After the EDID of the target display device is embedded in the initialization code of the system's I2C interface, the calling relationship of the boot loader startup phase to the EDID in the initialization code is determined. In this way, the attribute data of the target display device can be obtained through this calling relationship during the system's boot loader startup phase.

[0034] For step S1011 and step S1012 of the above embodiment, the attribute data of the target display device can be obtained by reading a set of coded values ​​corresponding to the state of the GPIO pin in the hardware interface of the system during the boot loader startup phase of the system; or, after determining the calling relationship of the EDID in the initialization code during the boot loader startup phase, the attribute data of the target display device can be obtained through this calling relationship during the boot loader startup phase of the system. In other words, the above implementation of obtaining the attribute data of the target display device based on the hardware interface of the system depends on certain hardware, for example, supporting the I2C interface, GPIO or adding the hardware of the dip switch. The following is a technical solution for obtaining the attribute data of the target display device based on the hardware interface of the system without relying on the addition of hardware. Prior to this, a private partition can be divided in the memory of the system; according to the corresponding relationship between the identification of the display device and its attribute data, the attribute data of the target display device and the verification information of the attribute data are burned into the private partition. In the above embodiment, according to the correspondence between the identification of the display device and its attribute data, the attribute data of the target display device and the verification information of the attribute data are burned into the private partition, which means that the identification of the display device, the attribute data of the display device and the verification information of the attribute data are uniquely corresponding when stored. This is because the private partition divided from the memory of the system does not only store the attribute data of one display device, but may store the attribute data of multiple display devices. When the identification of the display device, the attribute data of the display device and the verification information of the attribute data are stored in the private partition in a uniquely corresponding manner, the identification of the display device can be used as an index to retrieve the attribute data of the display device. It should be noted that in the above embodiment, even if the factory settings are restored or the online upgrade (Over-The-Air, OTA) is performed, the private partition divided from the memory of the system cannot be modified. Only the customized software tool can be used to modify the content of this private partition, thereby ensuring its security. In the embodiment of the present application, the attribute data of the display device can be verified for legitimacy by encryption or signature technology, including when reading or modifying the attribute data, and the verification information of the attribute data is the prerequisite for ensuring that the legitimacy verification is implemented.

[0035] After a private partition is divided into a memory of the system, the attribute data of the target display device and the verification information of the attribute data are burned into the private partition according to the corresponding relationship between the identification of the display device and its attribute data, the technical solution of obtaining the attribute data of the target display device based on the parameters burned into the private partition of the system can be implemented by the following steps S'1011 to S'1014:

[0036] Step S'1011: Obtain the identifier of the target display device.

[0037] The target display device identifier is information used to distinguish the target display device from other display devices. It is unique, that is, two different display devices cannot have the same identifier. The identifier of a display device is usually stored in the EDID data block of the display device. The identifier of the target display device can be obtained by reading the EDID data block of the target display device during the boot loader startup phase of the system.

[0038] Step S'1012: Match the identifier of the target display device with the identifier of the display device burned into the private partition to determine whether the private partition has stored the attribute data of the target display device.

[0039] As mentioned above, the attribute data of the target display device and the verification information of the attribute data have been burned into the private partition according to the correspondence between the identification of the display device and its attribute data. The identification of the target display device, the attribute data of the target display device and the verification information of the attribute data are uniquely corresponding when stored. Therefore, after obtaining the identification of the target display device, by matching the identification of the target display device with the identification of the display device burned into the private partition, it can be determined whether the private partition has stored the attribute data of the target display device.

[0040] Step S'1013: when it is determined that the private partition has stored the attribute data of the target display device, the validity of the attribute data of the target display device is verified through the verification information corresponding to the attribute data of the target display device burned into the private partition.

[0041] The purpose of verifying the legitimacy of the attribute data of the target display device is to prevent illegal tampering with the information stored in the private partition to ensure the security and integrity of the information stored in the private partition. Specifically, the legitimacy of the attribute data of the target display device can be verified by encryption or signing, that is, using an encryption key or a digital signature as the verification information corresponding to the attribute data of the target display device to verify the confidentiality and integrity of the attribute data of the target display device.

[0042] Step S'1014: If the validity check of the attribute data of the target display device is passed, the attribute data of the target display device burned in the private partition is read.

[0043] Step S102: According to the attribute data of the target display device, modify the device tree so that the screen display timing parameters in the device tree match the attribute data of the target display device.

[0044] In the Linux kernel, the device tree is used to describe the data structure of hardware device information, which defines the properties, configuration information and connection relationship of the device, so that the operating system can identify and correctly configure the hardware device. Although the attribute data such as the resolution of the target display device has been obtained through the state of the GPIO pin, the calling relationship of the EDID in the initialization code during the boot loader startup phase, or the parameters burned based on the private partition of the system, the timing parameters in the device tree still need to be fine-tuned according to the model or hardware characteristics of the specific display device. For example, different models of display devices may have different parameters such as refresh rate and clock frequency, and these parameters are usually statically defined in the device tree. Therefore, in order to ensure that the target display device can work properly, it is necessary to modify the device tree according to the attribute data of the target display device during the boot loader startup phase so that the screen display timing parameters in the device tree match the attribute data of the target display device.

[0045] Step S103: After the boot loader of the system is started, the modified device tree is transferred to the kernel of the system.

[0046] After the boot loader of the system is started, passing the modified device tree to the kernel of the system is the key to ensure stable system startup and correct hardware configuration. In order to ensure that the modified device tree is successfully passed to the kernel of the system after the boot loader is started, it is necessary to check the integrity and validity of the modified device tree and how to deal with errors, etc. Specifically, as an embodiment of the present application, after the boot loader of the system is started, passing the modified device tree to the kernel of the system can be achieved through steps S1031 to S1033, which are described in detail as follows:

[0047] Step S1031: After the boot loader of the system is started, the validity of the parameters of the modified device tree is checked.

[0048] The validity of the parameters of the modified device tree is checked to ensure that the device tree is not damaged during the modification process and that the structure still meets the requirements of the Flattened Device Tree format (i.e., the subsystem in the Linux kernel used to operate and manage the device tree). In an embodiment of the present application, the validity check of the parameters of the device tree includes checking the magic number, verifying the version information, and checking the structural integrity, etc., wherein the so-called checking the magic number is to consider that the device tree usually starts with a specific magic number, which is `0xd00dfeed`, therefore, first check whether this value is correct to ensure that the provided memory area does contain a binary representation of a device tree, and the device tree format changes over time. By checking the version number of the device tree to verify the version information, the minimum compatible version can also be checked to ensure backward compatibility. In addition, the device tree binary includes multiple parts, such as headers, nodes, attributes, etc., and the integrity of the device tree structure is determined by checking whether the offset and size of these parts are within a reasonable range.

[0049] Step S1032: If the parameters of the modified device tree are valid, the modified device tree is loaded into the memory of the system to be used as a startup parameter.

[0050] After confirming that the parameters of the modified device tree are valid, the modified device tree can be loaded into the system's memory through commands such as the `load` command (or a function with similar functions) to be used as startup parameters. If the modified device tree is incomplete and / or invalid, that is, it does not meet the specifications, for example, it does not meet the requirements of the Flattened Device Tree format, then the error handling mechanism can be started to switch to the backup device tree. In an embodiment of the present application, one or more backup device tree files can be preset in the system's storage medium, and these files contain the most basic configuration information required for the system to start and run. After the system's boot loader is started, it first attempts to load and parse the modified device tree. If an error is found during the parsing process (such as a structural error, an incompatible configuration, etc.), it automatically switches to the backup device tree. Although starting the system using a backup device tree may not provide all the functions and performance, this mechanism is sufficient to keep the system running and allow further repairs and configurations.

[0051] Step S1033: passing the address of the memory where the modified device tree is loaded to the kernel of the system.

[0052] After loading the modified device tree into the system's memory, the system's boot loader passes the memory address of the modified device tree as a parameter to the system's kernel. The system's kernel then reads the device tree data from this address and uses it to configure the system's hardware and drivers.

[0053] From the above attached Figure 1 It can be seen from the example method of adapting the display device that, during the boot loader startup phase of the system, based on the parameters burned into the private partition of the system or the hardware interface of the system, the attribute data of the target display device is obtained, and according to the attribute data of the target display device, the device tree is modified so that the screen display timing parameters in the device tree match the attribute data of the target display device. After the boot loader startup of the system is completed, the modified device tree is passed to the kernel of the system. Compared with the prior art, which is prone to errors, the burning personnel select the corresponding firmware file for burning according to the specific model, resolution and other parameters of the LVDS screen, the technical solution of the present application does not require any manual intervention, and the entire adaptation process is automatically carried out according to the program, thus avoiding errors such as system black screens caused by improper manual selection by production line operators during the product production phase, improving the reliability of the product, and the automated process can also improve the adaptation efficiency of the display device.

[0054] Please see attached Figure 2 , is a device for adapting a display device provided in an embodiment of the present application, and the device may include an acquisition module 201, an update module 202 and a transmission module 203, which are described in detail as follows:

[0055] The acquisition module 201 is used to acquire the attribute data of the target display device based on the parameters burned into the private partition of the system or the hardware interface of the system during the boot loader startup phase of the system;

[0056] An updating module 202, configured to modify the device tree according to the attribute data of the target display device so that the screen display timing parameters in the device tree match the attribute data of the target display device;

[0057] The transfer module 203 is used to transfer the modified device tree to the kernel of the system after the boot loader of the system is started.

[0058] From the above attached Figure 2It can be seen from the example of the device for adapting the display device that, during the boot loader startup phase of the system, based on the parameters burned into the private partition of the system or the hardware interface of the system, the attribute data of the target display device is obtained, and according to the attribute data of the target display device, the device tree is modified so that the screen display timing parameters in the device tree match the attribute data of the target display device. After the boot loader startup of the system is completed, the modified device tree is passed to the kernel of the system. Compared with the prior art, which is prone to errors, the burning personnel select the corresponding firmware file for burning according to the specific model, resolution and other parameters of the LVDS screen, the technical solution of the present application does not require any manual intervention, and the entire adaptation process is automatically carried out according to the program, thus avoiding errors such as system black screens that may be caused by improper manual selection by production line operators during the product production phase, improving the reliability of the product, and the automated process can also improve the adaptation efficiency of the display device.

[0059] Figure 3 Schematic diagram of the structure of the device provided by an embodiment of the present application. Figure 3 As shown, the device 3 of this embodiment mainly includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a program for a method for adapting a display device. When the processor 30 executes the computer program 32, the steps in the above-mentioned method for adapting a display device are implemented, such as Figure 1 Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 2 The functions of the acquisition module 202, the update module 202 and the transmission module 203 are shown.

[0060] Exemplarily, the computer program 32 of the method for adapting the display device mainly includes: in the boot loader startup phase of the system, based on the parameters burned into the private partition of the system or the hardware interface of the system, obtaining the attribute data of the target display device; according to the attribute data of the target display device, modifying the device tree so that the screen display timing parameters in the device tree match the attribute data of the target display device; after the boot loader startup of the system is completed, passing the modified device tree to the kernel of the system. The computer program 32 can be divided into one or more modules / units, one or more modules / units are stored in the memory 31 and executed by the processor 30 to complete the present application. One or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program 32 in the device 3. For example, the computer program 32 can be divided into the functions of an acquisition module 201, an update module 202 and a transfer module 203 (modules in the virtual device), and the specific functions of each module are as follows: the acquisition module 201 is used to acquire the attribute data of the target display device based on the parameters burned into the system's private partition or the system's hardware interface during the system's boot loader startup phase; the update module 202 is used to modify the device tree according to the attribute data of the target display device so that the screen display timing parameters in the device tree match the attribute data of the target display device; the transfer module 203 is used to transfer the modified device tree to the system's kernel after the system's boot loader startup is completed.

[0061] The device 3 may include but is not limited to a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of device 3 and does not constitute a limitation of device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, a computing device may also include input and output devices, network access devices, buses, etc.

[0062] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0063] The memory 31 may be an internal storage unit of the device 3, such as a hard disk or memory of the device 3. The memory 31 may also be an external storage device of the device 3, such as a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the device 3. Further, the memory 31 may also include both an internal storage unit of the device 3 and an external storage device. The memory 31 is used to store computer programs and other programs and data required by the device. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0064] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0065] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0066] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0067] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0068] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0069] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0070] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program of the method for adapting the display device can be stored in a computer storage medium. When the computer program is executed by the processor, it can implement the steps of each of the above-mentioned method embodiments, that is, in the boot loader startup phase of the system, based on the parameters burned into the private partition of the system or the hardware interface of the system, the attribute data of the target display device is obtained; according to the attribute data of the target display device, the device tree is modified so that the screen display timing parameters in the device tree match the attribute data of the target display device; after the boot loader of the system is started, the modified device tree is passed to the kernel of the system. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. Computer storage media may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, mobile hard disks, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in computer storage media can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer storage media do not include electric carrier signals and telecommunication signals.

[0071] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application is described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. The specific implementation methods described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application, and is not used to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present invention.

Claims

1. A method for adapting a display device, characterized in that: The method comprises: During the boot loader startup phase of the system, based on the parameters burned into the private partition of the system or the hardware interface of the system, the attribute data of the target display device is obtained; According to the attribute data of the target display device, modify the device tree so that the screen display timing parameters in the device tree match the attribute data of the target display device; After the boot loader of the system is started, the modified device tree is passed to the kernel of the system.

2. The method for adapting a display device according to claim 1, characterized in that: Each pin in a group of general purpose input and output GPIO pins of the system is connected to each DIP key of the DIP switch in a one-to-one correspondence, and a code value obtained by encoding the state of a group of GPIO pins corresponds to attribute data of a display device; Based on the hardware interface of the system, the attribute data of the target display device is obtained, including: Reading the state of the GPIO pins in the hardware interface of the system to obtain a corresponding set of coded values; The attribute data of the target display device is determined according to the correspondence between the currently acquired set of code values ​​and the attribute data of the display device.

3. The method for adapting a display device according to claim 1, characterized in that: Based on the hardware interface of the system, before acquiring the attribute data of the target display device, the method further includes: embedding the extended display identification data EDID of the target display device into the initialization code of the I2C interface of the system, wherein the EDID includes the attribute data of the target display device; Based on the hardware interface of the system, the attribute data of the target display device is obtained, including: determining the calling relationship of the boot loader to the EDID in the initialization code during the startup phase, and obtaining the attribute data of the target display device through the calling relationship.

4. The method for adapting a display device according to any one of claims 1 to 3, characterized in that: Before obtaining the attribute data of the target display device based on the parameters burned into the private partition of the system, the method further includes: Divide the private partition in the memory of the system; According to the correspondence between the identification of the display device and its attribute data, the attribute data of the target display device and the verification information of the attribute data are burned into the private partition.

5. The method for adapting a display device according to claim 4, characterized in that: Based on the parameters burned into the private partition of the system, the attribute data of the target display device is obtained, including: Obtaining an identifier of the target display device; Matching the identification of the target display device with the identification of the display device burned into the private partition to determine whether the private partition has stored the attribute data of the target display device; When it is determined that the private partition has stored the attribute data of the target display device, verifying the legitimacy of the attribute data of the target display device through the attribute data corresponding verification information of the target display device burned into the private partition; If the legality check passes, the attribute data of the target display device burned into the private partition is read.

6. The method for adapting a display device according to claim 5, characterized in that: After the boot loader of the system is started, passing the modified device tree to the kernel of the system includes: After the boot loader of the system is started, checking the validity of the parameters of the modified device tree; If the parameters of the modified device tree are valid, loading the modified device tree into the memory of the system to be used as a startup parameter; The address of the memory is passed to a kernel of the system.

7. The method for adapting a display device according to claim 6, characterized in that: The method further comprises: If the modified device tree does not meet the specification, an error handling mechanism is initiated to switch to a backup device tree.

8. A device for adapting a display device, characterized in that: The device comprises: An acquisition module, used for acquiring attribute data of the target display device based on parameters burned into the private partition of the system or a hardware interface of the system during the boot loader startup phase of the system; An updating module, configured to modify a device tree according to the attribute data of the target display device so that the screen display timing parameters in the device tree match the attribute data of the target display device; The transfer module is used to transfer the modified device tree to the kernel of the system after the boot loader of the system is started.

9. A device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Reading method for extended display identifier, electronic equipment and storage medium

    CN120780262A