A cursor control method for embedded multi-screen multi-mode graphic display
By designing a cursor control system for embedded multi-screen multi-mode graphic display, the cursor movement display control problem of domestic embedded devices in multi-screen display mode is solved, and the multi-screen multi-mode display support for up to 4 screens is realized, which improves the display capability.
Patent Information
- Application Number
- CN202211506718.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-29
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2042-11-29
AI Technical Summary
Domestic embedded devices have limitations in graphic display, and their support for multi-screen display modes is insufficient, making it difficult to meet the needs of multi-screen display applications.
A cursor control system for embedded multi-screen multi-mode graphic display is designed, including hardware layer, driver layer, plug-in layer and graphics system layer. The cursor display processing module realizes the movement display control of the cursor in the multi-screen multi-display mode under the situation of up to 4 screens.
It realizes effective support for multi-screen display mode under domestic embedded graphics systems, improves the ability of multi-screen multi-mode display, and solves the problem of moving display control of the cursor in multi-screen display mode.
Smart Images

Figure CN115729401B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of embedded graphic display control of domestic basic software and hardware platforms, and more specifically, relates to a cursor control method for embedded multi-screen multi-mode graphic display. Background Art
[0002] Embedded graphic display system is an important component of command and control system, integrated digital navigation, instrument display and other display and control equipment. It can fully, accurately and in real time display visual situation information, and provide strong support for operators to accurately and in real time grasp the dynamics of perceived information and reasonably deploy actions. With the rapid development of computer software and hardware technology and graphic image processing technology, most foreign display and control equipment has been equipped with graphic display systems with complex display graphics, multiple screens, high resolution, high integration and flexible control.
[0003] In terms of domestic GPUs, as the demand for localization increases, domestic units have gradually carried out research work at the GPU hardware and software levels. Domestic research institutes have successively launched a series of graphics display chip products GP101 and GP201 with unified rendering 3D graphics acceleration functions, which have been widely used. Some companies have also developed graphics processing chips JM7200, which can provide GUI application support such as two-dimensional maps, three-dimensional maps and digital instruments. Other companies such as HiSilicon, Loongson, Rockchip Microelectronics, Allwinner, and New Coastline have adopted solutions that integrate foreign commercial embedded GPU IPs to develop related SOC form products for use in embedded consumer products.
[0004] At present, most domestic embedded devices still support single-screen or dual-screen display for graphics display, and the display modes are not rich enough. There are problems such as only supporting one or two display modes of cloning, horizontal expansion dual-screen, and vertical expansion dual-screen, and poor support for horizontal independent dual-screen, vertical independent dual-screen, and multi-display modes of more than two screens, which makes it difficult to meet the growing demand for multi-screen display applications. The cursor display control unit, as a key link in graphics display processing, plays an important role in the realization of multi-screen and multi-mode display of embedded graphics systems. Accordingly, the original cursor control design has problems such as the inability to cross the screen and display control in the mobile display control in the horizontal independent dual-screen, vertical independent dual-screen display mode, and the horizontal, vertical expansion or independent split-screen display mode of more than two screens.
[0005] In order to meet the multi-screen display application requirements of domestic platforms, it is necessary to develop a control method for multi-screen multi-mode graphics display based on the domestic processor hardware platform to support the output of 2 or more different display modes based on the domestic embedded graphics system, combined with the hardware characteristics of domestic GPU and mouse devices and the friendly human-computer interaction and cross-platform characteristics of the QT graphics system. Summary of the invention
[0006] In view of the defects of the prior art, the purpose of the present invention is to provide a cursor control system and method for embedded multi-screen multi-mode graphics display, to achieve cursor movement display control support in multi-screen multi-display mode with up to 4 screens under the embedded graphics system, and to solve the problem of mouse movement display control supporting multi-screen display mode under the embedded graphics system.
[0007] To achieve the above-mentioned object, the present invention provides a cursor control system for embedded multi-screen multi-mode graphic display, which includes a hardware layer, a driver layer, a plug-in layer and a graphic system layer. The driver layer includes a cursor display processing module, and the cursor display processing module includes a cursor display initialization module, a cursor bitmap creation module, a cursor image setting module, a cursor movement processing module and a cursor display and hiding module, wherein:
[0008] The cursor display initialization module is used to set the initial cursor information, detect and identify the number of GPUs, determine the number of cursors according to the number of GPUs, and set the cursor mapping base address and cursor register;
[0009] The cursor bitmap creation module is used to create a hardware cursor bitmap;
[0010] The cursor image setting module is used to perform hardware cursor bitmap verification, and when the shape of the application cursor is changed or the cursor is updated, the cursor image is reset for the cursor corresponding to each GPU according to the number of GPUs;
[0011] The cursor movement processing module is used to obtain the latest coordinate information of the current mouse transmitted by the application, and move the cursor to the corresponding position for display. Specifically, the cursor position register is set by dividing the domain into four quadrants according to the clone, horizontal expansion and vertical expansion flags, so as to realize the display of the corresponding cursor position.
[0012] The cursor display and hiding module is used to set the registers for cursor display and hiding according to the four quadrants of the screen, so as to realize the display and hiding of the cursor.
[0013] Furthermore, the cursor movement processing module adopts a four-quadrant division method to expand functions in the form of vertical cursor setting and horizontal cursor setting, and after the expansion, it can support cursor movement control in a maximum of 4-screen display situations.
[0014] Furthermore, the cursor display and hiding module divides the screen into four quadrants for displaying and hiding the cursor, so as to be able to control the display and hiding of the cursor in different display modes in single-screen, dual-screen, triple-screen and quad-screen situations.
[0015] According to a second aspect of the present invention, there is also provided a method for controlling using the cursor control system as described above, comprising the following steps:
[0016] Cursor display initialization steps: Use the cursor display initialization module to set the initial cursor information, detect and identify the number of GPUs, determine the number of cursors based on the result of the GPU number judgment, and set the cursor mapping base address and cursor register for each cursor.
[0017] Cursor bitmap creation steps: Use the cursor bitmap creation module to create the hardware cursor bitmap.
[0018] Cursor image setting steps: Use the cursor image setting module to perform hardware cursor bitmap verification, and set the cursor bitmap start address according to the GPU status. Also set the cursor image and display it according to the GPU status.
[0019] Cursor movement processing steps: Use the cursor movement processing module to obtain the current cursor and perform new position calculation processing. Use four-quadrant division to set the cursor position register according to the clone, horizontal expansion, and vertical expansion flags.
[0020] Cursor display and hiding steps: Use the cursor display and hiding module to set the cursor display and hiding registers according to the four-quadrant division method of the screen, and realize the display and hiding of the cursor accordingly.
[0021] Furthermore, the cursor display initialization step specifically includes:
[0022] S1: First allocate the memory required for the mouse and cursor devices, and then check the cursor width and height parameters.
[0023] S2: Set the initial cursor position coordinates according to the cursor width and height parameters.
[0024] S3: First directly set the cursor base address of the first GPU, then detect the number of GPUs, and when the second GPU is detected, set the cursor base address of the second GPU. If the second GPU does not exist, jump directly to step S4.
[0025] S4: Determine the initial display position of the cursor on the screen according to the clone, horizontal, and vertical display mode flags and the comparison between the initial coordinates of the cursor and the maximum width and height of the single screen.
[0026] Furthermore, the cursor image setting step specifically includes:
[0027] S1: Perform hardware cursor bitmap parameter verification, check the bitmap type, and confirm that it is a hardware cursor type.
[0028] S2: Set the cursor bitmap pointer to point to the GPU hardware cursor start address, determine whether there is a second GPU, if so, define a second cursor bitmap pointer and point it to the second GPU cursor image start address, and then execute step S3,
[0029] If there is no second cursor bitmap pointer, jump directly to step S3,
[0030] S3: Perform pointer assignment operation from the cursor bitmap image content to the hardware cursor address area, complete the movement of the cursor image to the cursor display memory, and implement cursor image setting.
[0031] Furthermore, the cursor movement processing step specifically includes:
[0032] S1: Get the current cursor definition, confirm that the current cursor definition exists, and get the new cursor coordinate position.
[0033] S2: Save the new cursor coordinate position, and calculate the absolute coordinate of the new cursor to obtain the absolute coordinate of the new cursor.
[0034] S3: Execute the display mode flag judgment, and perform the instruction setting of the cursor position register according to the judgment result classification, and each judgment result corresponds to a setting operation of the set cursor position register. Specifically, if the display mode judgment result is the vertical mode, the vertical cursor setting function is called for further processing, that is, firstly, the cursor vertical coordinate range constraint is performed, and then the quadrant partition where the cursor is located is determined according to the screen height range where the vertical coordinate value is located, and the cursor state and position are set through the cursor display register and position register control instructions, and finally the cursor quadrant partition flag is updated; if the display mode judgment result is the horizontal mode, the horizontal cursor setting function is called for further processing through the horizontal cursor setting function, that is, firstly, the cursor horizontal coordinate range constraint is performed, and then the quadrant partition where the cursor is located is determined according to the screen width range where the horizontal coordinate value is located, and the cursor state and position are set through the cursor display register and position register control instructions, and finally the cursor quadrant partition flag is updated; if the display mode judgment result is other, it is set to the clone screen mode, that is, the cursor position is directly set through the cursor position register, and the cursor quadrant partition is set to 0 partition.
[0035] Furthermore, the cursor display process in the cursor display and hiding steps specifically includes:
[0036] S1: Determine whether the current cursor is in the first quadrant.
[0037] If the current cursor is in the first quadrant, the instruction setting of the cursor control register of the first GPU is executed, and the cursor of the first GPU is displayed as the main screen cursor. Then, it is determined whether the second GPU is also in working state. If so, the instruction setting of the cursor control register of the second GPU is performed, and the cursor of the second GPU is set to be hidden. If not, directly jump to step S5.
[0038] If the current cursor is not in the first quadrant, jump directly to step S2.
[0039] S2: Determine whether the current cursor is in the second quadrant according to the cursor partition mark.
[0040] If the current cursor is in the second quadrant, the cursor control register of the first GPU is set by command, and it is displayed as the cursor of the secondary screen. Then, it is determined whether the second GPU is also in working state. If so, the cursor control register of the second GPU is set by command, and the cursor of the second GPU is set to be hidden. If not, it directly jumps to step S5.
[0041] If the current cursor is not located in the second quadrant, jump directly to step S3.
[0042] S3: Determine whether the current cursor is in the third quadrant according to the cursor partition mark.
[0043] If the current cursor is in the third quadrant, the cursor control register of the second GPU is set with instructions to display it as the main screen cursor, and then the cursor control register of the first GPU is set with instructions to hide its cursor.
[0044] If the current cursor is not located in the third quadrant, jump directly to step S4.
[0045] S4: Determine whether the current cursor is located in the fourth quadrant according to the cursor partition mark.
[0046] If the current cursor is in the fourth quadrant, the cursor control register of the second GPU is set to display the cursor on the secondary screen, and then the cursor control register of the first GPU is set to hide its cursor.
[0047] S5: End
[0048] Furthermore, the cursor hiding process in the cursor display and hiding step is specifically as follows: as required, directly setting the cursor control register value of the corresponding GPU to 0 to hide the corresponding cursor.
[0049] In general, the above technical solution conceived by the present invention has the following advantages compared with the prior art:
[0050] Beneficial effects:
[0051] The present invention provides a cursor control method for embedded multi-screen graphic display, which realizes cursor movement control and display processing in display modes such as up to four screen cloning, horizontal expansion, vertical expansion, horizontal independent split screen, and vertical independent split screen in a domestic embedded graphic system, thereby improving the multi-screen and multi-mode display support capability of the domestic embedded graphic system. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a schematic diagram of the overall architecture of realizing multi-screen multi-mode display cursor control according to an embodiment of the present invention;
[0053] Figure 2 1. It is a schematic diagram of the improved principle of the multi-screen multi-mode display cursor control system according to an embodiment of the present invention;
[0054] Figure 3 This is a flowchart of the cursor display initialization module according to an embodiment of the present invention;
[0055] Figure 4 This is a workflow diagram of a cursor image setting module according to an embodiment of the present invention;
[0056] Figure 5 This is a flowchart of the cursor movement processing module of an embodiment of the present invention;
[0057] Figure 6 Schematic diagram of cursor movement according to the four-quadrant division method of an embodiment of the present invention;
[0058] Figure 7 It is a cursor display workflow diagram of the cursor display and hiding module of an embodiment of the present invention;
[0059] Figure 8 The present invention is a cursor hiding workflow diagram of a cursor display and hiding module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0061] This paper proposes a cursor control solution for multi-screen display, specifically a cursor control system and method for embedded multi-screen multi-mode graphic display, so as to realize cursor movement display control under multi-screen multi-mode graphic display. Among them, a cursor control system for embedded multi-screen multi-mode graphic display includes a mouse device driver module, a mouse plug-in module, a QT graphic window system, a display plug-in module, and a display driver module. In the present invention application, the improvement is in the display driver module, and the other modules are participating modules of the entire design scheme, which are more concentrated in the cursor display processing module in the display driver module.
[0062] Figure 1 The figure is a schematic diagram of the overall architecture of the multi-screen multi-mode display cursor control implementation of the embodiment of the present invention. It can be seen from the figure that the multi-screen mode cursor display control application environment of the present invention includes an application layer, a graphics system layer, a plug-in layer, a driver layer and a hardware layer. The cursor display processing module is located in the driver layer. The core body of the present invention is located in the driver layer in the embedded graphics system. As a part of the display driver, it is embodied in the form of a cursor display processing module. The cursor display processing module includes a cursor display initialization module, a cursor bitmap creation module, a cursor image setting module, a cursor movement processing module and a cursor display and hiding module. Among them, the cursor display initialization module mainly completes the setting of the cursor initial information, the setting of the cursor related registers, the base address, etc.; the cursor bitmap creation module mainly creates the hardware cursor bitmap; the cursor image setting module mainly completes the resetting of the cursor image when the application cursor shape changes or the cursor is updated; the cursor movement processing module is mainly used to obtain the latest coordinate information of the current mouse downloaded by the application, and move the cursor to the corresponding position for display; the cursor display and hiding module is mainly used to control the display and hiding operations of the cursor on the screen.
[0063] Figure 2It is a schematic diagram of the improved principle of the multi-screen multi-mode display cursor control system of an embodiment of the present invention. It can be seen from the figure that the main improvements of the multi-screen multi-mode display cursor control system of the present invention are embodied in four modules. Before the improvement is made, the original cursor display control module includes a cursor display initialization module, a cursor bitmap creation module, a cursor image setting module, a cursor movement processing module and a cursor display and hiding module. After the improvement, the multi-screen display cursor control module applied for by the present invention still includes a cursor display initialization module, a cursor bitmap creation module, a cursor image setting module, a cursor movement processing module and a cursor display and hiding module, but the functions of the four modules of the cursor display initialization module, the cursor image setting module, the cursor movement processing module and the cursor display and hiding module have changed. Specifically, after the change, the cursor display initialization module will set the cursor register and address according to the display mode, the cursor image setting module will set the cursor bitmap starting address according to the GPU state, the cursor movement processing module will use the four-quadrant division method to divide the domain according to the cloning, horizontal expansion and vertical expansion marks to set the cursor position register, and the cursor display and hiding module will set the cursor display and hiding register according to the four-quadrant division method of the screen.
[0064] In the process of controlling by using the multi-screen multi-mode display cursor control system of the present invention, the main improvements occur in the following four aspects:
[0065] (1) Cursor initialization of embedded multi-screen multi-mode graphics display. This work occurs in the cursor display initialization module. An improved design is made for the cursor display initialization module in the display driver. In particular, the cursor display initialization module adds detection and recognition of the number of GPUs, determines the number of cursors based on the result of the GPU number judgment, and performs cursor mapping base address setting and cursor register setting, wherein the first cursor controls the first screen and the second screen, and the second cursor controls the third screen and the fourth screen.
[0066] (2) Cursor image setting for embedded multi-screen multi-mode graphics display. This work mainly occurs in the cursor image setting module. An improved design is made for the cursor image setting module in the display driver. In particular, the existence judgment of the second GPU and the corresponding cursor bitmap processing settings are added.
[0067] (3) Cursor movement processing for embedded multi-screen multi-mode graphics display. This work occurs in the cursor movement processing module. An improved design is performed on the cursor movement processing module in the display driver. In particular, the four-quadrant division method is used to expand the function in the form of vertical cursor setting function and horizontal cursor setting function. After the expansion, it can support cursor movement control in a maximum of 4-screen display situations.
[0068] (4) Cursor display and hiding of embedded multi-screen multi-mode graphic display, with improved design for cursor display and hiding modules in display driver. In particular, the screen is divided into four quadrants for cursor display processing to control the display and hiding of the cursor in different display modes under single screen, dual screen, triple screen and quad screen scenarios.
[0069] Figure 3 : is a flowchart of the cursor display initialization module of an embodiment of the present invention, such as Figure 3 As shown, the cursor display initialization module mainly completes the functions of setting the cursor initial information, setting the cursor related registers, base address, etc. In particular, the cursor display initialization module adds detection and recognition of the number of GPUs, and sets the cursor mapping base address and cursor registers according to the result of the GPU number judgment. In more detail, its workflow or working steps are as follows:
[0070] S1: First allocate the memory required for the mouse cursor device, and then check the cursor width and height parameters.
[0071] S2: Set the initial cursor position coordinates according to the passed parameters.
[0072] S3: Detect and identify the number of GPUs, and set the cursor mapping base address according to the detection result. More specifically, first directly set the cursor base address of the first GPU, then detect the number of GPUs, and when the second GPU is detected, set the cursor base address of the second GPU. If the second GPU does not exist, jump directly to the subsequent steps.
[0073] Step S4: Determine the initial display position of the cursor on the screen according to the comparison between the clone, horizontal, and vertical display mode flags and the initial coordinates of the cursor and the maximum width and height of the single screen. Specifically, the display mode flag is judged first, and there are three kinds of judgment results: the first is the initial position setting of the cursor in the clone mode, the second is the initial position setting of the cursor in the vertical mode, and the third is the initial position setting of the cursor in the horizontal mode, that is, the initial position setting of the cursor needs to be performed according to the display mode.
[0074] Figure 4 This is a flowchart of the cursor image setting module of an embodiment of the present invention. As can be seen from the figure, the cursor image setting module is mainly used to complete the function of resetting the cursor image when the application cursor shape changes or the cursor is updated. In particular, the existence judgment of the second GPU and the processing setting of the corresponding cursor bitmap are added. The main steps and working methods of the cursor image setting module are as follows:
[0075] S1: Perform hardware cursor bitmap parameter verification, check the bitmap type, and confirm that it is a hardware cursor type;
[0076] S2: Set the cursor bitmap pointer, the cursor bitmap pointer points to the GPU hardware cursor starting address, and determine whether there is a second GPU. If so, define the second cursor bitmap pointer and point it to the second GPU cursor image starting address, and then execute step S2. If the second cursor bitmap pointer does not exist, jump directly to step S2.
[0077] S3: Perform pointer assignment operation from the cursor bitmap image content to the hardware cursor address area to complete the movement of the cursor image to the cursor display memory. During this process, the recognition and judgment of the second cursor mark will be added. If it exists, the same operation of the first cursor will be repeated to complete the setting operation of the cursor bitmap.
[0078] Figure 5 This is a flowchart of the cursor movement processing module of an embodiment of the present invention. As can be seen from the figure, the cursor movement processing module is mainly used to move the latest coordinate information of the current mouse to the corresponding position on the screen and display it in the form of a cursor. In particular, the four-quadrant division method is used to expand the function in the form of a vertical cursor setting function and a horizontal cursor setting function. After the expansion, it can support cursor movement control under a maximum of 4 screen display situations. The main steps and workflow of the cursor movement processing module are as follows:
[0079] S1: Get the current cursor definition and make sure that the current cursor definition exists.
[0080] S2: Save the new cursor coordinate position and calculate the new absolute coordinates.
[0081] S3: Execute the display mode flag judgment, and perform the setting operation of the cursor position register according to the judgment result classification, and each judgment result corresponds to a setting operation of the set cursor position register. Specifically, if the display mode judgment result is the vertical mode, the vertical cursor setting function is called for further processing, that is, firstly, the cursor vertical coordinate range constraint is performed, and then the quadrant partition where the cursor is located is determined according to the screen height range where the vertical coordinate value is located, and the cursor state and position are set through the cursor display register and position register control instructions, and finally the cursor quadrant partition flag is updated; if the display mode judgment result is the horizontal mode, the horizontal cursor setting function is called for further processing through the horizontal cursor setting function, that is, firstly, the cursor horizontal coordinate range constraint is performed, and then the quadrant partition where the cursor is located is determined according to the screen width range where the horizontal coordinate value is located, and the cursor state and position are set through the cursor display register and position register control instructions, and finally the cursor quadrant partition flag is updated; if the display mode judgment result is other, it is set to the clone screen mode, that is, the cursor position is directly set through the cursor position register, and the cursor quadrant partition is set to 0 partition.
[0082] Figure 6 Schematic diagram of cursor movement using the four-quadrant division method according to an embodiment of the present invention. Figure 6 It can be seen that the screen display modes include 2-screen vertical mode, 4-screen vertical mode, 2-screen horizontal mode, 4-screen horizontal mode and 3-screen horizontal mode.
[0083] Figure 7 This is a flowchart of the cursor display and hiding module cursor display workflow of the embodiment of the present invention. Figure 8 The following is a flowchart of the cursor hiding process of the cursor display and hiding module of the embodiment of the present invention. Figure 7 , Figure 8 It can be seen that the cursor display and hiding module of the embodiment of the present invention is mainly used to control the display and hiding operation of the cursor on the screen. In particular, the screen is divided into four quadrants for cursor display processing. The workflow or working steps of the cursor display and hiding module of the embodiment of the present invention mainly include the following:
[0084] S1: Determine whether the current cursor is in the first quadrant.
[0085] If the current cursor is in the first quadrant, that is, in the main screen of the first GPU, the instruction setting of the cursor control register of the first GPU is executed, and the cursor of the first GPU is displayed as the main screen cursor. Then it is determined whether the second GPU is also in working state. If so, that is, there are more than two screens displayed, the instruction setting of the cursor control register of the second GPU is performed, and the cursor of the second GPU is set to be hidden to ensure that only one cursor is in working state on all working screens. If not, jump directly to step S5.
[0086] If the current cursor is not in the first quadrant, jump directly to step S2.
[0087] S2: Determine whether the current cursor is in the second quadrant according to the cursor partition mark.
[0088] If the current cursor is located in the second quadrant, that is, located on the secondary screen of the first GPU, the cursor control register of the first GPU is set by instructions, and it is displayed as the secondary screen cursor. Then, it is determined whether the second GPU is also in working state. If so, that is, there are more than two screens displayed, the cursor control register of the second GPU is set by instructions, and the cursor of the second GPU is set to be hidden. If not, jump directly to step S5.
[0089] If the current cursor is not located in the second quadrant, jump directly to step S3.
[0090] S3: Determine whether the current cursor is in the third quadrant according to the cursor partition mark.
[0091] If the current cursor is located in the third quadrant, that is, on the main screen of the second GPU, the cursor control register of the second GPU is set by instructions to display it as the main screen cursor, and then the cursor control register of the first GPU is set by instructions to hide its cursor.
[0092] If the current cursor is not located in the third quadrant, jump directly to step S4.
[0093] S4: Determine whether the current cursor is located in the fourth quadrant according to the cursor partition mark.
[0094] If the current cursor is in the fourth quadrant, that is, on the second GPU's secondary screen, then the cursor control register of the second GPU is commanded to be set to display the cursor on the secondary screen, and then the cursor control register of the first GPU is commanded to be set to be hidden.
[0095] S5: End.
[0096] In the cursor hiding workflow diagram of the cursor display and hiding module in the embodiment of the present invention, the cursor hiding workflow of the cursor display and hiding module is relatively simple. When working, the cursor control register value of the first GPU is directly set to hidden, that is, the first cursor display register is set to 0, and it is determined whether there is a second GPU. If there is a second GPU, the cursor control register value of the second GPU is also set to hidden, that is, the second cursor display register is set to 0.
[0097] The present invention provides a cursor control method for multi-screen display, which relates to the field of embedded graphics display control of domestic basic software and hardware platforms. The present invention mainly relates to the driver layer in the embedded graphics system, which is embodied in the form of a cursor display processing module as a part of the display driver. The cursor movement display control support in the multi-screen multi-display mode with a maximum of 4 screens in the embedded graphics system is realized through the improved design of the cursor display processing module, which can solve the problem of supporting the multi-screen display mode of the mouse movement display control in the embedded graphics system. The present invention is suitable for the field of embedded human-computer interaction.
[0098] The system and method provided by the present invention have been verified and implemented on the domestic software and hardware platforms using Loongson and Feiteng processors. The operating system of the above domestic software and hardware platforms is the Tao operating system, and the graphics system is the QT graphics window system based on the domestic dual GPU.
[0099] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A cursor control system for embedded multi-screen multi-mode graphic display, wherein the application environment includes a hardware layer, a driver layer, a plug-in layer and a graphic system layer, wherein the driver layer includes a cursor display processing module, characterized in that: The cursor display processing module includes a cursor display initialization module, a cursor bitmap creation module, a cursor image setting module, a cursor movement processing module and a cursor display and hiding module, wherein: The cursor display initialization module is used to set the initial cursor information, detect and identify the number of GPUs, determine the number of cursors according to the number of GPUs, and set the cursor mapping base address and cursor register; The cursor bitmap creation module is used to create a hardware cursor bitmap; The cursor image setting module is used to perform hardware cursor bitmap verification, and when the shape of the application cursor is changed or the cursor is updated, the cursor image is reset for the cursor corresponding to each GPU according to the number of GPUs; The cursor movement processing module is used to obtain the latest coordinate information of the current mouse transmitted by the application, and move the cursor to the corresponding position for display. Specifically, the cursor position register is set by dividing the domain into four quadrants according to the clone, horizontal expansion and vertical expansion flags, so as to realize the display of the corresponding cursor position. The cursor display and hiding module is used to set the registers for cursor display and hiding according to the four quadrants of the screen, so as to realize the display and hiding of the cursor.
2. A cursor control system for embedded multi-screen multi-mode graphic display according to claim 1, characterized in that: The cursor movement processing module adopts a four-quadrant division method to expand functions in the form of vertical cursor setting and horizontal cursor setting. After expansion, it can support cursor movement control under a maximum of 4-screen display conditions.
3. A cursor control system for embedded multi-screen multi-mode graphic display as claimed in claim 2, characterized in that: The cursor display and hiding module divides the screen into four quadrants for displaying and hiding the cursor, so as to be able to control the display and hiding of the cursor in different display modes under single screen, dual screen, triple screen and quad screen situations.
4. A method for controlling using a cursor control system as claimed in any one of claims 1 to 3, characterized in that: It includes the following steps: Cursor display initialization steps: Use the cursor display initialization module to set the initial cursor information, detect and identify the number of GPUs, determine the number of cursors based on the result of the GPU number judgment, and set the cursor mapping base address and cursor register for each cursor. Cursor bitmap creation steps: Use the cursor bitmap creation module to create the hardware cursor bitmap. Cursor image setting steps: Use the cursor image setting module to perform hardware cursor bitmap verification, and set the cursor bitmap start address according to the GPU status. Also set the cursor image and display it according to the GPU status. Cursor movement processing steps: Use the cursor movement processing module to obtain the current cursor and perform new position calculation processing. Use four-quadrant division to set the cursor position register according to the clone, horizontal expansion, and vertical expansion flags. Cursor display and hiding steps: Use the cursor display and hiding module to set the cursor display and hiding registers according to the four-quadrant division method of the screen, and realize the display and hiding of the cursor accordingly.
5. The method according to claim 4, characterized in that The cursor display initialization steps specifically include: S1: First allocate the memory required for the mouse and cursor devices, and then check the cursor width and height parameters. S2: Set the initial cursor position coordinates according to the cursor width and height parameters. S3: First directly set the cursor base address of the first GPU, then detect the number of GPUs, and when the second GPU is detected, set the cursor base address of the second GPU. If the second GPU does not exist, jump directly to step S4. S4: Determine the initial display position of the cursor on the screen according to the clone, horizontal, and vertical display mode flags and the comparison between the initial coordinates of the cursor and the maximum width and height of the single screen.
6. The method according to claim 4, characterized in that The steps for setting the cursor image specifically include: S1: Perform hardware cursor bitmap parameter verification, check the bitmap type, and confirm that it is a hardware cursor type. S2: Set the cursor bitmap pointer to point to the GPU hardware cursor start address, determine whether there is a second GPU, if so, define a second cursor bitmap pointer and point it to the second GPU cursor image start address, and then execute step S3, If there is no second cursor bitmap pointer, jump directly to step S3, S3: Perform pointer assignment operation from the cursor bitmap image content to the hardware cursor address area, complete the movement of the cursor image to the cursor display memory, and implement cursor image setting.
7. The method according to claim 4, characterized in that The cursor movement processing steps specifically include: S1: Get the current cursor definition, confirm that the current cursor definition exists, and get the new cursor coordinate position. S2: Save the new cursor coordinate position, and calculate the absolute coordinate of the new cursor to obtain the absolute coordinate of the new cursor. S3: Execute display mode flag judgment, and perform instruction setting of cursor position register according to the judgment result classification. Each judgment result corresponds to a setting operation of a set cursor position register. Specifically, if the display mode is determined to be vertical mode, the vertical cursor setting function is called for further processing. If the display mode is judged as horizontal mode, the horizontal cursor setting function is called for further processing. If the display mode judgment result is other, it is set to clone screen mode, the cursor position is directly set through the cursor position register, and the cursor quadrant partition is set to 0 partition.
8. The method according to claim 4, characterized in that The cursor display process in the cursor display and hiding steps specifically includes: S1: Determine whether the current cursor is in the first quadrant. If the current cursor is in the first quadrant, the instruction setting of the cursor control register of the first GPU is executed, and the cursor of the first GPU is displayed as the main screen cursor. Then, it is determined whether the second GPU is also in working state. If so, the instruction setting of the cursor control register of the second GPU is performed, and the cursor of the second GPU is set to be hidden. If not, directly jump to step S5. If the current cursor is not in the first quadrant, jump directly to step S2. S2: Determine whether the current cursor is in the second quadrant according to the cursor partition mark. If the current cursor is in the second quadrant, the cursor control register of the first GPU is set by command, and it is displayed as the cursor of the secondary screen. Then, it is determined whether the second GPU is also in working state. If so, the cursor control register of the second GPU is set by command, and the cursor of the second GPU is set to be hidden. If not, it directly jumps to step S5. If the current cursor is not located in the second quadrant, jump directly to step S3. S3: Determine whether the current cursor is in the third quadrant according to the cursor partition mark. If the current cursor is in the third quadrant, the cursor control register of the second GPU is set with instructions to display it as the main screen cursor, and then the cursor control register of the first GPU is set with instructions to hide its cursor. If the current cursor is not located in the third quadrant, jump directly to step S4. S4: Determine whether the current cursor is located in the fourth quadrant according to the cursor partition mark. If the current cursor is in the fourth quadrant, the cursor control register of the second GPU is set to display the cursor on the secondary screen, and then the cursor control register of the first GPU is set to hide its cursor. S5: End.
9. The method according to claim 8, characterized in that The cursor hiding process in the cursor display and hiding step is specifically as follows: as needed, directly set the cursor control register value of the corresponding GPU to 0 to hide the corresponding cursor.
Citation Information
Patent Citations
Method for processing graphic command in multi-GPU splicing environment
CN111045623A
Display IP module hardware mouse implementation method based on non-cursor layer
CN114371878A