Text terminal refreshing method based on GPU display controller

Through the work of allocating memory areas and collaborating with the GPU and CPUs in the GPU, the problem of large CPU resources in the existing text terminal refresh method, low refresh efficiency, and achieve efficient text terminal refresh, improve system performance and user experience and user experience Essence

CN119356782AActive Publication Date: 2025-01-24WUHAN LINGJIU MICROELECTRONICS CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411409668.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-24
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

The display refresh method of existing text terminals relies on CPU line-by-line operation, resulting in large CPU resource consumption, low refresh efficiency, insufficient GPU utilization, and lack of coordinated CPU and GPU work, resulting in reduced system performance and poor user experience.

Method used

By opening up two continuous video memory areas A and B in the GPU, they are used for the visible area and the invisible area of ​​the screen respectively. During the text input process, based on the status of the current screen display area, the GPU and CPU are coordinated to perform display refresh of the text. , modify the starting address of the specified screen display area of ​​the GPU display controller to refresh the display content.

Benefits of technology

Through the collaboration between GPU and CPU, the refresh efficiency of the text terminal has been significantly improved, the CPU load is reduced, the GPU performance is fully utilized, and the smoothness and user experience of the text terminal refresh.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356782A_ABST
    Figure CN119356782A_ABST
Patent Text Reader

Abstract

The invention provides a text terminal refreshing method based on a GPU (Graphics Processing Unit) display controller, which comprises the following steps that: two continuous video memory areas A and B are opened up in a GPU, m rows of texts can be stored in the video memory areas, and n rows of texts can be stored in the video memory areas B; in the text input process, when a line feed operation is triggered, determining the state of a current screen display area; and according to the state of the current screen display area, modifying the initial address of the specified screen display area of the current GPU display controller, and performing refresh display on the newly added text line. According to the method, the display content is refreshed through cooperative work of the GPU and the CPU and by modifying the initial address of the display area, the refreshing efficiency is improved, the load of the CPU is reduced, the performance of the GPU is fully utilized, and the refreshing fluency of the text terminal is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and more specifically, to a text terminal refresh method based on a GPU display controller. Background Art

[0002] As a basic interactive tool, text terminals are widely used in scenarios such as server management and command line operations. The screen display and line refresh of traditional terminals usually rely on CPU line-by-line operations. As the screen content increases, especially when processing a large amount of text scrolling, a full-screen refresh operation is often triggered, resulting in a decrease in system performance and affecting the terminal's response speed. The GPU 2D acceleration engine provides efficient BLT (bit block transfer) operations that can accelerate the movement of screen content and improve display efficiency. However, the display refresh method of existing text terminals does not fully utilize the collaborative work of the GPU and CPU, resulting in limitations in performance and resource utilization.

[0003] In the display refresh process of existing text terminals, it is found that the traditional method based on CPU line-by-line refresh and full-screen redrawing has at least the following technical problems:

[0004] (1) High CPU resource consumption: Full-screen refresh operations consume a lot of CPU resources. Especially when processing fast text refreshes, the CPU load will increase significantly, thus affecting the overall performance of the system.

[0005] (2) Low refresh efficiency: Each full-screen refresh requires redrawing all the screen contents. Especially when processing large amounts of text, the refresh speed is significantly reduced, resulting in poor user experience and easy display freezes or delays.

[0006] (3) Insufficient GPU utilization: Although GPU has significant advantages in graphics processing and display acceleration, the existing technology does not effectively utilize the 2D acceleration function of GPU and cannot effectively improve the display refresh performance of text terminals;

[0007] (4) Lack of multi-task coordination: Existing refresh schemes usually rely only on the CPU for operation and fail to achieve the coordinated work of GPU and CPU, resulting in inefficient resource utilization of the system.

[0008] It can be seen that the existing technology has a performance bottleneck in efficient text refresh, cannot fully utilize the acceleration capability of the GPU, and consumes a lot of system resources in large data volume scenarios. Summary of the invention

[0009] The present invention aims at solving the technical problems in the prior art and provides a text terminal refresh method based on a GPU display controller, aiming to improve the text terminal page refresh efficiency and the overall system performance.

[0010] The present invention provides a text terminal refresh method based on a GPU display controller, comprising:

[0011] S1, open a video memory area in the GPU, and divide the video memory area into two continuous video memory areas A and B, wherein the video memory area A is a visible area of ​​the screen and can store m lines of text, and the video memory area B is an invisible area and can store n lines of text, where m and n are positive integers and n≥m;

[0012] S2, when the text terminal is started, the display control system is initialized, and the starting address of the designated screen display area of ​​the GPU display controller is set, and the screen display area starts from the 0th row of the video memory area A;

[0013] S3, during the text input process, when a line break operation is triggered, determine the state of the current screen display area, and based on the state of the current screen display area and the newly added text line, modify the starting address of the designated screen display area of ​​the GPU display controller to refresh the display content of the display area.

[0014] Based on the above technical solution, the present invention can also make the following improvements.

[0015] Optionally, in S3, according to the state of the current screen display area and based on the newly added text line, modifying the start address of the designated screen display area of ​​the GPU display controller to refresh the display content of the display area includes:

[0016] If the current screen display area is not full, execute S4; if the current screen display area is full, execute S5 or S6;

[0017] S4, processing the newly added text line based on CPU resources;

[0018] S5, if the current screen display area is full and the start address of the designated screen display area of ​​the GPU display controller is between 0 and n lines, add a new text line based on CPU resource processing;

[0019] S6: If the current screen display area is full and the start address of the designated screen display area of ​​the GPU display controller is at line n+1, a new text line is added based on CPU resources and GPU resources.

[0020] Optionally, the S4, processing the newly added text line based on CPU resources, includes:

[0021] If the current screen display area is not full, the new text line entered is appended to the end of the current screen display area;

[0022] Keep the starting address of the designated screen display area of ​​the GPU display controller unchanged;

[0023] Processes display refresh of newly added text lines based on CPU resources.

[0024] Optionally, in S5, if the current screen display area is full and the start address of the screen display area specified by the GPU display controller is between 0 and n lines, processing a new text line based on CPU resources includes:

[0025] Continue to add new text lines entered to the end of the current screen display area;

[0026] Update the starting address of the specified screen display area of ​​the current GPU display controller and move it down one row until it reaches the nth row of the video memory area;

[0027] Processes display refresh of newly added text lines based on CPU resources.

[0028] Optionally, in S6, if the current screen display area is full and the starting address of the designated screen display area of ​​the GPU display controller is in line n+1, processing a new text line based on CPU resources and GPU resources includes:

[0029] If the current screen display area is full, and the starting address of the designated screen display area of ​​the current GPU display controller is located at row n+1, the display content of the n+1th row to the m+nth row of the video memory area B is moved to the video memory area A based on the BLT operation of the GPU, and the starting address of the designated screen display area of ​​the GPU display controller is adjusted to row 0 of the video memory area A;

[0030] Clear the contents of video memory area B;

[0031] Continue to execute S5 and S6 to repeat the display refresh of the text line.

[0032] Optionally, in S3, during the text input process, when a line break operation is triggered, determining a state of the current screen display area includes:

[0033] When the input text content exceeds the data capacity of the current text line or the user enters the carriage return symbol, the text wrapping operation is triggered;

[0034] The state of the current screen display area is determined according to the number of text lines that have been input, and the state of the current screen display area includes that the current screen display area is not full and that the current screen display area is full.

[0035] Optionally, determining the state of the current screen display area according to the number of text lines that have been input includes:

[0036] If the number of text lines that have been entered is less than m, the current screen display area is not full;

[0037] If the number of text lines entered is ≥ m, the current screen display area is full.

[0038] Optionally, the video memory area A is adapted to the screen size. If the screen height is i, the height occupied by a single line of text is j, and m=i / j.

[0039] The present invention provides a text terminal refresh method based on a GPU display controller, which opens two continuous video memory areas A and B in the GPU, wherein the video memory area can store m lines of text, and the video memory area B can store n lines of text; during the text input process, when a line break operation is triggered, the state of the current screen display area is determined; according to the state of the current screen display area and the starting address of the designated screen display area of ​​the current GPU display controller, the GPU and the CPU are coordinated to perform display refresh on the text. The present invention aims to realize the refresh of the display content by the collaborative work of the GPU and the CPU and by modifying the starting address of the display area, thereby improving the refresh efficiency, reducing the CPU load, and making full use of the GPU performance to optimize the smoothness of the text terminal refresh. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is an architecture flow chart of a text terminal refresh method based on a GPU display controller provided by the present invention;

[0041] Figure 2 It is a schematic diagram of an implementation of a text terminal refresh method based on a GPU display controller provided by the present invention for processing a newly added text line when the screen is not full;

[0042] Figure 3 It is a schematic diagram of an implementation of a text terminal refresh method based on a GPU display controller provided by the present invention when the starting address is between 0 and n rows;

[0043] Figure 4 It is a schematic diagram of an implementation of a text terminal refresh method based on a GPU display controller provided by the present invention with a starting address at row n+1;

[0044] Figure 5 The present invention provides a BLT operation implementation diagram of a text terminal refresh method based on a GPU display controller. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not subject to the constraints of the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in this field to achieve. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0046] Figure 1 A flowchart of a text terminal refresh method based on a GPU display controller provided by the present invention is shown in FIG. Figure 1 As shown, the method includes:

[0047] S1, open up a video memory area in the GPU, and divide the video memory area into two continuous video memory areas A and B, wherein the video memory area A is a visible area of ​​the screen and can store m lines of text, and the video memory area B is an invisible area and can store n lines of text, where m and n are positive integers and n≥m.

[0048] It is understandable that the embodiment of the present invention opens up two continuous video memory areas A and B in the GPU, and video memory area A and video memory area B can constitute a video memory area. Among them, video memory area A is the visible area of ​​the screen, which is used to display text content, and video memory area B is an invisible area, and the capacity of the invisible area is not less than the capacity of the visible area, so as to realize scrolling refresh of the displayed content, avoid full-screen redrawing, and improve display efficiency.

[0049] The A video memory area is adapted to the screen size. Assuming the screen height is i, the height occupied by a single line of text is j, and i / j=m, the A video memory area can store m lines of text, and the B video memory area can store n lines of text, and n≥m, a total of m+n lines of text can be accommodated. The larger the capacity of the video memory area B, the more video memory resources are required, but the frequency of using BLT operations will be reduced and the overall efficiency will be improved.

[0050] S2, when the text terminal is started, the display control system is initialized, and the starting address of the designated screen display area of ​​the GPU display controller is set. The screen display area starts from the 0th row of the video memory area A.

[0051] It is understandable that when the text terminal is started, the display control system is initialized. Initially, the starting address of the designated screen display area of ​​the GPU display controller is set to the 0th row of the video memory area A, that is, the display starts from the 0th row of the video memory area A.

[0052] S3, during the text input process, when a line break operation is triggered, determine the state of the current screen display area; based on the state of the current screen display area and the newly added text line, modify the starting address of the designated screen display area of ​​the GPU display controller to refresh the display content of the display area.

[0053] Exemplarily, the S3, during the text input process, when a line break operation is triggered, determines the state of the current screen display area, including: during the text input process, when the input text content exceeds the amount of data accommodated by the current text line or the user enters a carriage return symbol, triggering the text line break operation. According to the number of text lines that have been input, the state of the current screen display area is determined, and the state of the current screen display area includes that the current screen display area is not full and the current screen display area is full.

[0054] If the number of text lines that have been entered is less than m, the current screen display area is not full.

[0055] If the number of text lines entered is ≥ m, the current screen display area is full.

[0056] Exemplarily, in S3, according to the state of the current screen display area and based on the newly added text line, the starting address of the designated screen display area of ​​the GPU display controller is modified, and the display content of the display area is refreshed, including: if the current screen display area is not full, execute S4; if the current screen display area is full, execute S5 or S6.

[0057] S4, processing the newly added text line based on CPU resources.

[0058] like Figure 2 As shown, when the current screen display area is not full, that is, the number of text lines that have been input is less than m lines, the input of newly added text lines is processed based on CPU resources.

[0059] Specifically, S4 includes:

[0060] S4.1, append the new text line to the end of the current screen display area;

[0061] S4.2, the GPU display controller specifies that the starting address of the screen display area remains unchanged;

[0062] S4.3, at this time, only CPU resources are used to process the display refresh of the newly added rows. Since the amount of data in the new rows is small, the CPU load remains low.

[0063] S5, if the current screen display area is full and the start address of the designated screen display area of ​​the GPU display controller is between 0 and n lines, add a new text line based on CPU resource processing.

[0064] Among them, if the current screen display area is full and the starting address of the designated screen display area of ​​the GPU display controller is between 0 and n lines, since the current screen display area is full, when inputting new text lines, the starting address of the designated screen display area of ​​the GPU display controller needs to be updated.

[0065] Specifically, Figure 3 As shown, S5 specifically includes:

[0066] S5.1, continue adding new text lines to the display area;

[0067] S5.2, update the starting address of the designated screen display area of ​​the GPU display controller, and move it down one row until it reaches the nth row of the video memory; dynamically adjust the starting address of the designated screen display area through the CRTC to achieve fast switching of the visible video memory area of ​​the screen.

[0068] S5.3, using CPU resources to handle display refresh of the newly added rows.

[0069] S6: If the current screen display area is full and the start address of the designated screen display area of ​​the GPU display controller is at line n+1, a new text line is added based on CPU resources and GPU resources.

[0070] It can be understood that if the current screen display area is full and the starting address of the designated screen display area of ​​the GPU display controller is in row n+1, then the (n+1)th row to the (n+m)th row in the video memory area B, a total of m rows, are not displayed, and the m rows not displayed in the video memory area B are moved to the video memory area A.

[0071] See also Figure 4 , S6 specifically includes:

[0072] S6.1, use the GPU's BLT operation to move the display content of the n+1th row to the m+nth row in the video memory area B to the video memory area A, and at the same time adjust the start address of the designated screen display area of ​​the GPU display controller to the 0th row in the video memory area A. The BLT operation implementation diagram is shown in Figure 5 As shown;

[0073] S6.2, clear the contents of video memory area B;

[0074] S6.3, continue the S5 operation and repeat the above cycle to ensure smooth scrolling and refreshing of the displayed content.

[0075] The GPU handles the movement of large blocks of content through BLT operations, and the CPU is responsible for processing the rendering of new rows. The GPU and CPU work together to improve the overall performance of the system; and use the GPU's BLT operations to quickly move content between video memory areas, reducing the consumption of system resources.

[0076] The following is a specific example to illustrate a text terminal refresh method based on a GPU display controller provided by the present invention, which includes the following steps:

[0077] (1) Open up two identical and continuous memory areas A and B. Each memory area can hold m lines of text, and a total of 2 times m lines of text can be held.

[0078] (2) When the user inputs a line break operation in the terminal, the system first adjusts the starting address of the designated screen display area of ​​the display controller CRTC from the first line to the second line, and directly completes the line break display;

[0079] (3) When the starting address is between row 0 and row m, there is no need to perform a BLT operation. The CPU only adds new row content and moves the starting address of the CRTC down by one row, and continues to refresh downward.

[0080] (4) As the number of input lines increases, the screen content gradually moves downward, and the starting address is adjusted downward line by line. When the starting address reaches the m+1th line, the system executes the GPU's BLT operation, rolls back all the contents of the A video memory area to line 0 through GPU acceleration, and resets the starting address of the CRTC to line 0;

[0081] (5) The GPU is mainly responsible for large-scale content movement and refreshing, while the CPU only handles the rendering of newly added lines. The GPU and CPU work together to ensure that the system can efficiently perform refresh operations on the text terminal.

[0082] The present invention provides a text terminal refresh method based on a GPU display controller, which realizes fast and seamless text terminal operation and significantly improves system response speed and user experience. The specific advantages are as follows:

[0083] (1) Improve refresh efficiency: The GPU's BLT operation is used to move large blocks of content between video memory areas, avoiding full-screen redrawing and significantly improving the terminal's refresh speed.

[0084] (2) The larger the capacity of the invisible area of ​​the screen, the more video memory resources are required, but the frequency of BLT operations will be reduced accordingly, thereby improving the overall efficiency. Between resource consumption and operating efficiency, the system shows more flexible adaptability;

[0085] (3) Optimizing performance in large text scenarios: When the screen is full, the GPU and CPU work together to significantly improve the efficiency of scrolling large text data and improve the user experience.

[0086] (4) Reduce system resource consumption: The collaborative work of GPU and CPU realizes reasonable task allocation and reduces the overall system resource consumption.

[0087] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0088] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0089] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0090] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0092] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0093] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A text terminal refresh method based on a GPU display controller, characterized in that: include: S1, open a video memory area in the GPU, and divide the video memory area into two continuous video memory areas A and B, wherein the video memory area A is a visible area of ​​the screen and can store m lines of text, and the video memory area B is an invisible area and can store n lines of text, where m and n are positive integers and n≥m; S2, when the text terminal is started, the display control system is initialized, and the starting address of the designated screen display area of ​​the GPU display controller is set, and the screen display area starts from the 0th row of the video memory area A; S3, during the text input process, when a line break operation is triggered, determine the state of the current screen display area, and based on the state of the current screen display area and the newly added text line, modify the starting address of the designated screen display area of ​​the GPU display controller to refresh the display content of the display area.

2. The text terminal refresh method according to claim 1, characterized in that: In S3, according to the state of the current screen display area and based on the newly added text line, the start address of the designated screen display area of ​​the GPU display controller is modified to refresh the display content of the display area, including: If the current screen display area is not full, execute S4; if the current screen display area is full, execute S5 or S6; S4, processing the newly added text line based on CPU resources; S5, if the current screen display area is full and the start address of the designated screen display area of ​​the GPU display controller is between 0 and n lines, add a new text line based on CPU resource processing; S6: If the current screen display area is full and the start address of the designated screen display area of ​​the GPU display controller is at line n+1, a new text line is added based on CPU resources and GPU resources.

3. The text terminal refresh method according to claim 2, characterized in that: S4, processing of new text lines based on CPU resources, including: If the current screen display area is not full, the new text line entered is appended to the end of the current screen display area; Keep the starting address of the designated screen display area of ​​the GPU display controller unchanged; Processes display refresh of newly added text lines based on CPU resources.

4. The text terminal refresh method according to claim 2, characterized in that: S5, if the current screen display area is full and the start address of the designated screen display area of ​​the GPU display controller is between 0 and n lines, adding a new text line based on CPU resources, including: Continue to add new text lines entered to the end of the current screen display area; Update the starting address of the specified screen display area of ​​the current GPU display controller and move it down one row until it reaches the nth row of the video memory area; Processes display refresh of newly added text lines based on CPU resources.

5. The text terminal refresh method according to claim 2, characterized in that: S6, if the current screen display area is full and the start address of the designated screen display area of ​​the GPU display controller is at line n+1, processing a new text line based on CPU resources and GPU resources includes: If the current screen display area is full, and the starting address of the designated screen display area of ​​the current GPU display controller is located at row n+1, the display content of the n+1th row to the m+nth row of the video memory area B is moved to the video memory area A based on the BLT operation of the GPU, and the starting address of the designated screen display area of ​​the GPU display controller is adjusted to row 0 of the video memory area A; Clear the contents of video memory area B; Continue to execute S5 and S6 to repeat the display refresh of the text line.

6. The text terminal refresh method according to claim 1, characterized in that: The step S3, during the text input process, when a line break operation is triggered, determines the state of the current screen display area, including: When the input text content exceeds the data capacity of the current text line or the user enters the carriage return symbol, the text wrapping operation is triggered; The state of the current screen display area is determined according to the number of text lines that have been input, and the state of the current screen display area includes that the current screen display area is not full and that the current screen display area is full.

7. The text terminal refreshing method according to claim 6, characterized in that: Determining the state of the current screen display area according to the number of text lines that have been input includes: If the number of text lines that have been entered is less than m, the current screen display area is not full; If the number of text lines entered is ≥ m, the current screen display area is full.

8. The text terminal refresh method according to claim 1, characterized in that: The video memory area A is adapted to the screen size. If the screen height is i, the height occupied by a single line of text is j, and m=i / j.

Citation Information

Patent Citations

  • Image acceleration implementation method based on embedded processor

    CN112085645A

  • GPU invisible video memory management method and system based on visible video memory exchange area

    CN112465689A

  • Screen driving circuit, display screen and electronic equipment

    CN117059033A

  • Network video stream display method based on GPU hard layer

    CN118138832A

  • Automatically deployed information technology (IT) system and method with enhanced security

    WO2020252088A1