Display hot plug processing method, system and device and storage medium

A display processing and processing method technology, applied in the direction of digital output to display equipment, electrical digital data processing, data processing input/output process, etc., can solve the problems of resolution loss, black screen, different resolution, etc., to avoid display abnormal effect

Inactive Publication Date: 2020-02-21
ZTE CORP
3 Cites 0 Cited by

AI-Extracted Technical Summary

Problems solved by technology

However, at present, in the Linux system, the system itself does not do special processing for the hot plugging of the display. The hot plugging of the display may be due to the inconsistent size of the connected display before and after plu...
View more

Method used

With respect to last embodiment, in the present embodiment, due to the further judgment that the hot-swapping event that sends at present is corresponding access system is double display or single display, and according to judgment result equipmen...
View more

Abstract

The embodiment of the invention discloses a display hot plug processing method, system and device and a storage medium, and relates to the technical field of display processing. The method comprises:if a hot plug event broadcasted by a kernel is received, acquiring device information of a current hot plug device; traversing a pre-configured display hot plug rule file according to the equipment information, and querying whether a hot plug display processing program matched with the equipment information exists in the display hot plug rule file or not; and if the hot plug display processing program matched with the equipment information exists, calling the hot plug display processing program to display the current hot plug equipment. According to the embodiment of the invention, when the hot plug event occurs, the display resolution of the system can be adaptively switched according to the equipment information of the current hot plug display, so that the problem of various display anomalies caused by the hot plug display is effectively avoided.

Application Domain

Interprogram communicationDigital output to display device

Technology Topic

Embedded systemDisplay processing +4

Image

  • Display hot plug processing method, system and device and storage medium
  • Display hot plug processing method, system and device and storage medium
  • Display hot plug processing method, system and device and storage medium

Examples

  • Experimental program(6)

Example Embodiment

[0023] Embodiment one
[0024] figure 1 It is a schematic flowchart of the realization of the display hot-swap processing method provided by Embodiment 1 of the present invention, and the execution body of the method is the display hot-swap processing system/equipment. see figure 1 As shown, the display hot-swapping processing method provided in this embodiment includes the following steps:
[0025] Step S101, if a hot-plug event broadcast by the kernel is received, obtain device information of the current hot-plug device.
[0026] Preferably, in this embodiment, before step S101, it also includes:
[0027] Pre-configuring the display hot-swap rule file, the display hot-swap rule file includes at least one set of matching keys and assignment keys;
[0028] Wherein, the matching key includes the device name, the subsystem to which it belongs, event behavior and graphics driver information; the assignment key includes the specified hot-plug display processing program.
[0029] The event behavior includes insert device, remove device and device change. The device change refers to the information that the display connected to the system changes.
[0030] Preferably, in this embodiment, the display hot-plug processing system/device uses a standard socket mechanism to create a socket connection to obtain the hot-plug event broadcast by the kernel.
[0031] Preferably, in this embodiment, the device information includes, but is not limited to, device name, subsystem to which it belongs, event behavior, and graphics card driver information. Step S101 specifically includes:
[0032] If the hot plug event broadcast by the kernel is received, the hot plug event is analyzed to obtain the device name, subsystem and event behavior of the current hot plug display, and run the lspci command or lshw command to obtain the display Graphics card driver information.
[0033] Wherein, the name of the device, the subsystem it belongs to, and the event behavior can be obtained by monitoring the hot-plug event broadcast by the kernel when a display operation occurs in the system, and the graphics card driver information of the display can be obtained by running the command lspci -vnn or lshw-c video to get.
[0034] Step S102, traverse the pre-configured display hot-swap rule file according to the device information, and query whether there is a hot-swap display processing program matching the device information in the display hot-swap rule file; If the hot-plug display processing program matching the above-mentioned device information is used, the process goes to step S103.
[0035] In this embodiment, after the display hot-plug processing system/device obtains the device information of the current hot-plug device, it may traverse the display hot-plug rule file to see if there is a match with the device information The hot-plug display processing program to determine whether the current hot-plug event is a display hot-plug event; if there is a hot-plug display processing program that matches the device information, it means that the current hot-plug event is a display hot-plug event Plug event, enter step S103; otherwise, it means that the current hot plug event is not a display hot plug event, and no processing is performed at this time.
[0036] In this embodiment, after the display hot-swap processing system/device obtains the device information of the current hot-swap device, it traverses and inquires all the rule files in the directory where the pre-configured display hot-swap rule file is located. Matching key, inquire whether there is a matching key identical to the device information, and if so, obtain the hot-swap display processing program specified in the assignment key corresponding to the matching key identical to the device information, as the The matching hot-plug display processing program; otherwise, if no matching key matching the device information is found, it means that there is no hot-plug matching the device information in the display hot-plug rule file. Show handlers.
[0037] Step S103, calling the hot-plug display processing program to display the current hot-plug device.
[0038] In this embodiment, the hot-swap display processing program is configured with display processing rules corresponding to the current hot-swap device, and the display hot-swap processing system/device obtains the hot-swap display After processing the program, the hot-swap display processing program can be used to display the current hot-swap device, so that the display hot-swap processing system/device can adapt to the display of the current hot-swap device Resolution, to overcome the problem of display abnormality caused by the hot plug event of the display in the prior art.
[0039] As can be seen from the above, since the display hot-plug processing method provided in this embodiment is pre-configured with the display hot-plug rule file, after receiving the hot-plug event broadcast by the kernel, the device information of the current hot-plug device is obtained, and then according to The device information traverses the pre-configured display hot-swap rule file, queries the hot-swap display processing program that matches the device information, and finally performs the display processing program according to the hot-swap display processing program that matches the device information Display processing is carried out, so that when a hot-plug event occurs, the display resolution of the system can be adaptively switched according to the device information of the current hot-plug display, effectively avoiding various display abnormalities caused by the hot-plug display.

Example Embodiment

[0040] Embodiment two
[0041] figure 2 It is a schematic flowchart of the realization of the display hot-swapping processing method provided by Embodiment 2 of the present invention, and the execution body of the method is the display hot-swapping system/equipment. see figure 2 As shown, the display hot-swapping processing method provided in this embodiment includes:
[0042] Step S201, if a hot-plug event broadcast by the kernel is received, obtain device information of the current hot-plug device.
[0043] Step S202, traverse the pre-configured display hot-swap rule file according to the device information, and query whether there is a hot-swap display processing program that matches the device information in the display hot-swap rule file; If the hot-plug display processing program matching the above-mentioned device information is used, the process goes to step S203.
[0044] It should be noted that, since the implementation manner of steps S201 to S202 in this embodiment is completely the same as that of steps S101 to S102 in the previous embodiment, details will not be repeated here.
[0045] Step S203, read the EDID (Extended Display Identification Data) of the display, and judge whether the EDID of the display is empty; if the EDID of the display is not empty, then enter step S204; if the If the EDID of the display is empty, go to step S209.
[0046] Step S204, analyzing the EDID of the display to obtain the optimal resolution of the display.
[0047] In this embodiment, the system pre-stores a list of resolutions supported by different displays. When the EDID of the display is empty, the system can obtain the resolution list of the current hot-swappable display through the analyzed EDID. A list of supported resolutions, and then obtain the best resolution supported by the display from the list of resolutions. Preferably, the resolutions in the resolution list are sorted according to the size of the resolutions, the best resolution is at the top of the resolution list, and after obtaining the resolution list supported by the display, extract the The resolution at the top of the list is considered the best resolution for the monitor in question.
[0048] Step S205, query the display configuration file of the system, and determine whether the system sets the original resolution for the display before the hot plug event occurs; if the display is set with the original resolution, proceed to step S206; if the display If the original resolution is not set, go to step S207.
[0049] Step S206, judging whether the original resolution is greater than the optimal resolution; if the original resolution is greater than the optimal resolution, proceed to step S207; if the original resolution is less than or equal to the optimal resolution If the best resolution is found, go to step S208.
[0050] Step S207, setting the display resolution of the display as the optimal resolution.
[0051] Step S208, setting the display resolution of the display as the original resolution.
[0052] In this embodiment, when the EDID of the currently unplugged display is not read, the display resolution of the display is set to the common resolution and the best resolution of the currently unplugged display is obtained, after When it is detected that the system does not configure the original resolution for the current unplugged display, the display resolution of the currently unplugged display is set to the optimal resolution, which can overcome the existing prior art. The technical problem of the black screen caused by the rate loss; after obtaining the best resolution of the currently unplugged display, when it is detected that the original resolution configured by the system for the currently unplugged display is less than or equal to the optimal resolution, Set the display resolution of the display to the original resolution, and when it is detected that the original resolution configured by the system for the currently unplugged display is greater than the optimal resolution, set the display resolution of the currently unplugged display to Switch from the original resolution to the optimal resolution, which can overcome the problems in display technology that do not automatically adapt to the optimal resolution of the display due to inconsistent display sizes and different supported resolutions before and after plugging and unplugging And the problem of black screen caused by the resolution set before unplugging exceeds the display range of the monitor.
[0053] Step S209, setting the display resolution of the display as a common resolution.
[0054] Preferably, in this embodiment, the general resolution is 1024×768. In this embodiment, when the EDID of the currently unplugged display is not read, the display resolution of the currently unplugged display is set to a common resolution, which can avoid the occurrence of problems caused by inappropriate display resolutions. Black screen problem.
[0055] It can be seen from the above that the display hot-swapping processing method provided by this embodiment also realizes that when a hot-swapping event occurs, the display resolution of the system is adaptively switched according to the device information of the current hot-swapping display, effectively avoiding hot-swapping. Various abnormal display problems caused by the display.

Example Embodiment

[0056] Embodiment three
[0057] image 3 It is a schematic flowchart of the realization of the display hot-swap processing method provided by the third embodiment of the present invention, and the execution body of the method is the display hot-swap system/equipment. see image 3 As shown, the display hot-swapping method provided in this embodiment may include the following steps:
[0058] Step S301, if a hot-plug event broadcast by the kernel is received, obtain device information of the current hot-plug device.
[0059] Step S302, traverse the pre-configured display hot-swap rule file according to the device information, and query whether there is a hot-swap display processing program that matches the device information in the display hot-swap rule file; If the hot-plug display processing program matching the above-mentioned device information is used, the process goes to step S303.
[0060] Step S303, read the EDID of the display, and judge whether the EDID of the display is empty; if the EDID of the display is not empty, then enter step S304; if the EDID of the display is empty, then enter step S304 S310.
[0061] Step S304, analyzing the EDID of the display to obtain the optimal resolution of the display.
[0062] Step S305, query the display configuration file of the system, and determine whether the system has set the original resolution for the display before the hot plug event occurs; if the display is set with the original resolution, proceed to step S306; if the display If the original resolution is not set, go to step S307.
[0063] Step S306, judging whether the original resolution is greater than the optimal resolution; if the original resolution is greater than the optimal resolution, proceed to step S307; if the original resolution is less than or equal to the optimal resolution If the resolution is the best, go to step S308.
[0064] Step S307, setting the display resolution of the display as the optimal resolution.
[0065] Step S308, setting the display resolution of the display as the original resolution.
[0066] Step S309, setting the display resolution of the display as a common resolution.
[0067] It should be noted that, since the implementation manner of steps S301 to S309 in this embodiment is completely the same as the implementation manner of steps S201 to S209 in the previous embodiment, details will not be repeated here.
[0068] Preferably, compared to the previous embodiment, in this embodiment, the display hot-plug processing method further includes:
[0069] Step S310, judging whether the hot-swapping event is connected to dual monitors or single monitors; if dual monitors are connected, go to step S311; if single monitors are connected, go to step S312.
[0070] Step S311, setting the display mode as dual display mode;
[0071] Step S3112, set the display mode to single display mode.
[0072] Compared with the previous embodiment, in this embodiment, since it is further judged whether the currently sent hot plug event is connected to the system with dual displays or single displays, and according to the judgment result, the display mode of the device can be avoided. When hot swapping from single display to dual display or from dual display to single display, the display mode of the system cannot be updated adaptively, resulting in abnormal display.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products