Screen driving method and device based on industrial device and storage medium
By obtaining screen interface type information, allocating video memory and establishing memory mapping, combining intelligent dirty rectangle detection and adaptive frame rate control, the problem of low data transmission efficiency in industrial equipment screen drivers is solved, and efficient screen display and response speed optimization is achieved.
Patent Information
- Application Number
- CN202510732582.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-04
AI Technical Summary
In the prior art, the screen driving method based on industrial equipment has low data transmission efficiency, resulting in high screen display delay, and the traditional full-screen refresh method leads to waste of resources and performance loss.
By obtaining screen interface type information, configuring display parameters, allocating video memory and establishing memory mapping, determining the screen update area, using the kernel DMA controller to directly read the video memory data, accurately controlling screen hardware updates, combining intelligent dirty rectangle detection algorithm and adaptive frame rate control module to optimize the display process.
It significantly improves the data transmission efficiency and performance of the screen display, ensures the response speed of the screen display, reduces latency and resource waste, and enhances the stability and compatibility of the system.
Smart Images

Figure CN120255836A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly relates to a screen driving method, device, and storage medium based on industrial equipment. Background Art
[0002] The intelligent display control system based on industrial equipment faces a series of complex technical challenges when achieving efficient screen updates and optimizing display performance. The traditional full-screen refresh method will cause a large amount of unnecessary data transmission and processing, resulting in waste of resources and performance loss. And only updating the changed area requires accurate identification of the dynamic changes of the screen content, which involves complex image analysis algorithms. In addition, from the perspective of software and hardware resource coordination, each link such as video memory allocation and memory mapping may become a performance bottleneck. Therefore, the current data transmission efficiency of screen driving is low, resulting in high screen display latency. Summary of the Invention
[0003] In order to overcome the defects existing in the prior art, the present invention provides a screen driving method, device, and storage medium based on industrial equipment to solve the above problems.
[0004] The technical solution adopted by the present invention to solve its technical problems is: A screen driving method based on industrial equipment, comprising the following steps: S1: Obtain screen interface type information, and the kernel layer configures display parameters according to the screen interface type information, where the display parameters include resolution; S2: Allocate video memory through the application layer and establish a memory mapping; S3: The application layer generates frame data according to the resolution and writes it into the video memory through the memory mapping; S4: Determine the screen update area; S5: The application layer sends a display instruction to the video memory through the memory mapping; S6: The kernel layer reads the frame data and display instruction in the video memory, and controls the screen hardware to update the screen update area according to the display parameters, frame data, and display instruction.
[0005] Preferably, in the step S1, the screen interface type information is obtained through the application layer; the application layer sends the screen interface type information to the kernel layer, and the DRM interface and KMS interface of the kernel layer configure the display parameters according to the screen interface type information.
[0006] It should be noted that, in the step S2, video memory is allocated through the GEM and TTM mechanisms in the application layer, and a dual-channel memory mapping is established; the dual-channel memory mapping includes a main channel and an auxiliary channel, and the display parameters and frame data are transmitted through the main channel, and the display instruction is transmitted through the auxiliary channel; Among them, the driver applies for video memory resources through the DRM interface and the KMS interface to allocate the video memory size; Both the main channel and the auxiliary channel map the video memory to the user process address space through mmap; the area corresponding to the user process address space used by the main channel is different from the area corresponding to the user process address space used by the auxiliary channel.
[0007] Specifically, in the step S3, the application layer generates frame data through the graphics engine; then updates the frame data in the video memory.
[0008] Optionally, in the step S4, the intelligent dirty rectangle detection algorithm is used to compare the pixel differences of the frame data of the previous and next frames to determine the screen change area.
[0009] It should be noted that in the step S5, corresponding update data is generated according to the screen change area; the generation process of the update data is to extract the pixel information within the dirty rectangle area; The display driver converts the update data into display instructions.
[0010] Specifically, the display parameters further include an initial refresh rate; in the step S6, the frame data and display instructions in the video memory are read through the DMA controller of the kernel layer; The adaptive frame rate control module dynamically adjusts the VSync signal to generate a target refresh rate, so that the target refresh rate does not exceed the initial refresh rate in the display parameters; According to the target refresh rate, frame data and display instructions, the screen hardware is controlled to update the screen update area.
[0011] Preferably, after the step S6, there is also a step S7, and the step S7 includes: Obtain the frame rate data and latency data during the screen display process through the performance monitoring module as the current display performance state; If the frame rate data is lower than the first preset threshold or the latency data is higher than the second preset threshold, the rendering strategy is adjusted by reducing the resolution, and the resolution in the display parameters is updated; Execute the step S3 to update the frame data generated by the graphics engine through the adjusted rendering strategy.
[0012] A computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the described screen driving method based on industrial equipment.
[0013] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the described screen driving method based on industrial equipment.
[0014] The beneficial effects of the present invention are as follows: In the screen driving method based on industrial equipment, by allocating video memory and establishing a memory mapping, efficient generation and writing of frame data are achieved. The present invention determines the screen change area, and converts the updated data into display instructions through display driving to accurately control the screen software update. At the same time, the present invention directly reads the video memory data using the kernel DMA controller, and controls the screen hardware to update the screen update area according to the display parameters, frame data, and display instructions, realizing precise control of screen refresh display. This screen driving method significantly improves the data transmission efficiency and performance of the display, and ensures the response speed of the screen display. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flowchart of the screen driving method based on industrial equipment in an embodiment of the present invention; Figure 2 is a flowchart of step S7 in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0016] The following further describes the specific embodiments of the present invention with reference to the accompanying drawings. It should be noted here that the description of these embodiments is for helping to understand the present invention, but does not constitute a limitation to the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0017] As Figure 1 and 2 shown, a screen driving method based on industrial equipment includes the following steps: S1: Obtain the screen interface type information, and the kernel layer configures the display parameters according to the screen interface type information, where the display parameters include the initial refresh rate and resolution; S2: Allocate video memory through the application layer and establish a memory mapping; S3: The application layer generates frame data according to the resolution and writes it into the video memory through the memory mapping; realizing zero-copy rendering in the kernel layer; S4: Determine the screen update area; S5: The application layer sends a display instruction to the video memory through the memory mapping; S6: Read the frame data and display instruction in the video memory through the kernel layer, and control the screen hardware to update the screen update area according to the display parameters, frame data, and display instruction.
[0018] In the screen driving method based on industrial equipment, efficient generation and writing of frame data are achieved by allocating video memory and establishing a memory mapping. The present invention determines the screen change area, and converts the updated data into display instructions through the display driver to accurately control the screen software update. At the same time, the present invention directly reads the video memory data by using the kernel DMA controller, and controls the screen hardware to update the screen update area according to the display parameters, frame data and display instructions, so as to achieve precise control of screen refresh display. This screen driving method significantly improves the data transmission efficiency and performance of the display, and ensures the response speed of the screen display.
[0019] In this solution, the core driving logic is located in the application layer, and only the minimum necessary modules (such as the DRM interface and the KMS basic service) are retained in the kernel layer. When the screen driver OTA is updated, only the components in the application layer are replaced, thereby reducing the risk of the device becoming bricked. In addition, a rollback mechanism is also provided, which can quickly roll back to the previous version when the OTA update fails.
[0020] It should be noted that in the step S1, the screen interface type information is obtained through the application layer; the application layer sends the screen interface type information to the kernel layer, and the DRM interface and the KMS interface in the kernel layer configure the display parameters according to the screen interface type information.
[0021] When obtaining the screen interface type information in the application layer, it is first necessary to clarify the type of the screen interface. The common ones include TTL, LVDS, and MIPI. The TTL interface is a parallel interface, usually used for low-resolution screens, with a low data transmission rate but simple implementation. The LVDS interface is a differential signal interface, suitable for high-resolution screens, with strong anti-interference ability and long transmission distance. The MIPI interface is a serial interface, widely used in mobile devices, with the advantages of high bandwidth and low power consumption. The application layer obtains the interface type information of the current screen by calling the system API or reading the device configuration file. For example, in an embedded system, the application layer can obtain the screen interface type by reading the screen configuration node in the device tree. The application layer sends the obtained screen interface type information to the kernel layer, and this process is usually implemented through system calls or kernel module interfaces.
[0022] The DRM interface and KMS interface in the kernel layer are responsible for managing the configuration and status of the display device. DRM (Direct Rendering Manager) is a subsystem in the Linux kernel for managing graphics hardware, and KMS (Kernel Mode Setting) is responsible for setting display modes, including resolution, refresh rate, etc. After receiving the screen interface type information, the kernel layer will select an appropriate initial refresh rate according to the interface type. For example, for the TTL interface, due to the low transmission rate, the initial refresh rate may be set to 60Hz; while for the MIPI interface, due to its high bandwidth characteristics, the initial refresh rate may be set to 120Hz. When the DRM interface and KMS interface in the kernel layer configure the initial refresh rate based on the screen interface type information, they will comprehensively consider the hardware performance and display requirements.
[0023] The refresh rate refers to the number of times the screen is refreshed per second, which directly affects the display effect and user experience. A higher refresh rate can provide a smoother display effect, but it will also increase the hardware burden. Therefore, the kernel layer needs to select an appropriate initial refresh rate according to the screen interface type and hardware capabilities. For example, in industrial control devices, the TTL interface may only support a relatively low refresh rate, and the kernel layer may set the initial refresh rate to 50Hz or 60Hz to ensure stability and compatibility.
[0024] By obtaining the screen interface type information in the application layer and sending it to the kernel layer, the DRM interface and KMS interface in the kernel layer configure the initial refresh rate according to this information. This process ensures the correct initialization and optimized configuration of the display device. The advantage of doing this is that it can automatically select an appropriate refresh rate according to different screen interface types and hardware capabilities, avoiding display problems or performance waste caused by improper configuration. For example, in high-performance devices, automatically selecting a high refresh rate can enhance the user experience; while in low-power devices, selecting a lower refresh rate can extend the battery life. This automated configuration process reduces the workload of manual tuning and improves the stability and compatibility of the system.
[0025] Preferably, in the step S2, video memory is allocated in the application layer through the GEM and TTM mechanisms, and a dual-channel memory mapping is established; the dual-channel memory mapping includes a main channel and an auxiliary channel, and display parameters and frame data are transmitted through the main channel, and display instructions are transmitted through the auxiliary channel; Among them, when panel_init() is called in the application layer, the driver applies for video memory resources through the DRM interface and KMS interface to allocate the video memory size; The code for applying for video memory resources in the user space is as follows: struct drm_mode_create_dumb create = {0}; create.width = Screen width; create.height = Screen height x 3; / / Two pages for double buffering and one page for the auxiliary channel create.bpp = Bits per pixel; / / Such as 32 ioctl(fd, DRM_IOCTL_MODE_CREATE_DUMB, &create); In the DRM (Direct Rendering Manager) framework, the create parameter is a struct drm_mode_create_dumb type structure used to pass parameters to the kernel. This structure includes: width, height, and bpp; When calling ioctl(fd, DRM_IOCTL_MODE_CREATE_DUMB, &create), the kernel allocates video memory according to these parameters; For example, allocate a 1920x1080x4-byte continuous video memory block for a 1080p resolution screen and return the video memory handle to user space through ioctl; at this time, the video memory is not yet mapped to user space and only physical allocation is completed in the kernel; The video memory allocation principle of the GEM and TTM mechanisms: GEM (Graphics Execution Manager) and TTM (Translation Table Maps) are the core mechanisms for managing video memory in the Linux kernel. GEM is responsible for the creation and life cycle management of video memory objects, while TTM handles the address conversion and migration between video memory and system memory; The panel_init() function communicates with the kernel through the system call ioctl (input / output control); panel_init() writes the screen type and gpio parameters to the auxiliary channel and calls ioctl to notify the kernel for initialization; Both the main channel and the auxiliary channel map the video memory to the user process address space through mmap; the area corresponding to the user process address space used by the main channel is different from the area corresponding to the user process address space used by the auxiliary channel; mmap (Memory Map) is a memory mapping mechanism that allows a part of a file or device to be mapped to the virtual memory space of a process. By using mmap, the process can directly access the content of the mapped object; For the main channel, for example, an 8MB video memory area allocated is mapped to the starting point of the process virtual address 0x7f000000. When mapping, the page table attributes need to be configured in the WC (Write-Combining) mode to avoid the interference of the CPU cache on the frame data writing. The data is directly written to the mapped area through memcpy or SIMD instructions. For example, 1080p RGB data at 60 frames per second is written at a bandwidth of 128MB / s without kernel state switching. This zero-copy design reduces latency. The measured results show that the frame submission time is reduced from 3ms in the traditional scheme to 0.5ms.
[0026] For the auxiliary channel, the auxiliary channel uses an independent memory mapped area, usually a 4KB-sized circular buffer, to store the display instructions generated by panel_setcmd(). For example, the instruction "0x01 0x02" means to set the brightness to 50%, and an interrupt is triggered through ioctl to notify the driver to read. The auxiliary channel is physically isolated from the main channel but shares the same video memory address space. After the driver parses the instructions, they are sent to the screen controller through the MIPI DSI bus.
[0027] The dual-channel separation design avoids the competition for bandwidth between frame data and instructions. The measured results show that the instruction response latency is reduced from 10ms to 2ms. Dual-channel synchronization and consistency guarantee. When the main channel writes frame data, it needs to be synchronized with the auxiliary channel instructions. For example, through memory barrier instructions, it is ensured that the "brightness adjustment" instruction takes effect in the next frame. The kernel maintains the fence mechanism of the video memory object. When the user layer calls commit(), the driver checks the completion status of the two channels. If there are unprocessed instructions in the auxiliary channel, the VSYNC signal is delayed. By setting the dual-channel mechanism, 99.9% of the tearing phenomena can be avoided, while the tearing probability of the traditional single-channel scheme reaches 5%.
[0028] Optionally, in the step S3, the application layer generates frame data through the graphics engine and then updates the frame data in the video memory. Specifically, when the application layer generates frame data through the graphics engine, it first needs to extract geometric information, texture data, lighting parameters, etc. from the scene. These data are usually provided by the logical modules of the application layer, such as the scene manager or the layout calculation module in the UI framework. The graphics engine organizes these data into a format suitable for rendering, such as vertex buffers and index buffers. The core of this process is to convert the logical data into rendering instructions that can be processed by the GPU, preparing for the subsequent rendering stage.
[0029] The graphics engine converts elements such as vector graphics and texture maps into a pixel matrix by parsing drawing instructions from the application layer (such as OpenGL / Vulkan calls). For example, when rendering a 1080p UI interface, the engine first calculates the geometric coordinates of each control, then converts the triangle mesh into a pixel array with a 24-bit color depth through rasterization, and finally outputs frame data with a size of 1920×1080×3 bytes. This process utilizes the parallel computing power of the GPU to allocate tasks such as vertex shading and fragment shading to stream processors, improving the generation efficiency. Implementation mechanism of the zero-copy pipeline: The application layer maps the video memory to the process address space through mmap, and the graphics engine directly writes the frame data to the mapped area. For example, in Android SurfaceFlinger, the rendering result is shared with the display driver through the ION memory pool, avoiding data copying from the user space to the kernel space.
[0030] Specifically, in step S4, the intelligent dirty rectangle detection algorithm is used to determine the screen change area by comparing the pixel differences of the frame data of two consecutive frames. The intelligent dirty rectangle detection algorithm determines the screen change area by comparing the pixel differences of two consecutive frames of the screen. For example, if it is detected that only a 100x200 pixel area in the upper left corner of a certain page layout has changed (such as a pop-up window appears), the algorithm will mark this rectangular area as the dirty rectangle area, that is, the screen change area. Its core is to use the differential buffering technology to compare the RGB value differences of each pixel block exceeding the threshold, and merge adjacent changed pixels to form the smallest enclosing rectangle. This differential buffering technology can reduce the amount of invalid data transmission by more than 90%.
[0031] It should be noted that in step S5, corresponding update data is generated according to the screen change area; the generation process of the update data is to extract the pixel information within the dirty rectangle area, convert it into a format suitable for transmission, and package it into an update data packet. For example, when displaying a moving icon, the system will extract the pixel data of the area where the icon is located and package it into an update data packet. In addition, the system will also optimize the update data according to the characteristics of the display hardware. For example, if the display hardware supports a specific color format, the system will convert the update data into this format to reduce the subsequent processing overhead.
[0032] The display driver calls the panel_setcmd() function to convert the update data into display instructions. The panel_setcmd() function is a key interface in the display driver and is responsible for converting the update data into display instructions that the hardware can understand. For example, when updating a dirty rectangle area (the screen change area), the panel_setcmd function generates a series of display instructions, which include setting the starting coordinates of the display area, transmitting the update data, and triggering a screen refresh, etc. These display instructions are sent to the screen hardware to finally complete the update of the screen content. To improve efficiency, the panel_setcmd function adopts a batch processing method to merge multiple display instructions into one instruction packet, thereby reducing communication overhead. In addition, the panel_setcmd function also optimizes the instruction generation process according to the characteristics of the screen hardware. For example, if the screen hardware supports the partial refresh function, the panel_setcmd function generates corresponding instructions to only refresh the dirty rectangle area (the screen change area) instead of the entire screen, thereby further reducing power consumption and latency. The panel_setcmd() function communicates with the kernel through the system call ioctl (input / output control); the panel_setcmd() writes the instructions to be executed, such as the backlight setting and mipi screen instructions (such as sleep and wake-up), to the auxiliary channel and calls ioctl to notify the kernel to execute the corresponding instructions.
[0033] Preferably, in step S6, the frame data and display instructions in the video memory are read through the DMA controller in the kernel layer; reading the frame data and display instructions in the video memory through the DMA controller in the kernel layer, the core of this step lies in the direct memory access ability of the DMA controller. The DMA controller can directly read data from the video memory without occupying CPU resources, thereby improving system efficiency. For example, in the display update stage, the DMA controller transfers the frame data in the video memory to the display hardware in a high-bandwidth and low-latency manner to ensure the real-time update of the screen. The DMA controller can complete data transmission at a speed of hundreds of megabytes per second, avoiding screen stuttering or tearing.
[0034] The adaptive frame rate control module dynamically adjusts the VSync signal to generate a target refresh rate, ensuring that the target refresh rate does not exceed the initial refresh rate in the display parameters; the adaptive frame rate control module dynamically adjusts the VSync signal using the display parameters to generate a target refresh rate. The VSync signal is the synchronization signal for screen refreshing, and its frequency determines the screen refresh rate. The adaptive frame rate control module dynamically adjusts the frequency of the VSync signal by real-time monitoring of system performance (such as frame rate, latency, power consumption, etc.). For example, in a low-load scenario, the module can reduce the refresh rate from 60Hz to 30Hz to lower power consumption; while in a high-load scenario, the module can increase the refresh rate to 90Hz or 120Hz to provide a smoother visual experience. This dynamic adjustment not only optimizes system performance but also extends the battery life of the device. Additionally, the inclusion of the initial refresh rate as a reference limits the target refresh rate to a range less than or equal to the initial refresh rate, preventing discomfort when the target refresh rate exceeds the initial refresh rate for the current screen interface.
[0035] Based on the target refresh rate, frame data, and display instructions, control the screen hardware to update the screen update area. This step focuses on the precise control of the screen hardware. The screen hardware updates only the areas that need to be refreshed based on the received frame data and display instructions, rather than the entire screen. For example, with the support of intelligent dirty rectangle detection algorithms, the system can identify the areas that have changed in the picture and transmit the data of these areas to the screen hardware for update. This local refresh mechanism significantly reduces data transfer volume and power consumption, especially suitable for scenarios with a large amount of static content. The dynamic adjustment strategy of the adaptive frame rate control module also takes into account the balance between system power consumption and performance. For example, in mobile devices, the module can intelligently adjust the refresh rate based on the remaining battery power and current application requirements. When the battery power is low, the module will reduce the refresh rate to the lowest acceptable level to extend the device usage time. This strategy not only improves the energy efficiency of the device but also enhances the user experience. The update control of the screen hardware also involves the precise execution of display instructions. For example, through the panel_setcmd() function, the display driver can form specific display instructions, such as brightness adjustment, color mode switching, etc. These display instructions work in coordination with the frame data and refresh rate to ensure the accuracy and consistency of the screen display. For example, in night mode, the display driver can send instructions to reduce the screen brightness and adjust the color temperature to reduce eye strain on the user while maintaining the clarity and smoothness of the picture.
[0036] Optionally, after step S6, step S7 is further included, and step S7 includes: The frame rate data and latency data during the screen display process are obtained through the performance monitoring module as the current display performance status; the performance monitoring module evaluates the current display performance by collecting key metrics during the screen rendering process in real time, such as the frame rate and latency. The frame rate refers to the number of frames displayed per second, usually measured in FPS, and the latency refers to the time difference from when the graphics engine generates frame data to when the screen actually displays it. For example, when running industrial software currently, the performance monitoring module can monitor that the current frame rate is 30 FPS and the latency is 50 milliseconds in real time. These data reflect the current system's rendering ability and response speed, providing a basic basis for subsequent performance optimization.
[0037] If the frame rate data is lower than the first preset threshold or the latency data is higher than the second preset threshold, the rendering strategy is adjusted by reducing the resolution, and the resolution in the display parameters is updated. By comparing the collected frame rate data and latency data with the first preset threshold and the second preset threshold respectively, it can be determined whether the current display performance meets the requirements. For example, the first preset threshold is 60 FPS. If the monitored frame rate is 30 FPS, it indicates that the current display performance status is lower than the preset threshold and there is a performance bottleneck; another example is that the second preset threshold is 30 milliseconds. If the monitored latency is 50 milliseconds, it indicates that the current display performance status is lower than the preset threshold and there is a performance bottleneck. When it is determined that the current display performance status does not meet the standard, the system will automatically adjust the rendering strategy to improve performance. For example, performance can be optimized by reducing the rendering resolution, reducing the rendering complexity, or enabling dynamic resolution scaling and other technical means. For example, when the frame rate is lower than 60 FPS, the system can reduce the rendering resolution from 1080P to 720P, thereby reducing the load on the GPU and increasing the frame rate. This dynamic adjustment strategy can significantly improve the display performance without affecting the user experience.
[0038] Through the adjusted rendering strategy, step S3 is executed to update the frame data generated by the graphics engine. That is, after adjusting the rendering strategy, the graphics engine will generate new frame data based on the updated resolution. For example, after reducing the rendering resolution, the graphics engine will generate frame data with a lower resolution. This update method can effectively reduce the overhead of data transmission and processing and improve the display performance.
[0039] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the screen driving method based on industrial equipment described above.
[0040] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the screen driving method based on industrial equipment described above.
[0041] The embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, without departing from the principle and spirit of the present invention, various changes, modifications, substitutions, and variations to these embodiments still fall within the protection scope of the present invention.
Claims
1. A screen driving method based on industrial equipment, characterized in that, It includes the following steps: S1: Obtain the screen interface type information, and the kernel layer configures the display parameters according to the screen interface type information, where the display parameters include the resolution; S2: Allocate video memory through the application layer and establish a memory mapping; S3: The application layer generates frame data according to the resolution and writes it into the video memory through the memory mapping; S4: Determine the screen update area; S5: The application layer sends a display instruction to the video memory through the memory mapping; S6: The kernel layer reads the frame data and display instruction in the video memory, and controls the screen hardware to update the screen update area according to the display parameters, frame data and display instruction.
2. The screen driving method based on industrial equipment according to claim 1, wherein: In the step S1, the application layer obtains the screen interface type information; the application layer sends the screen interface type information to the kernel layer, and the DRM interface and KMS interface of the kernel layer configure the display parameters according to the screen interface type information.
3. A screen driving method based on industrial equipment according to claim 1, characterized in that: In the step S2, video memory is allocated in the application layer through the GEM and TTM mechanisms, and a dual-channel memory mapping is established; the dual-channel memory mapping includes a main channel and an auxiliary channel, and the display parameters and frame data are transmitted through the main channel, and the display instruction is transmitted through the auxiliary channel; The driver applies for video memory resources through the DRM interface and KMS interface to allocate the video memory size; Both the main channel and the auxiliary channel map the video memory to the user process address space through mmap; The area corresponding to the user process address space used by the main channel is different from the area corresponding to the user process address space used by the auxiliary channel.
4. A screen driving method based on industrial equipment according to claim 1, characterized in that: In the step S3, the application layer generates frame data through the graphics engine; then updates the frame data in the video memory.
5. The screen driving method based on industrial equipment according to claim 1, wherein: In the step S4, the intelligent dirty rectangle detection algorithm is used to compare the pixel differences of the frame data of the previous and current frames to determine the screen change area.
6. The screen driving method based on industrial equipment according to claim 5, characterized in that: In the step S5, corresponding update data is generated according to the screen change area; the generation process of the update data is to extract the pixel information in the dirty rectangle area; The display driver converts the update data into a display instruction.
7. A screen driving method based on industrial equipment according to claim 1, characterized in that: The display parameters further include the initial refresh rate; in the step S6, the kernel layer's DMA controller reads the frame data and display instruction in the video memory; The adaptive frame rate control module dynamically adjusts the VSync signal to generate a target refresh rate, so that the target refresh rate does not exceed the initial refresh rate in the display parameters; According to the target refresh rate, frame data and display instruction, control the screen hardware to update the screen update area.
8. The screen driving method based on industrial equipment according to claim 4, characterized in that: After the step S6, there is also a step S7, and the step S7 includes: Obtain the frame rate data and latency data during the screen display process through the performance monitoring module as the current display performance state; If the frame rate data is lower than the first preset threshold or the latency data is higher than the second preset threshold, then adjust the rendering strategy by reducing the resolution and update the resolution in the display parameters; Execute step S3 to update the frame data generated by the graphics engine through the adjusted rendering strategy.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements a screen driving method for an industrial device according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements a screen driving method based on an industrial device according to any one of claims 1 to 8.
Citation Information
Patent Citations
Mobile terminal and method for controlling screen display when starting terminal
CN101923479A
Android terminal-based system and method for automatically regulating resolutions according to different interfaces
CN106126141A
Watermark updating method, device and system and storage medium
CN114647467A
Rendering display method and device, equipment and storage medium
CN117170883A