Display splicing method, device, system, computer device, readable storage medium and program product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GRANFIELD INTELLIGENT TECH (WUHAN) CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-14
AI Technical Summary
尽管多屏扩展在某些应用场景提升了用户的效率和使用体验,但应用无法在多屏幕环境下实现最大化输出,这意味着用户无法完全利用扩展带来的多屏显示效果
[0057]上述显示拼接方法、装置、计算机设备、计算机可读存储介质和计算机程序产品,首先,获取拼接应用程序发送的第一参数消息;其中,第一参数消息包括对应于拼接模式的第一标识和拼接分辨率;其次,根据第一标识将参与拼接的各物理显示器的工作模式切换为拼接模式,并标记为第一状态标记,将预先注册好的虚拟显示链路对应的虚拟显示器标记为第二状态标记;其中,第一状态标记是未与桌面管理器连接的状态标记;第二状态标记是与桌面管理器连接的状态标记;当进入拼接模式时,将物理显示器打上未与桌面管理器连接的状态标记,此时桌面管理器忽视物理显示器,不再管理物理显示器,只管理连接的虚拟显示器;可以避免物理显示器破坏虚拟显示器的拼接效果。最后,基于第一状态标记和第二状态标记,生成第一热插拔事件,第一热插拔事件用于通知用户层的桌面管理器;桌面管理器用于根据第一热插拔事件和拼接分辨率生成并输出拼接后的虚拟显示画面;其中,在桌面管理器生成所述虚拟显示画面过程中,通过各所述物理显示器响应所述桌面管理器调用所述虚拟显示器的操作请求。桌面管理器读取状态标记之后,不再管理物理显示器,只管理连接的虚拟显示器;而桌面管理器对虚拟显示器执行的操作请求都会被拼接模块转化为通过各物理显示器实现的操作。桌面管理器只需要正常的读取信息和发送请求即可,无需对桌面管理器进行额外改进,即可实现稳定、通用的显示拼接。
Smart Images

Figure CN122387404A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display technology, and in particular to a display splicing method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] With the rapid development of information technology and the continuous advancement of display technology, the demand for visual display is becoming increasingly diversified. Currently, most operating systems on the market support multi-monitor expansion, allowing users to view multiple applications or documents on different screens, reducing the time spent frequently switching windows and improving work efficiency. While multi-screen expansion enhances user efficiency and experience in certain application scenarios, applications cannot achieve maximum output in a multi-screen environment, meaning users cannot fully utilize the multi-screen display effects. To address the shortcomings of multi-screen expansion, graphics card manufacturers have successively implemented multi-screen splicing functions, such as AMD's Eyefinity and Nvidia's NView.
[0003] However, these relatively mature splicing solutions are all designed for Windows systems. With the development of domestic operating systems, Linux systems such as UOS (a communication operating system) and Kylin (a Kylin operating system) are becoming more and more popular, and there is a need for a universal solution that can achieve splicing on Linux systems. Summary of the Invention
[0004] Therefore, it is necessary to provide a universal display splicing method, device, computer equipment, computer-readable storage medium, and computer program product that does not require additional support from a desktop manager to address the aforementioned technical problems.
[0005] In a first aspect, this application provides a display splicing method applied to a splicing module in a driver layer; the method includes:
[0006] Obtain the first parameter message sent by the splicing application; wherein the first parameter message includes a first identifier corresponding to the splicing mode and the splicing resolution;
[0007] Based on the first identifier, the working mode of each physical display participating in the splicing is switched to splicing mode and marked as the first status marker, and the virtual display corresponding to the pre-registered virtual display link is marked as the second status marker; wherein, the first status marker is the status marker that is not connected to the desktop manager; the second status marker is the status marker that is connected to the desktop manager;
[0008] Based on the first state flag and the second state flag, a first hot-plug event is generated, which is used to notify the desktop manager of the user layer; the desktop manager is used to generate and output the spliced virtual display screen according to the first hot-plug event and the splicing resolution; wherein, during the process of the desktop manager generating the virtual display screen, each of the physical displays responds to the desktop manager's operation request to call the virtual display.
[0009] In one embodiment, prior to obtaining the first parameter message sent by the splicing application, the method further includes:
[0010] Obtain all physical displays connected to the current operating system, associate the physical display links of each physical display with the virtual display links corresponding to the virtual displays, complete the registration of the virtual display links, and mark the virtual displays corresponding to the registered virtual display links as the first status marker.
[0011] In one embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; the operation request includes a setting request for the virtual display; the step of responding to the desktop manager's operation request to invoke the virtual display through each of the physical displays includes:
[0012] Receive the configuration request for the virtual display sent by the desktop manager;
[0013] According to the setting request, the splicing resolution is split into at least two resolutions;
[0014] At least two of the resolutions are applied to the physical display timing controllers of at least two physical displays corresponding to the virtual display timing controller; and the timing of each of the physical display timing controllers is locked.
[0015] In one embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; after generating the virtual display screen, the method further includes:
[0016] Receive a page flipping request for the virtual display sent by the desktop manager;
[0017] Based on the page flipping request, the display area address of each physical display timing controller in the virtual frame buffer is calculated; wherein, the virtual frame buffer is associated with the virtual display timing controller;
[0018] Each physical display timing controller is called to read its corresponding display area address via its page flipping interface, and each physical display timing controller is configured to read data from its corresponding display area address.
[0019] In one embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; after generating the virtual display screen, the method further includes:
[0020] Receive the vertical synchronization count query request for the virtual display sent by the desktop manager;
[0021] According to the vertical synchronization count query request, the vertical synchronization count value of the virtual display timing controller is received; wherein, the vertical synchronization count value is updated synchronously when the physical display timing controller generates a vertical synchronization interruption.
[0022] In one embodiment, the method further includes:
[0023] Verify whether the resolution of each physical display meets a first condition and whether the refresh rate meets a second condition; the first condition includes that the resolution of each physical display is consistent and the sum of the resolutions of all physical displays does not exceed the boundary of the virtual display; the second condition includes that the refresh rate of each physical display is consistent.
[0024] If the display resolution of each physical display meets the first condition and the refresh rate meets the second condition, then the verification is deemed successful. If the verification is successful, the step of switching the working mode of each physical display participating in the splicing to the splicing mode according to the first identifier is executed.
[0025] In one embodiment, the method further includes:
[0026] Receive the second parameter message sent by the splicing application;
[0027] The working mode of each physical display is restored to normal mode, and the first state flag of each physical display is cleared. The virtual display is then marked as the first state flag.
[0028] A second hot-plug event is generated based on the first state flag of the virtual display. The second hot-plug event is used to notify the desktop manager at the user level to perform an operation to set the output state of the virtual display to off based on the first state flag.
[0029] Secondly, this application also provides a display splicing method, applied to a splicing application at the user layer; the method includes:
[0030] Obtain the physical displays connected to the current operating system, and generate a splicing layout template based on each of the physical displays;
[0031] Obtain the splicing parameters corresponding to the splicing operation, and determine the splicing configuration parameters based on the splicing parameters and the splicing layout template;
[0032] The output state of each physical display is set to off, the splicing configuration parameters are converted into a first parameter message, and the first parameter message is sent to the splicing module of the driver layer. The first parameter message is used to instruct the splicing module to enter the splicing mode.
[0033] In one embodiment, the method further includes:
[0034] Obtain the second parameter message and set the output status of the virtual display to off; wherein, the second identifier in the second parameter message represents the normal mode, which is used to notify the splicing module to enter the normal mode; the virtual display is the display formed by splicing together the physical displays;
[0035] The second parameter message is sent to the splicing module through the atomic submission interface.
[0036] In one embodiment, the splicing configuration parameters include the resolution and refresh rate of each of the physical displays; before setting the output state of each of the physical displays to off, the method further includes:
[0037] Verify whether the resolution of each physical display meets a first condition and whether the refresh rate meets a second condition; the first condition includes that the resolution of each physical display is consistent and the sum of the resolutions of all physical displays does not exceed the boundary of the virtual display; the second condition includes that the refresh rate of each physical display is consistent.
[0038] If the resolution of each of the physical displays meets the first condition and the refresh rate meets the second condition, then the verification is deemed successful. If the verification is successful, the steps of setting the output state of each of the physical displays to off and converting the splicing configuration parameters into the first parameter message are executed.
[0039] In one embodiment, generating the splicing layout template according to each of the physical displays includes:
[0040] The splicing layout template is generated by performing at least one of horizontal and vertical splicing on each of the physical displays.
[0041] Thirdly, this application also provides a display splicing device applied to a splicing module in the driving layer; the device includes:
[0042] The first acquisition module is used to acquire a first parameter message sent by the splicing application; wherein the first parameter message includes a first identifier corresponding to the splicing mode and the splicing resolution;
[0043] The switching marker module is used to switch the working mode of each physical display participating in the splicing to the splicing mode according to the first identifier and mark it as the first status marker, and mark the virtual display corresponding to the pre-registered virtual display link as the second status marker; wherein, the first status marker is the status marker that is not connected to the desktop manager; the second status marker is the status marker that is connected to the desktop manager;
[0044] The response sending module is used to generate a first hot-plug event based on the first status flag and the second status flag. The first hot-plug event is used to notify the desktop manager of the user layer. The desktop manager is used to generate and output the spliced display screen according to the first hot-plug event and the splicing resolution.
[0045] Fourthly, this application also provides a display splicing device for use in a user-level splicing application; the device includes:
[0046] The second acquisition module is used to acquire the physical displays connected to the current operating system and generate splicing layout templates according to each of the physical displays;
[0047] The acquisition and determination module is used to acquire the splicing parameters corresponding to the splicing operation, and determine the splicing configuration parameters based on the splicing parameters and the splicing layout template;
[0048] The conversion module is configured to set the output state of each physical display to off, convert the splicing configuration parameters into a first parameter message, and send the first parameter message to the splicing module of the driver layer. The first parameter message is used to instruct the splicing module to enter the splicing mode.
[0049] Fifthly, this application also provides a display splicing system, the system including a splicing application at the user layer and a splicing module at the driver layer;
[0050] The user-layer splicing application is used to obtain physical displays connected to the current operating system and generate splicing layout templates based on each physical display; obtain splicing parameters corresponding to the splicing operation, determine splicing configuration parameters based on the splicing parameters and the splicing layout template; set the output state of each physical display to off, convert the splicing configuration parameters into a first parameter message, and send the first parameter message to the splicing module in the driver layer, wherein the first parameter message is used to instruct the splicing module to enter splicing mode;
[0051] The splicing module of the driver layer is used to obtain a first parameter message sent by the splicing application; wherein, the first parameter message includes a first identifier corresponding to the splicing mode and the splicing resolution;
[0052] Based on the first identifier, the working mode of each physical display participating in the splicing is switched to splicing mode and marked as the first status marker, and the virtual display corresponding to the pre-registered virtual display link is marked as the second status marker; wherein, the first status marker is the status marker that is not connected to the desktop manager; the second status marker is the status marker that is connected to the desktop manager;
[0053] Based on the first state flag and the second state flag, a first hot-plug event is generated, which is used to notify the desktop manager of the user layer; the desktop manager is used to generate and output the spliced display screen according to the first hot-plug event and the splicing resolution.
[0054] Sixthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0055] In a seventh aspect, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0056] Eighthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0057] The aforementioned display splicing method, apparatus, computer equipment, computer-readable storage medium, and computer program product first obtain a first parameter message sent by the splicing application; wherein the first parameter message includes a first identifier corresponding to the splicing mode and the splicing resolution; secondly, according to the first identifier, the working mode of each physical display participating in the splicing is switched to the splicing mode and marked as a first status mark, and the virtual display corresponding to the pre-registered virtual display link is marked as a second status mark; wherein the first status mark is a status mark of not being connected to the desktop manager; the second status mark is a status mark of being connected to the desktop manager; when entering the splicing mode, the physical display is marked as not connected to the desktop manager, at which time the desktop manager ignores the physical display and no longer manages the physical display, only managing the connected virtual display; this can prevent the physical display from damaging the splicing effect of the virtual display. Finally, based on the first and second state flags, a first hot-plug event is generated, which is used to notify the desktop manager at the user layer. The desktop manager generates and outputs the spliced virtual display screen according to the first hot-plug event and the splicing resolution. During the process of the desktop manager generating the virtual display screen, each physical display responds to the desktop manager's operation request to call the virtual display. After reading the state flags, the desktop manager no longer manages the physical displays, but only the connected virtual displays. The operation requests executed by the desktop manager on the virtual displays are converted by the splicing module into operations implemented through each physical display. The desktop manager only needs to read information and send requests normally; no additional modifications to the desktop manager are required to achieve stable and universal display splicing. Attached Figure Description
[0058] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1 This is a flowchart illustrating a display splicing method applied to a splicing module in the terminal driver layer in one embodiment.
[0060] Figure 2 A simplified flowchart of a Linux application is shown in one embodiment;
[0061] Figure 3 This is a schematic diagram of the hardware unit of the physical display in one embodiment;
[0062] Figure 4This is a schematic diagram illustrating the splicing resolution setting in one embodiment.
[0063] Figure 5 This is a schematic diagram illustrating the flipping of a spliced screen page in one embodiment;
[0064] Figure 6 This is a flowchart illustrating a display splicing method for a splicing application applied to the end-user layer in one embodiment.
[0065] Figure 7 This is a schematic diagram of the splicing of the physical displays in one embodiment;
[0066] Figure 8 This is a structural block diagram of a display splicing device applied to the splicing module of the driving layer in one embodiment;
[0067] Figure 9 This is a structural block diagram of a display splicing device applied to a splicing application in the user layer, as shown in one embodiment.
[0068] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0069] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0070] In one embodiment, such as Figure 1 As shown, a display splicing method is provided. This embodiment illustrates the application of this method to the splicing module of the terminal driver layer. It is understood that this method can also be applied to a server, and to a system including both a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps S102 to S106. Wherein:
[0071] Step S102: Obtain the first parameter message sent by the splicing application.
[0072] The first parameter message includes a first identifier corresponding to the splicing mode and a splicing resolution; the splicing resolution is the resolution of the virtual display screen after splicing.
[0073] Figure 2This document describes a simplified process for a stitching application in a Linux system to display images on a monitor. The stitching application, acting as an X client, sends requests to the X server via the Xlib library, such as creating windows and drawing graphics, to construct the graphical interface. The X server calls the Kernel Mode Setting (KMS) interface to interact with the GPU driver, ultimately transmitting the content drawn by the stitching application to the monitor for display output via the GPU hardware. The stitching module in the driver layer is then used... Figure 2 The GPU driver is located in the Kernel Mode (also known as the driver layer). KMS (Kernel Mode Setting) is the standard framework in the Linux kernel for managing display output. KMS controls the graphics card's display output path, abstracting kernel objects such as CRTC (Timing Controller), Encoder, Connector, and Plane, and providing unified interfaces (such as atomic and property) for user-space programs (such as X Server and Wayland compositor) to call.
[0074] In traditional methods, the X server, acting as a graphical server within a Linux system, manages display devices and input / output, providing basic graphics functionality that enables various graphical user interface applications to run on different hardware platforms. Regarding monitor splicing, the X server's virtual monitor feature allows multiple monitors to be combined into a single virtual display; this splicing is implemented at the user level. However, because this functionality involves system-level modifications, it requires window manager support. Due to differences between operating systems, numerous compatibility issues arise in practical applications, and stability is also compromised.
[0075] The method proposed in this application differs from traditional user-layer splicing schemes. The core splicing function is completed by the driver layer, which does not require additional support from the desktop manager. It is compatible with all Linux kernel-based desktop systems and is a universal splicing solution under Linux systems.
[0076] Optionally, the splicing application obtains the physical displays connected under the current operating system, such as Linux, and generates a splicing layout template based on the number of physical displays and the resolution of each physical display. The splicing application converts the splicing configuration parameters into first parameter messages supported by the splicing module in the driver layer, and updates the splicing module with the first parameter messages.
[0077] The splicing module receives the first parameter message sent by the splicing application, reads the first identifier in the first parameter message, and determines whether the current working mode is splicing mode or exiting splicing mode (i.e., normal mode) based on the first identifier. The splicing resolution is the resolution of the virtual display screen after splicing, defined by the user in the splicing application.
[0078] Step S104: Based on the first identifier, switch the working mode of each physical display participating in the splicing to the splicing mode and mark it as the first status mark, and mark the virtual display corresponding to the pre-registered virtual display link as the second status mark.
[0079] The first status flag indicates that the device is not connected to the desktop manager; the second status flag indicates that the device is connected to the desktop manager.
[0080] Optionally, since the first identifier corresponds to the splicing mode, the splicing module determines that the current working mode is the splicing mode based on the first identifier corresponding to the splicing mode; switches the working mode of each physical display participating in the splicing to the splicing mode and marks it as the first status mark, thereby disconnecting the connection with the desktop manager; the splicing module also marks the virtual display corresponding to the pre-registered virtual display link as the second status mark, so as to realize the connection between the virtual display and the desktop manager.
[0081] Step S106: Based on the first state flag and the second state flag, a first hot-plug event is generated. The first hot-plug event is used to notify the desktop manager of the user layer. The desktop manager is used to generate and output the spliced virtual display screen according to the first hot-plug event and the splicing resolution. During the process of the desktop manager generating the virtual display screen, each physical monitor responds to the desktop manager's operation request to call the virtual monitor.
[0082] Optionally, after completing the settings based on the first marked state of each participating physical display and the second marked state of the virtual display, the splicing module generates a first hot-plug event. The splicing module sends the first hot-plug event to the desktop manager to notify the user-level desktop manager to detect the connection status of each physical display and the virtual display. When the desktop manager performs the detection, it will detect that the virtual display is connected and perform the operation of turning on the output status of the virtual display; if the physical displays are not connected, it will perform the operation of turning off the output status of each physical display.
[0083] Once the desktop manager successfully sets the resolution of the virtual monitor according to the splicing resolution, it can normally call the graphics library's interface for output.
[0084] During the process of generating a virtual display screen by the desktop manager, the splicing mode involves each physical monitor responding to the desktop manager's requests to call the virtual monitor. These requests include things like querying the status of the virtual monitor or setting its resolution. Since the virtual monitor does not have a real physical link and cannot read data like other physical monitors, the requests to the virtual monitor are translated into responses executed by the physical monitors associated with and registered with it.
[0085] In the above display splicing method, firstly, a first parameter message sent by the splicing application is obtained; wherein the first parameter message includes a first identifier corresponding to the splicing mode and the splicing resolution; secondly, the working mode of each physical display participating in the splicing is switched to splicing mode according to the first identifier and marked as a first status mark, and the virtual display corresponding to the pre-registered virtual display link is marked as a second status mark; wherein the first status mark is a status mark not connected to the desktop manager; the second status mark is a status mark connected to the desktop manager; when entering the splicing mode, the physical display is marked as not connected to the desktop manager, at which time the desktop manager ignores the physical display and no longer manages the physical display, only managing the connected virtual display; this can avoid the physical display from damaging the splicing effect of the virtual display. Finally, based on the first status mark and the second status mark, a first hot-plug event is generated, the first hot-plug event is used to notify the desktop manager at the user layer; the desktop manager is used to generate and output the spliced virtual display screen according to the first hot-plug event and the splicing resolution; wherein, during the process of the desktop manager generating the virtual display screen, each of the physical displays responds to the desktop manager's operation request to call the virtual display. After reading the status flags, the desktop manager no longer manages the physical displays, but only the connected virtual displays. All operation requests made by the desktop manager to the virtual displays are translated by the splicing module into operations implemented through each physical display. The desktop manager only needs to read information and send requests normally; no additional modifications to the desktop manager are required to achieve stable and universal display splicing.
[0086] In an exemplary embodiment, before obtaining the first parameter message sent by the splicing application, the method further includes: obtaining all physical displays connected to the current operating system, associating the physical display links of each physical display with the virtual display links corresponding to the virtual displays, and completing the registration of the virtual display links.
[0087] Among them, the virtual display corresponding to the completed virtual display link is marked as the first state mark.
[0088] Both virtual display links and physical display links are as follows Figure 3As shown, it may include a display timing controller (CRTC), an encoder, a display connector, and a display plane.
[0089] Optionally, when the splicing module is loaded by the display driver, it creates virtual CRTC, virtual Encoder, virtual Plane, and virtual Connector members used in the splicing virtual display link through the KMS interface. The virtual CRTC, virtual Encoder, virtual Plane, and virtual Connector members constitute the virtual display link.
[0090] The splicing module maintains a list of physical display links, including available physical CRTCs, physical encoders, physical planes, and physical connectors for each physical monitor. It maps and associates virtual display links with physical display links, completing the registration of the virtual links. When the user selects which physical monitors will participate in the splicing, the splicing module can select the corresponding physical components from this list to work with the virtual display links. During splicing, there's no need to temporarily create or destroy CRTCs or other objects; only the connection status needs to be modified. It's important to note that the virtual monitor corresponding to a newly registered virtual display link is marked as being in the first state, meaning it's not connected to the desktop manager.
[0091] In this embodiment, since none of the components in the virtual display link have actual physical hardware, all operations that call the virtual display components are converted and mapped to the real display link. By registering the virtual display link for the spliced display output, it becomes identical to the real physical display link, thereby achieving stable display splicing.
[0092] In an exemplary embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; the operation request includes a setting request for the virtual display; responding to the operation request from the desktop manager to call the virtual display through each physical display includes: receiving the setting request for the virtual display sent by the desktop manager; splitting the splicing resolution into at least two resolutions according to the setting request; applying the at least two resolutions to the physical display timing controllers of at least two physical displays corresponding to the virtual display timing controller; and locking the timing of each physical display timing controller.
[0093] like Figure 3 As shown, the virtual display link includes at least a Virtual Display Timing Controller (CRTC); the physical display link includes at least a Physical Display Timing Controller (CRTC). Operation requests may include requests to query the status of the virtual display and requests to set the resolution of the virtual display.
[0094] Optionally, during the process of generating the virtual display screen by the desktop manager, the desktop manager queries the connection status of the virtual monitors; a status query request for the virtual monitors is sent to the splicing module, which queries the physical components corresponding to the virtual display links of the virtual monitors, such as the Physical Display Timing Controller (CRTC), based on the registered virtual display links. If the virtual display timing controllers (CRTCs) in the virtual display links correspond to the physical display timing controllers (CRTCs) of physical monitor A and physical monitor B respectively, the splicing module returns the connection status of the physical display timing controllers (CRTCs) of physical monitor A and physical monitor B to the desktop manager.
[0095] Optionally, during the process of generating the virtual display screen, the desktop manager sends a request to set the resolution of the virtual monitor. The splicing module receives the sent request to set the resolution of the virtual monitor. Figure 4 As shown, the splicing resolution is resolution A, corresponding to a virtual display timing controller. The intermediate layer includes registered virtual display links. Based on the relationship between the registered virtual display links and physical display links, the physical display timing controllers 1 and 2 corresponding to the virtual display timing controller can be determined. The resolution corresponding to physical display timing controller 1 is B, and the resolution corresponding to physical display timing controller 2 is C. Resolutions B and C are split based on the splicing resolution. After each resolution is applied to its respective physical display timing controller, GPU Vsync Lock (vertical synchronization locking technology) is used to lock the timing of each physical display timing controller. This ensures that the source displays participating in the splicing process can refresh synchronously, preventing tearing.
[0096] Figure 4 This diagram illustrates how the splicing module in the driver layer operates the CRTC hardware in the physical display link when the application layer sets the splicing resolution for the virtual splicing display in a two-monitor setup. The CRTC hardware generates timing information and vblank signals based on the set display resolution to synchronize the display output. The Splice CRTC (virtual splicing CRTC) in the virtual display link splits the splicing resolution A set by the upper layer into B and C through an intermediate layer, and then applies resolutions B and C to CRTC1 and CRTC2 in the two physical display links of the system, respectively. When CRTC1 and CRTC2 are working, the hardware-supported Vsync Lock function is enabled, ensuring that the timing they generate is almost identical. The vblank signals are triggered synchronously, causing the images displayed on both outputs to refresh synchronously, preventing tearing issues.
[0097] In this embodiment, by converting the resolution setting operation of the virtual display into an operation of the physical display, and locking the timing of each physical display timing controller, it can be ensured that the source displays participating in the splicing can refresh synchronously during the splicing process, without causing the problem of tearing, thus improving the stability of the display splicing.
[0098] In an exemplary embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; after generating the virtual display screen, the method further includes: receiving a page flipping request for the virtual display sent by the desktop manager; calculating the display area address of each physical display timing controller in the virtual frame buffer according to the page flipping request; wherein the virtual frame buffer is associated with the virtual display timing controller; respectively calling the page flipping interface of each physical display timing controller to read its corresponding display area address, and configuring each physical display timing controller to read data from the corresponding display area address.
[0099] Optionally, after the virtual display screen is generated, that is, during the virtual reality screen's running phase, a page flipping request for the virtual display sent by the desktop manager is received. Figure 5 This demonstration shows how to output the displayed image to the two physical displays involved in the splicing process when using a two-monitor setup. The desktop manager allocates a frame buffer (FB) with the same resolution and size as the virtual splicing displays. During the page flipping (Flip) process to the Splice CTc, this FB is broken down into two sub-blocks, Area A and Area B, which are then output to their respective physical display links, CTc A and CTc B. The splicing module calculates the respective display addresses based on the set resolution, position, and size parameters, and configures each physical display timing controller to simultaneously fetch data from both display area addresses, achieving synchronized splicing output.
[0100] It should be noted that the number of physical display timing controllers is not limited to 2; it can also be other numbers.
[0101] In this embodiment, splicing synchronization can be achieved by splitting the address of the virtual frame buffer.
[0102] In an exemplary embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; after generating the virtual display screen, the method further includes: receiving a vertical synchronization count query request for the virtual display sent by the desktop manager; and returning the vertical synchronization count value of the virtual display timing controller according to the vertical synchronization count query request.
[0103] The vertical synchronization count value is updated synchronously when the physical display timing controller generates a vertical synchronization interrupt.
[0104] Optionally, the splicing module receives a vertical synchronization count query request for the virtual display sent by the desktop manager, for example, through drmWaitVBlank or by reading the vblank_count attribute. The splicing module reads the vertical synchronization count value from the virtual display timing controller and returns the vertical synchronization count value to the desktop manager.
[0105] The vertical synchronization counter value of the virtual display timing controller is not generated by the virtual display, but is updated synchronously when the physical display timing controller generates a vertical synchronization interruption. Specifically: when one or more physical CRTCs participating in the splicing generate a vertical synchronization (vblank) interruption, the interrupt handler of the splicing module will determine whether the current system is in splicing mode and whether the physical CRTC belongs to the current splicing group; if so, it will increment the internal vertical synchronization counter of the virtual CRTC corresponding to the splicing group by 1 (or update it to the latest value); when the desktop manager subsequently queries the vertical synchronization count of the virtual CRTC, it will obtain this simulated count value.
[0106] Since the vertical synchronization period of a physical CRTC is stable (e.g., approximately 16.67ms for 60Hz), and multiple physical CRTCs are time-locked through the GPU's Vsync Lock function, interrupts to physical CRTCs are generated synchronously. The counters of virtual CRTCs can therefore increment at the same stable frequency, simulating a continuous vertical synchronization signal consistent with the physical refresh rate.
[0107] In this embodiment, the vertical synchronization counter of the virtual display timing controller is updated synchronously by borrowing the vertical synchronization interrupt of the physical display timing controller, so that the virtual display link without real hardware can also provide the desktop manager with a vertical synchronization time reference consistent with the physical display.
[0108] In an exemplary embodiment, the method further includes: verifying whether the resolution of each physical display meets a first condition and whether the refresh rate meets a second condition; if the display resolution of each physical display meets the first condition and the refresh rate meets the second condition, then the verification is deemed to have passed; if the verification passes, the method executes the step of switching the working mode of each physical display participating in the splicing to the splicing mode according to the first identifier.
[0109] The first condition includes that all physical displays have the same resolution and that the sum of the resolutions of all physical displays does not exceed the boundaries of the virtual display; the second condition includes that all physical displays have the same refresh rate.
[0110] Optionally, the splicing module obtains a first parameter message, which also includes the resolution and refresh rate of each physical display. To ensure the robustness of the splicing module operating at the driver layer, all user-defined first parameter messages are re-checked. For example, the display resolution settings of the physical displays participating in the splicing must be consistent, and the position information plus the resolution of the physical displays cannot exceed the splicing resolution of the virtual displays. If these checks fail, the current processing program exits. For instance, if physical display A participating in the splicing disconnects after the first parameter message is sent to the splicing module, and the splicing module does not perform a check, errors will occur because physical display A's parameters exist, but physical display A is not connected.
[0111] Optionally, the splicing module detects whether the resolution of each physical display is consistent, whether the sum of the resolutions of all physical displays participating in the splicing does not exceed the boundary of the virtual display, and whether the refresh rate of each physical display is consistent. If all these tests are passed, the verification is deemed successful. If the verification is successful, the module executes the step of switching the working mode of each physical display participating in the splicing to the splicing mode according to the first identifier.
[0112] In this embodiment, by detecting the user-defined first parameter message, the accuracy of the parameters obtained by the splicing module can be ensured.
[0113] In an exemplary embodiment, the method further includes: receiving a second parameter message sent by a splicing application; restoring the working mode of each physical display to normal mode according to the second parameter message, clearing the first status mark of each physical display, and marking the virtual display as the first status mark; generating a second hot-plug event according to the first status mark of the virtual display, and setting the output state of the virtual display to off.
[0114] The second hot-plug event is used to notify the user-level desktop manager to execute according to the first state flag. The second parameter message is a user-configured parameter message for entering normal mode. Similarly, the first parameter message is a user-defined parameter message for entering splicing mode. The second parameter message includes a second identifier corresponding to normal mode.
[0115] Optionally, the splicing module receives a second parameter message sent by the splicing application; based on the second identifier in the second parameter message, it restores the working mode of each physical display participating in the splicing to normal mode, clears the previous first state flag (disconnected from the desktop manager) of each physical display, and marks the virtual display as the first state flag, that is, disconnects the virtual display from the desktop manager. In this way, the desktop manager only manages the physical displays and not the virtual displays. After completing these settings, a second hotplug event is sent to the desktop manager, which will re-detect the connection status of the displays in the current operating system, including the virtual displays. For unconnected virtual displays, the desktop manager will set the output status of the virtual displays to off, while the physical displays participating in the splicing, which can be detected in normal mode, will have their output status set to on.
[0116] In this embodiment, by clearing the first status flag of the physical display and configuring the first status flag of the virtual display, each physical display can exit the splicing mode and enter the normal mode.
[0117] In one exemplary embodiment, such as Figure 6 As shown, a display splicing method is provided. Taking the application of this method to a splicing application at the user layer as an example, the method includes the following steps S602 to S606. Wherein:
[0118] Step S602: Obtain the physical monitors connected to the current operating system, and generate splicing layout templates based on each physical monitor.
[0119] The current operating system can be Linux.
[0120] Optionally, the user-level splicing application obtains the currently connected physical displays in the system through the x11 library, acquiring the resolution of each physical display and attributes such as the name of each physical display. Based on the number of physical displays obtained, the splicing application generates a splicing layout template. For example, if the current operating system recognizes two physical displays, a splicing layout template can be generated using a 2x1 (horizontal splicing) or 1x2 (vertical splicing) splicing method.
[0121] Step S604: Obtain the splicing parameters corresponding to the splicing operation, and determine the splicing configuration parameters based on the splicing parameters and the splicing layout template.
[0122] Optionally, physical displays are represented by widgets with display names in the splicing application interface. Users can simply drag and drop the physical displays participating in the splicing into the splicing layout template to generate splicing configuration parameters, such as the position of the virtual displays, the splicing resolution, and the resolution and refresh rate of all physical displays participating in the splicing.
[0123] Step S606: Set the output status of each physical display to off, convert the splicing configuration parameters into a first parameter message, and send the first parameter message to the splicing module of the driver layer.
[0124] The first parameter message is used to instruct the splicing module to enter splicing mode.
[0125] After all splicing configuration parameters are set, the splicing application notifies the driver layer to enter or exit splicing mode. Entering splicing mode involves switching the working mode of the physical displays in the splicing physical display chain from normal mode to splicing mode, and forcibly changing their status from connected to disconnected, meaning the physical displays are marked as the first state. The desktop manager actively shuts down unconnected displays, while for connected virtual displays, they are turned on and the splicing resolution is set. This process performs the resolution setting operation for the physical displays in the physical display chain. Because the desktop manager cannot guarantee the timing of shutting down physical displays and turning on virtual displays, there is a possibility that the physical displays in the physical display chain may experience a black screen when entering splicing mode. To solve this problem, the splicing application first sets the output status of each physical display to off, such as by calling an interface in the x11 library to shut down all participating displays. Then, the splicing application notifies the driver layer to enter splicing mode. Since the physical displays are already off, the desktop manager will not perform the shutdown operation on the physical displays again.
[0126] The above-mentioned display splicing method in the user-layer splicing application first obtains the physical displays connected to the current operating system and generates a splicing layout template based on each physical display. Second, it obtains the splicing parameters corresponding to the user's splicing operation and determines the splicing configuration parameters based on the splicing parameters and the splicing layout template. Finally, it sets the output state of each physical display to "off," converts the splicing configuration parameters into a first parameter message, and sends the first parameter message to the splicing module in the driver layer. The first parameter message is used to instruct the splicing module to enter splicing mode. On the one hand, the splicing application provides a simple and easy-to-use interface, eliminating the need for command lines or configuration files; users can directly customize the splicing by dragging and dropping displays. On the other hand, by first setting the output state of each physical display to "off," and then notifying the driver layer to enter splicing mode, the desktop manager will not perform the "off" operation again, ensuring that the physical displays in the physical display chain do not experience a black screen when entering splicing mode.
[0127] In one exemplary embodiment, the method further includes: obtaining a second parameter message and setting the output state of the virtual display to off; sending the second parameter message to the splicing module via an atomic submission interface.
[0128] The second identifier in the second parameter message indicates the normal mode and is used to notify the splicing module to enter the normal mode; the virtual display is the display completed by splicing together the physical displays.
[0129] Optionally, the splicing application generates exit splicing parameters based on the user's exit splicing operation; these exit splicing parameters are converted into a Connector property, which is the second parameter message supported by the splicing module. A similar issue exists when exiting splicing mode: before notifying the driver layer, the splicing application needs to shut down the virtual display, i.e., set the virtual display's output state to off. This prevents the desktop manager from shutting down the virtual display again when the physical display in the physical display link switches back from splicing mode to normal mode, causing the physical display to fail to power on. Afterward, the second parameter message is sent to the splicing module via the atomic commit interface.
[0130] In this embodiment, by first turning off the virtual display, the problem of the physical display failing to light up can be avoided when entering normal mode.
[0131] In an exemplary embodiment, the splicing configuration parameters include the resolution and refresh rate of each physical display; before setting the output state of each physical display to off, the method further includes: verifying whether the resolution of each physical display meets a first condition and whether the refresh rate meets a second condition; if the resolution of each physical display meets the first condition and the refresh rate meets the second condition, the verification is deemed to have passed; if the verification passes, the method of setting the output state of each physical display to off and converting the splicing configuration parameters into a first parameter message is executed.
[0132] The first condition includes that all physical displays have the same resolution and that the sum of the resolutions of all physical displays does not exceed the boundaries of the virtual display; the second condition includes that all physical displays have the same refresh rate.
[0133] Optionally, the splicing application obtains the first parameter message, which also includes the resolution, refresh rate, and position of each physical display. All user-defined first parameter messages are checked by the splicing application. For example, the display resolution settings of the physical displays participating in the splicing must be consistent, and the position information of the physical displays plus their resolution size cannot exceed the splicing resolution size of the virtual displays. If these checks fail, it indicates that there is a problem with the parameters, and a dialog box will prompt the user to make changes.
[0134] Optionally, the splicing application checks whether the resolution of each physical display is consistent, whether the sum of the resolutions of all participating physical displays does not exceed the boundaries of the virtual display, and whether the refresh rate of each physical display is consistent. If all these checks pass, the verification is considered successful. Only if the verification passes can the driver layer be notified to enter splicing mode. The splicing application then executes the steps of setting the output status of each physical display to off and converting the splicing configuration parameters into the first parameter message.
[0135] In this embodiment, the correctness of user-defined parameters can be determined through verification. If incorrect, they can be corrected promptly.
[0136] In one exemplary embodiment, generating a splicing layout template based on each physical display includes: performing at least one of horizontal splicing and vertical splicing on each physical display to generate a splicing layout template.
[0137] Alternatively, multiple physical displays can be arranged from left to right, such as... Figure 7As shown, each monitor displays a continuous horizontal area of the virtual display screen. For example, when two physical monitors with a resolution of 1920×1080 are horizontally spliced together, the total resolution of the virtual display is 3840×1080. The left monitor displays pixels from column 0 to 1919, and the right monitor displays pixels from column 1920 to 3839.
[0138] Optionally, multiple physical displays can be arranged from top to bottom, with each display showing a continuous vertical area of the virtual display screen. For example, after two physical displays with a resolution of 1920×1080 are vertically spliced together, the total resolution of the virtual display is 1920×2160, with the upper display showing rows 0 to 1079 and the lower display showing rows 1080 to 2159.
[0139] Optionally, when the number of physical displays is greater than two, both horizontal and vertical splicing can be used to form a multi-row, multi-column splicing layout. For example, four displays with a resolution of 1920×1080 can be arranged in a 2×2 matrix, with a total virtual display resolution of 3840×2160.
[0140] In this embodiment, by providing layout templates for horizontal, vertical, and mixed splicing, users can flexibly choose the splicing mode according to the actual arrangement of physical displays, meeting the display needs of different application scenarios (such as ultra-wide gaming screens, large data monitoring walls, multi-screen offices, etc.). Simultaneously, the splicing application can automatically identify the layout type and calculate resolution parameters based on the drag position, eliminating the need for users to manually input coordinates and greatly reducing the configuration threshold.
[0141] In an exemplary embodiment, a display splicing system includes a user-layer splicing application and a driver-layer splicing module. The user-layer splicing application is used to acquire physical displays connected to the current operating system and generate splicing layout templates based on each physical display; acquire splicing parameters corresponding to splicing operations; determine splicing configuration parameters based on the splicing parameters and the splicing layout templates; set the output state of each physical display to off; convert the splicing configuration parameters into a first parameter message; and send the first parameter message to the driver-layer splicing module, wherein the first parameter message is used to instruct the splicing module to enter splicing mode.
[0142] The splicing module in the driver layer is used to obtain a first parameter message sent by the splicing application; wherein the first parameter message includes a first identifier corresponding to the splicing mode and the splicing resolution; according to the first identifier, the working mode of each physical display participating in the splicing is switched to the splicing mode and marked as a first status mark, and the virtual display corresponding to the pre-registered virtual display link is marked as a second status mark; wherein the first status mark is a status mark not connected to the desktop manager; the second status mark is a status mark connected to the desktop manager; based on the first status mark and the second status mark, a first hot-plug event is generated, which is used to notify the desktop manager in the user layer; the desktop manager is used to generate and output the spliced virtual display screen according to the first hot-plug event and the splicing resolution; wherein, during the process of the desktop manager generating the virtual display screen, each physical display responds to the desktop manager's operation request to call the virtual display.
[0143] In an exemplary embodiment, the splicing application is further configured to obtain a second parameter message and set the output state of the virtual display to off; wherein, the second identifier in the second parameter message represents the normal mode and is used to notify the splicing module to enter the normal mode; the virtual display is the display formed by splicing together the physical displays; and the second parameter message is sent to the splicing module through the atomic submission interface.
[0144] In an exemplary embodiment, the splicing application is further configured to verify whether the resolution of each physical display meets a first condition and whether the refresh rate meets a second condition; the first condition includes that the resolution of each physical display is consistent and the sum of the resolutions of all physical displays does not exceed the boundary of the virtual display; the second condition includes that the refresh rates of each physical display are consistent; if the resolution of each physical display meets the first condition and the refresh rate meets the second condition, the verification is deemed successful, and if the verification is successful, the steps of setting the output status of each physical display to off and converting the splicing configuration parameters into a first parameter message are executed.
[0145] In one exemplary embodiment, the splicing application is also used to perform at least one of horizontal and vertical splicing on the various physical displays to generate a splicing layout template.
[0146] In an exemplary embodiment, the splicing module is further configured to acquire all physical displays connected to the current operating system, associate the physical display links of each physical display with the virtual display links corresponding to the virtual displays, and complete the registration of the virtual display links; wherein, the virtual displays corresponding to the virtual display links that have completed registration are marked as the first status flag.
[0147] In an exemplary embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; the operation request includes a setting request for the virtual display; the splicing module is further configured to receive the setting request for the virtual display sent by the desktop manager; split the splicing resolution into at least two resolutions according to the setting request; apply the at least two resolutions to the physical display timing controllers of at least two physical displays corresponding to the virtual display timing controllers; and lock the timing of each physical display timing controller.
[0148] In an exemplary embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; the splicing module is further configured to receive a page flipping request for the virtual display sent by the desktop manager; calculate the display area address of each physical display timing controller in the virtual frame buffer according to the page flipping request; wherein the virtual frame buffer is associated with the virtual display timing controller; respectively call the page flipping interface of each physical display timing controller to read its corresponding display area address, and configure each physical display timing controller to read data from the corresponding display area address.
[0149] In an exemplary embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; the splicing module is further configured to receive a vertical synchronization count query request for the virtual display sent by the desktop manager; and receive the vertical synchronization count value of the virtual display timing controller according to the vertical synchronization count query request; wherein the vertical synchronization count value is updated synchronously when the physical display timing controller generates a vertical synchronization interruption.
[0150] In an exemplary embodiment, the splicing module is further configured to verify whether the resolution of each physical display meets a first condition and whether the refresh rate meets a second condition; the first condition includes that the resolution of each physical display is consistent and the sum of the resolutions of all physical displays does not exceed the boundary of the virtual display; the second condition includes that the refresh rates of each physical display are consistent; if the display resolution of each physical display meets the first condition and the refresh rate meets the second condition, it is determined that the verification has passed, and if the verification passes, the step of switching the working mode of each physical display participating in the splicing to the splicing mode according to the first identifier is executed.
[0151] In an exemplary embodiment, the splicing module is further configured to receive a second parameter message sent by the splicing application; restore the working mode of each physical display to the normal mode according to the second parameter message, and clear the first status mark of each physical display, and mark the virtual display as the first status mark; generate a second hot-plug event according to the first status mark of the virtual display, the second hot-plug event being used to notify the desktop manager of the user layer to perform the operation of setting the output status of the virtual display to off according to the first status mark.
[0152] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0153] Based on the same inventive concept, this application also provides a display splicing device for implementing the display splicing method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more display splicing device embodiments provided below can be found in the limitations of the display splicing method described above, and will not be repeated here.
[0154] In one exemplary embodiment, such as Figure 8 As shown, a display splicing device is provided, applied to the splicing module of the driving layer; it includes: a first acquisition module 801, a switching marker module 802, and a sending response module 803, wherein:
[0155] The first acquisition module 801 is used to acquire a first parameter message sent by the splicing application; wherein the first parameter message includes a first identifier corresponding to the splicing mode and the splicing resolution.
[0156] The switching marker module 802 is used to switch the working mode of each physical display participating in the splicing to the splicing mode according to the first identifier and mark it as the first status marker, and mark the virtual display corresponding to the pre-registered virtual display link as the second status marker; wherein, the first status marker is the status marker that is not connected to the desktop manager; the second status marker is the status marker that is connected to the desktop manager.
[0157] The sending response module 803 is used to generate a first hot-plug event based on a first state flag and a second state flag. The first hot-plug event is used to notify the desktop manager of the user layer. The desktop manager is used to generate and output the spliced virtual display screen according to the first hot-plug event and the splicing resolution. In the process of the desktop manager generating the virtual display screen, each of the physical displays responds to the desktop manager's operation request to call the virtual display.
[0158] In an exemplary embodiment, the display splicing device applied to the splicing module of the driver layer further includes: a registration module, configured to acquire all physical displays connected to the current operating system, associate the physical display links of each physical display with the virtual display links corresponding to the virtual displays, and complete the registration of the virtual display links; wherein, the virtual displays corresponding to the virtual display links that have completed registration are marked as the first status marker.
[0159] In an exemplary embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; the operation request includes a setting request for the virtual display; the sending response module 803 is further configured to receive the setting request for the virtual display sent by the desktop manager; split the splicing resolution into at least two resolutions according to the setting request; apply the at least two resolutions to the physical display timing controllers of at least two physical displays corresponding to the virtual display timing controller; and lock the timing of each physical display timing controller.
[0160] In an exemplary embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; the display splicing device applied to the splicing module of the driver layer further includes: a first response module, configured to receive a page flipping request for the virtual display sent by the desktop manager; calculate the display area address of each physical display timing controller in the virtual frame buffer according to the page flipping request; wherein the virtual frame buffer is associated with the virtual display timing controller; respectively call the page flipping interface of each physical display timing controller to read its corresponding display area address, and configure each physical display timing controller to read data from the corresponding display area address.
[0161] In an exemplary embodiment, the virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; the display splicing device applied to the splicing module of the driver layer further includes: a second response module, configured to receive a vertical synchronization count query request for the virtual display sent by the desktop manager; and receive the vertical synchronization count value of the virtual display timing controller according to the vertical synchronization count query request; wherein the vertical synchronization count value is updated synchronously when the physical display timing controller generates a vertical synchronization interruption.
[0162] In an exemplary embodiment, the display splicing device applied to the splicing module of the driving layer further includes: a first verification module, used to verify whether the resolution of each physical display meets a first condition and whether the refresh rate meets a second condition; the first condition includes that the resolution of each physical display is consistent and the sum of the resolutions of all physical displays does not exceed the boundary of the virtual display; the second condition includes that the refresh rates of each physical display are consistent; if the display resolution of each physical display meets the first condition and the refresh rate meets the second condition, it is determined that the verification is passed, and if the verification is passed, the step of switching the working mode of each physical display participating in the splicing to the splicing mode according to the first identifier is executed.
[0163] In an exemplary embodiment, the display splicing device applied to the splicing module of the driver layer further includes: a first exit splicing module, configured to receive a second parameter message sent by the splicing application; restore the working mode of each physical display to the normal mode according to the second parameter message, and clear the first status mark of each physical display, and mark the virtual display as the first status mark; generate a second hot-plug event according to the first status mark of the virtual display, the second hot-plug event being used to notify the desktop manager of the user layer to perform the operation of setting the output status of the virtual display to off according to the first status mark.
[0164] In one exemplary embodiment, such as Figure 9 As shown, a display splicing device is provided for use in a user-level splicing application; it includes: a second acquisition module 901, an acquisition determination module 902, and a setting conversion module 903;
[0165] The second acquisition module 901 is used to acquire the physical displays connected to the current operating system and generate splicing layout templates based on each physical display.
[0166] The acquisition module 902 is used to acquire the splicing parameters corresponding to the splicing operation, and determine the splicing configuration parameters based on the splicing parameters and the splicing layout template.
[0167] The conversion module 903 is configured to set the output status of each physical display to off, convert the splicing configuration parameters into a first parameter message, and send the first parameter message to the splicing module in the driver layer. The first parameter message is used to instruct the splicing module to enter the splicing mode.
[0168] In an exemplary embodiment, a display splicing device for a splicing application applied to the user layer includes: a first exit splicing module, configured to acquire a second parameter message and set the output state of the virtual display to off; wherein, the second identifier in the second parameter message represents a normal mode and is used to notify the splicing module to enter the normal mode; the virtual display is a display formed by splicing together the various physical displays; and the second parameter message is sent to the splicing module through an atomic submission interface.
[0169] In an exemplary embodiment, the splicing configuration parameters include the resolution and refresh rate of each physical display; the display splicing device applied to the splicing application at the user layer further includes: a second verification module, used to verify whether the resolution of each physical display meets a first condition and whether the refresh rate meets a second condition; the first condition includes that the resolution of each physical display is consistent and the sum of the resolutions of all physical displays does not exceed the boundary of the virtual display; the second condition includes that the refresh rates of each physical display are consistent; if the resolution of each physical display meets the first condition and the refresh rate meets the second condition, it is determined that the verification is passed, and if the verification is passed, the steps of setting the output state of each physical display to off and converting the splicing configuration parameters into a first parameter message are executed.
[0170] In an exemplary embodiment, the second acquisition module 901 is further configured to perform at least one of horizontal and vertical splicing on each physical display to generate a splicing layout template.
[0171] Each module in the aforementioned display splicing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0172] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores splicing display data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a display splicing method.
[0173] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0174] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0175] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0176] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0177] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0178] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0179] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A display splicing method, characterized in that, The splicing module applied to the driver layer; the method includes: Obtain the first parameter message sent by the splicing application; wherein the first parameter message includes a first identifier corresponding to the splicing mode and the splicing resolution; Based on the first identifier, the working mode of each physical display participating in the splicing is switched to splicing mode and marked as the first status marker, and the virtual display corresponding to the pre-registered virtual display link is marked as the second status marker; wherein, the first status marker is the status marker that is not connected to the desktop manager; the second status marker is the status marker that is connected to the desktop manager; Based on the first state flag and the second state flag, a first hot-plug event is generated, which is used to notify the desktop manager of the user layer; the desktop manager is used to generate and output the spliced virtual display screen according to the first hot-plug event and the splicing resolution; wherein, during the process of the desktop manager generating the virtual display screen, each of the physical displays responds to the desktop manager's operation request to call the virtual display.
2. The method according to claim 1, characterized in that, Before obtaining the first parameter message sent by the splicing application, the method further includes: Obtain all physical displays connected to the current operating system, associate the physical display links of each physical display with the virtual display links corresponding to the virtual displays, and complete the registration of the virtual display links; wherein, the virtual displays corresponding to the virtual display links that have been registered are marked as the first status flag.
3. The method according to claim 2, characterized in that, The virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; the operation request includes a setting request for the virtual display; The step of responding to the desktop manager's request to invoke the virtual display through each of the physical displays includes: Receive the configuration request for the virtual display sent by the desktop manager; According to the setting request, the splicing resolution is split into at least two resolutions; At least two of the resolutions are applied to the physical display timing controllers of at least two physical displays corresponding to the virtual display timing controller; and the timing of each of the physical display timing controllers is locked.
4. The method according to claim 2, characterized in that, The virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; after generating the virtual display screen, the method further includes: Receive a page flipping request for the virtual display sent by the desktop manager; Based on the page flipping request, the display area address of each physical display timing controller in the virtual frame buffer is calculated; wherein, the virtual frame buffer is associated with the virtual display timing controller; Each physical display timing controller is called to read its corresponding display area address via its page flipping interface, and each physical display timing controller is configured to read data from its corresponding display area address.
5. The method according to claim 2, characterized in that, The virtual display link includes at least a virtual display timing controller; the physical display link includes at least a physical display timing controller; after generating the virtual display screen, the method further includes: Receive the vertical synchronization count query request for the virtual display sent by the desktop manager; Based on the vertical synchronization count query request, the vertical synchronization count value of the virtual display timing controller is returned; wherein, the vertical synchronization count value is updated synchronously when the physical display timing controller generates a vertical synchronization interruption.
6. The method according to claim 1, characterized in that, The method further includes: Verify whether the resolution of each physical display meets a first condition and whether the refresh rate meets a second condition; the first condition includes that the resolution of each physical display is consistent and the sum of the resolutions of all physical displays does not exceed the boundary of the virtual display; the second condition includes that the refresh rate of each physical display is consistent. If the display resolution of each physical display meets the first condition and the refresh rate meets the second condition, then the verification is deemed successful. If the verification is successful, the step of switching the working mode of each physical display participating in the splicing to the splicing mode according to the first identifier is executed.
7. The method according to claim 1, characterized in that, The method further includes: Receive the second parameter message sent by the splicing application; According to the second parameter message, restore the working mode of each physical display to the normal mode, clear the first status mark of each physical display, and mark the virtual display as the first status mark; A second hot-plug event is generated based on the first state flag of the virtual display. The second hot-plug event is used to notify the desktop manager at the user level to perform an operation to set the output state of the virtual display to off based on the first state flag.
8. A display splicing method, characterized in that, The method is applied to a splicing application at the user layer and includes: Obtain the physical displays connected to the current operating system, and generate a splicing layout template based on each of the physical displays; Obtain the splicing parameters corresponding to the splicing operation, and determine the splicing configuration parameters based on the splicing parameters and the splicing layout template; The output state of each physical display is set to off, the splicing configuration parameters are converted into a first parameter message, and the first parameter message is sent to the splicing module of the driver layer. The first parameter message is used to instruct the splicing module to enter the splicing mode.
9. The method according to claim 8, characterized in that, The method further includes: Obtain the second parameter message and set the output status of the virtual display to off; wherein, the second identifier in the second parameter message represents the normal mode, which is used to notify the splicing module to enter the normal mode; the virtual display is the display formed by splicing together the physical displays; The second parameter message is sent to the splicing module via the atomic submission interface.
10. The method according to claim 8, characterized in that, The splicing configuration parameters include the resolution and refresh rate of each physical display; Before setting the output state of each of the physical displays to off, the method further includes: Verify whether the resolution of each physical display meets the first condition and whether the refresh rate meets the second condition; The first condition includes that the resolutions of all the physical displays are consistent and that the sum of the resolutions of all the physical displays does not exceed the boundary of the virtual display; the second condition includes that the refresh rates of all the physical displays are consistent. If the resolution of each of the physical displays meets the first condition and the refresh rate meets the second condition, then the verification is deemed successful. If the verification is successful, the steps of setting the output state of each of the physical displays to off and converting the splicing configuration parameters into the first parameter message are executed.
11. The method according to claim 8, characterized in that, The step of generating a splicing layout template based on each of the physical displays includes: The splicing layout template is generated by performing at least one of horizontal and vertical splicing on each of the physical displays.
12. A display splicing device, characterized in that, A splicing module applied to the driving layer; the device includes: The first acquisition module is used to acquire a first parameter message sent by the splicing application; wherein the first parameter message includes a first identifier corresponding to the splicing mode and the splicing resolution; The switching marker module is used to switch the working mode of each physical display participating in the splicing to the splicing mode according to the first identifier and mark it as the first status marker, and mark the virtual display corresponding to the pre-registered virtual display link as the second status marker; wherein, the first status marker is the status marker that is not connected to the desktop manager; the second status marker is the status marker that is connected to the desktop manager; A response sending module is used to generate a first hot-plug event based on the first status flag and the second status flag, the first hot-plug event being used to notify the desktop manager of the user layer; the desktop manager is used to generate and output the spliced virtual display screen according to the first hot-plug event and the splicing resolution; wherein, during the process of the desktop manager generating the virtual display screen, each of the physical displays responds to the desktop manager's operation request to call the virtual display.
13. A display splicing device, characterized in that, A splicing application applied to the user layer; the device includes: The second acquisition module is used to acquire the physical displays connected to the current operating system and generate splicing layout templates according to each of the physical displays; The acquisition and determination module is used to acquire the splicing parameters corresponding to the splicing operation, and determine the splicing configuration parameters based on the splicing parameters and the splicing layout template; The conversion module is configured to set the output state of each physical display to off, convert the splicing configuration parameters into a first parameter message, and send the first parameter message to the splicing module of the driver layer. The first parameter message is used to instruct the splicing module to enter the splicing mode.
14. A display splicing system, characterized in that, The system includes a user-layer splicing application and a driver-layer splicing module; The user-layer splicing application is used to obtain physical displays connected to the current operating system and generate splicing layout templates based on each physical display; obtain splicing parameters corresponding to the splicing operation, determine splicing configuration parameters based on the splicing parameters and the splicing layout template; set the output state of each physical display to off, convert the splicing configuration parameters into a first parameter message, and send the first parameter message to the splicing module in the driver layer, wherein the first parameter message is used to instruct the splicing module to enter splicing mode; The splicing module of the driver layer is used to acquire a first parameter message sent by the splicing application; wherein the first parameter message includes a first identifier corresponding to the splicing mode and a splicing resolution; according to the first identifier, the working mode of each physical display participating in the splicing is switched to the splicing mode and marked as a first status marker, and the virtual display corresponding to the pre-registered virtual display link is marked as a second status marker; wherein the first status marker is a status marker not connected to the desktop manager; the second status marker is a status marker connected to the desktop manager; based on the first status marker and the second status marker, a first hot-plug event is generated, the first hot-plug event is used to notify the desktop manager of the user layer; the desktop manager is used to generate and output the spliced virtual display screen according to the first hot-plug event and the splicing resolution; wherein, during the process of the desktop manager generating the virtual display screen, each physical display responds to the operation request of the desktop manager to call the virtual display.
15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
16. 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 the steps of the method according to any one of claims 1 to 11.
17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.