A method and system for time-sharing reuse of multi-system graphics display based on DRM switching
Patent Information
- Application Number
- CN202211076837.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-05
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-09-05
AI Technical Summary
[0005]发明目的:本发明针对那些基于DRM的操作系统的图形系统无法同时兼容显示的问题,提供基于DRM切换的多系统图形显示分时复用方法及系统,实现了多个操作系统的图形系统的融合,能够在同一硬件环境下对显示资源进行分时复用
[0011]Beneficial effects: Compared with the prior art, the advantages of this invention are: This solution can greatly reduce the difficulty of multi-system integration, and at the same time has strong versatility and scalability. This solution can be adopted by any operating system that uses the Linux kernel and uses DRM as its underlying graphics system.
Smart Images

Figure CN115421836B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of graphics display technology, and more specifically to a multi-system graphics display time-division multiplexing method based on DRM switching. Background Technology
[0002] Currently, many mainstream operating systems on the market use Linux as their kernel, including Android and OpenHarmony, which are widely used across various industries. However, these operating systems have their own distinct ecosystems, leading to incompatibility issues for many applications. For example, Android applications cannot run on OpenHarmony, forcing application developers to create separate applications for different operating systems, thus increasing costs. The main reason for this is that although they share the same kernel, these operating systems have vastly different frameworks, making system integration difficult. The most significant difference lies in their graphics display systems.
[0003] On the other hand, many Linux kernel-based operating systems also use a Direct Rendering Manager (DRM) as their underlying graphics display framework. However, due to significant differences in their implementations of DRM—for example, Android uses SurfaceFlinger and OpenHarmony uses ROSEN—these operating systems' graphics display frameworks cannot be simultaneously compatible, ultimately affecting application compatibility. Figure 1 As shown, both System A and System B use Linux as their kernel and DRM as the underlying implementation of their graphics system. The two systems also have different graphics display systems. Currently, the graphics systems of each operating system exclusively occupy DRM resources and cannot run on the same hardware environment at the same time.
[0004] Therefore, if compatible display of graphics systems can be achieved at the underlying level among these operating systems that use Linux as their kernel, the cost of integrating operating systems can be greatly reduced, and ultimately the cost of repeated development of the same application on different operating systems can be reduced. Summary of the Invention
[0005] Purpose of the invention: This invention addresses the problem that graphics systems based on DRM operating systems cannot be simultaneously displayed compatiblely. It provides a method and system for time-sharing multiplexing of graphics display across multiple systems based on DRM switching, which realizes the integration of graphics systems from multiple operating systems and enables time-sharing multiplexing of display resources in the same hardware environment.
[0006] Technical Solution: The multi-system graphics display time-sharing multiplexing method based on DRM switching described in this invention includes the following steps: initializing system resources and obtaining the DRM master control; receiving the registration application of the supported operating system, storing the successfully registered operating system in the registered list and returning the unique ID information of the operating system; obtaining the operating system's call application, checking the operating system's ID information, and if the ID information is in the registered list, allocating the DRM master control to the operating system, so that the operating system can obtain display resources through the DRM master control for graphics display.
[0007] To further improve the above technical solution, the supported operating system refers to an operating system with Linux as its kernel and DRM as the underlying implementation of the graphics system.
[0008] Furthermore, after receiving the registration application of the supported operating system, the process further includes: setting the first operating system that successfully completes registration as the main display operating system; the DRM allocates display resources, including the GPU, to the main display operating system through the Master control; and the main display system uses the display resources for graphics display.
[0009] Furthermore, if multiple operating systems simultaneously initiate a call request, and after checking the operating system ID information, at least two operating systems are found to be in the registered list, then a FIFO scheduling strategy is adopted to allocate the DRM Master control to the at least two operating systems in the registered list.
[0010] Furthermore, the system used to implement the above-mentioned multi-system graphics display time-sharing multiplexing method based on DRM switching includes a request handler module, a list of registered systems, and dmm_init, dmm_os_register, and dmm_request_master interfaces. The dmm_os_register interface is used to receive the registration of supported operating systems, store the successfully registered operating systems in the registered list, and return the unique ID information of the operating system. The dmm_request_master interface is used to initiate a permission request and request DRM Master permissions from the request handler module according to the request. The request handler module checks whether the operating system's ID information is stored in the registered system list according to the call request, and assigns DRM Master permissions to the operating systems stored in the registered system list, so that the operating system can obtain display resources for graphics display through the DRM master control.
[0011] Beneficial effects: Compared with the prior art, the advantages of this invention are: This solution can greatly reduce the difficulty of multi-system integration, and at the same time has strong versatility and scalability. This solution can be adopted by any operating system that uses the Linux kernel and uses DRM as its underlying graphics system.
[0012] After multi-system integration is achieved based on this solution, the GUI capabilities of the same application can run on the integrated system without redevelopment; this greatly reduces redundant investment and ultimately reduces application development costs. Attached Figure Description
[0013] Figure 1 This is an architecture diagram of the graphics systems of systems A and B exclusively using DRM resources in the existing technology; Figure 2 This is an architecture diagram of the time-sharing compatible operation of the graphics systems of systems A and B in this invention; Figure 3 This is an interface architecture diagram of the time-sharing compatible operation of the graphics systems of systems A and B in this invention. Detailed Implementation
[0014] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings, but the scope of protection of the present invention is not limited to the embodiments described.
[0015] Suppose there are two operating systems, both using Linux as their kernel and DRM as the underlying implementation of their graphics systems; the two systems are system A and system B, and their graphics display systems are different.
[0016] This invention designs and implements a DRM Master Manager to achieve time-sharing compatibility of the graphics systems of systems A and B running on the same hardware environment. The architecture diagram of the solution is as follows. Figure 2 As shown.
[0017] The implementation logic and call flow of DRM Master Manager (hereinafter referred to as DMM) are as follows: 1. DMM Initialization The DMM initializes system resources, such as enabling and initializing the GPU and setting display-related configurations. The DMM then gains master control of the DRM, thereby gaining control over display resources such as the GPU.
[0018] 2. System Registration System A, System B, and even other operating systems based on Linux+DRM need to register in DMM first, so that DMM can detect that a new system is already running on the hardware.
[0019] 3. Configure the main display system DMM will designate the first operating system to successfully register as the primary display system, allocating display resources such as the GPU to that operating system. The graphics display system of this material system will then have the opportunity to be displayed, allowing its applications to utilize GPU and other display resources to render and display the GUI.
[0020] 4. Switch systems Once multiple systems have registered with DMM, they can apply to DMM for display opportunities through the interfaces provided by DMM. DMM uses a FIFO scheduling strategy to allocate display resources to the corresponding systems, ultimately achieving time-sharing multiplexing of multiple systems.
[0021] A DMM must implement at least three interfaces, as follows: 1. dmm_init This interface is the entry point function for DMM, used for DMM module initialization. It can be called after the Linux kernel boot process has finished and the DRM kernel module has been loaded. `dmm_init` should perform checks and initialization tasks on DRM, setting system-wide information.
[0022] 2. dmm_os_register This interface is provided to supported operating systems, such as System A or System B, which register themselves with the DMM by calling `dmm_os_register` during their graphics display system initialization. The interface returns a unique ID that identifies the system. This ID should be passed as a parameter to subsequent interfaces, such as `dmm_request_master`, to identify the system.
[0023] 3. dmm_request_master This interface is provided to supported operating systems, such as System A or System B. These systems obtain DRM resources and Master control through this interface to gain a chance to be displayed. Only one system can successfully acquire control at a time. The request_handler inside the DMM acts as an arbitrator, determining which system should be allocated DRM Master control. Its decision-making strategy is FIFO (First-In, First-Out).
[0024] As described above, although the invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the invention itself. Various changes in form and detail may be made without departing from the spirit and scope of the invention as defined in the appended claims.
Claims
1. A multi-system graphics display time-sharing multiplexing method based on DRM switching, characterized in that, Includes the following steps: Initialize system resources and acquire master control of DRM; Receive registration applications for supported operating systems, store successfully registered operating systems in the registered list, and return the unique ID information of the operating system; Obtain the operating system's call request, check the operating system's ID information, and if the ID information is in the registered list, allocate DRM master control to the operating system, so that the operating system can obtain display resources through DRM master control for graphics display.
2. The multi-system graphics display time-division multiplexing method based on DRM switching according to claim 1, characterized in that: The supported operating system refers to an operating system with Linux as its kernel and DRM as the underlying implementation of its graphics system.
3. The multi-system graphics display time-division multiplexing method based on DRM switching according to claim 1, characterized in that, After receiving the registration application of the supported operating system, the process further includes: setting the first operating system that successfully completes registration as the main display operating system; the DRM allocates display resources, including the GPU, to the main display operating system through the Master control; and the main display system uses the display resources for graphics display.
4. The multi-system graphics display time-division multiplexing method based on DRM switching according to claim 1, characterized in that: If multiple operating systems simultaneously initiate a call request, and after checking the operating system ID information, at least two operating systems are found to be in the registered list, then a FIFO scheduling strategy is used to allocate the DRM Master control to the at least two operating systems in the registered list.
5. A system for implementing the multi-system graphics display time-division multiplexing method based on DRM switching as described in claim 1, characterized in that: This includes the request handler module, a list of registered systems, and the dmm_init, dmm_os_register, and dmm_request_master interfaces. The dmm_os_register interface is used to receive the registration of supported operating systems, store successfully registered operating systems in the registered list, and return the unique ID information of the operating system. The dmm_request_master interface is used to initiate a permission request, and based on the request, it requests the DRM Master permission from the requesthandler module; The request handler module checks whether the operating system's ID information is stored in the list of registered systems based on the permission request. It then assigns DRM Master permissions to the operating systems stored in the list of registered systems, enabling the operating system to obtain display resources for graphics display through the DRM's master control.
Citation Information
Patent Citations
Graphic display method and device of heterogeneous dual-system
CN107547474A
Method for sharing Linux system screen data by Android application based on DRM
CN114489888A