Display method and device, electronic equipment and computer storage medium
By creating virtual device nodes in a multi-operating system environment, each operating system accesses the bound display hardware resources through it, solving the problem of resource isolation under multiple operating systems and achieving effective isolation of hardware resources.
Patent Information
- Application Number
- CN202410939443.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-15
AI Technical Summary
In a multi-operating system environment, the existing technology cannot effectively realize hardware resource isolation, resulting in resource conflicts.
By creating virtual device nodes in multiple operating systems running in parallel, the simulation direct rendering manager DRM provides user space to access display hardware resources. Each operating system accesses hardware resources through its bound virtual device nodes to achieve scheduling isolation and hardware Resource isolation.
Resource conflict issues can be resolved without adding hardware resource-related logical judgment codes at the application layer and realize hardware resource isolation between different operating systems.
Smart Images

Figure CN118963688A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a display method, device, electronic device and computer storage medium. Background Art
[0002] With the development of Linux kernel and the improvement of graphics card performance, DRM (Direct Rendering Manager) device driver was introduced. DRM is the management framework in Linux kernel responsible for interacting with graphics card. DRM provides a set of APIs that enable user space applications to efficiently perform tasks such as 3D rendering, video decoding and GPU computing.
[0003] With the advancement of automobile intelligence and networking, the car cockpit is gradually developing into a smart cockpit with human-computer interaction as the core and multi-screen linkage. With the rapid development of the chip industry, the computing power of automotive chips has been greatly improved. In order to meet the needs of running multiple operating systems on a single SoC (System on Chip) system-level chip and driving multiple displays at the same time, the display controller needs to adapt to more user space process access.
[0004] The solution of the related technology integrates the drm host module in the DRM device driver to support concurrent access of multiple user space processes to the display controller. Although each operating system can share display hardware resources through the drm host module, it uses the same physical device node to achieve multi-process access and cannot achieve hardware resource isolation. This means that even if only one display hardware device's hardware resources are required by one operating system, other operating systems can still read the device's hardware resources, causing resource conflicts. The related technology can only achieve hardware resource isolation at the application layer by limiting the access rights of specific applications, and fails to fundamentally solve the resource conflict problem in a multi-operating system environment.
[0005] With respect to the above-mentioned problems existing in the related technologies, no effective solutions have been found so far. Summary of the invention
[0006] The present application provides a display method, device, electronic device and computer storage medium to solve the above-mentioned technical problems existing in the related art.
[0007] According to one embodiment of the present application, a display method is provided, comprising: creating virtual device nodes in a plurality of operating systems running in parallel, respectively, wherein the virtual device nodes are configured to simulate physical device nodes provided by a direct rendering manager DRM to a user space to access display hardware resources; the user space process in each operating system accesses the display hardware resources bound to the virtual device node through its own virtual device node; and displaying the image drawn by the user space process on a designated display screen matching each operating system through the display hardware resources.
[0008] According to another embodiment of the present application, a display device is provided, including: a creation module, used to create virtual device nodes respectively in multiple operating systems running in parallel, wherein the virtual device nodes are configured to simulate physical device nodes provided by the direct rendering manager DRM to the user space to access display hardware resources; an access module, used for the user space process in each operating system to access the display hardware resources bound to the virtual device node through the respective virtual device nodes; and a display module, used to display the image drawn by the user space process on a designated display screen matching each operating system through the display hardware resources.
[0009] Optionally, the creation module includes a reading submodule, which is used to read the specified display screen information configured for the current operating system in a preset configuration file; a searching submodule, which is used to search for the specified display hardware resources required for the specified display screen information; and a configuring submodule, which is used to configure the specified display hardware resources to an unused virtual device node to form a virtual device node of the current operating system.
[0010] Optionally, the search submodule includes a search unit, used to search for a target display connector matching the specified display information in the original display connector list of the DRM; a first reading unit, used to read the corresponding target decoding module and target synthesis module according to the target display connector; and an acquisition unit, used to acquire the corresponding target display panel through the target synthesis module, wherein the specified display hardware resources include a target display connector, a target decoding module, a target synthesis module and a target display panel.
[0011] Optionally, the acquisition unit includes an acquisition subunit, which is used to acquire a valid display panel set from the original display panel list of the DRM; a judgment subunit, which is used to judge whether the current display panel can be used by the target synthesis module for each display panel in the display panel set; and a deletion subunit, which is used to delete the current display panel if the current display panel cannot be used by the target synthesis module.
[0012] Optionally, the display device further includes a judgment module for judging whether the designated display hardware resources are occupied by other virtual device nodes; and an exit module for exiting the virtual device node creation process of the current operating system if the designated display hardware resources are occupied by other virtual device nodes.
[0013] Optionally, the access module includes a second reading unit, which is used to read the node information of the virtual device node corresponding to the current operating system from a preset configuration file when the user space process of the current operating system calls the input and output control ioctl function to request access to the virtual device node; and a computing unit, which is used to activate the display hardware resources bound to the virtual device node when the user space process of the current operating system calls the open function to request to open the virtual device node.
[0014] Optionally, the display device further comprises a hiding module, which is used to hide the physical device node in a daemon process that manages the device node.
[0015] According to another embodiment of the present application, a computer storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned device embodiments when running.
[0016] According to another embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; the processor is used to execute the steps in the above method by running the program stored in the memory.
[0017] The electronic device provided in the embodiment of the present application may specifically be a module capable of realizing a communication function or a terminal device including the module, etc. The terminal device may be a mobile terminal or a smart terminal. The mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a laptop computer, etc.; the smart terminal may specifically be a terminal including a wireless communication module such as a smart car, a smart watch, a shared bicycle, a smart cabinet, etc.; the module may specifically be a wireless communication module, such as any one of a 2G communication module, a 3G communication module, a 4G communication module, a 5G communication module, and a NB-IOT communication module.
[0018] According to yet another embodiment of the present application, a computer program product comprising instructions is also provided, which enables the computer to execute the steps in the above method when the computer program product is executed on the computer.
[0019] Through the embodiments of the present application, different virtual device nodes are released to different operating systems, and each operating system accesses the display hardware resources bound to the virtual device node through the virtual device node, thereby realizing scheduling isolation and hardware resource isolation. There is no need to add any hardware resource-related logical judgment code in the application layer, and the problem of resource conflict when multiple operating systems drive different display screens respectively can be solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 is a hardware structure block diagram of a computer according to an embodiment of the present application;
[0022] Figure 2 is a flow chart of a display method according to an embodiment of the present application;
[0023] Figure 3 It is a flowchart of multiple user space processes concurrently accessing a display controller in the related art;
[0024] Figure 4 It is a schematic diagram of a flow chart of multiple user space processes concurrently accessing a display controller in an embodiment of the present application;
[0025] Figure 5 is a schematic diagram of a display link in an embodiment of the present application;
[0026] Figure 6 It is a structural block diagram of a display device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Example 1
[0030] The method embodiment provided in the first embodiment of the present application can be executed in a mobile phone, a computer, a tablet or a similar computing device. Taking running on a computer as an example, Figure 1 is a hardware structure block diagram of a computer in an embodiment of the present application. Figure 1 As shown, the computer may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a display method in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0032] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0033] In this embodiment, a display method is provided. Figure 2 is a flow chart of a display method according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0034] Step S10, creating corresponding virtual device nodes in the multiple operating systems running in parallel, wherein the virtual device nodes are configured to simulate the physical device nodes provided by the direct rendering manager DRM to the user space to access display hardware resources;
[0035] Step S20, the user space process in each operating system accesses the display hardware resources bound to the virtual device node through the respective virtual device node;
[0036] Step S30: displaying the image drawn by the user space process on a designated display screen matching each operating system through the display hardware resources.
[0037] In this embodiment, a virtual device node can be created for each of the different operating systems running on the same system chip. For example, if a Linux system and an Android system are running in parallel on a SOC chip, a virtual device node is created for the Linux system, and another virtual device node is created for the Android system. The virtual device node can be a virtual graphics card.
[0038] In one example, referring to Figure 4 For the instrument system and the in-vehicle infotainment system IVI (in-vehicle infotainment) system running in parallel, virtual device nodes / dev / dri / card2 (hereinafter referred to as card2) and / dev / dri / card1 (hereinafter referred to as card1) are created respectively, where card is the name of the Linux kernel display controller file node. The user space process in the instrument system accesses the display hardware resources bound to card2 in the kernel space through card2 (display hardware resources such as Figure 4The display panel planes, synthesis module crtc, decoding module encoder, display connector connector, etc. in the IVI system display the image drawn by the user space process to the specified display screen (instrument display screen) that matches the instrument system through display hardware resources. The IVI system is similar to the instrument system and will not be described in detail here.
[0039] In this embodiment, the display screen connector connector is a connector that connects a physical display device, and can be regarded as a hardware module directly associated with a specific display device (such as a screen). The decoding module encoder is a module used to decode a digital signal (such as pixel data) into a corresponding analog signal, which can be DP, DPI or DSI. For example, the DSI encoder converts the RGB pixel data of the system software into MIPI data. The synthesis module CRTC represents the entire display pipeline. The CRTC receives pixel data from the planes and mixes them. The CRTC is a hardware module that scales, rotates, or overlays the upper display window according to the Z axis, which can be understood as a DPU (display image processor). The function of the display panel Plane itself is to crop and scale the specified image, as well as the placement position on the visible area of the display pipeline. Plane can also have additional attributes that specify how pixels are positioned and mixed, such as rotation or Z position.
[0040] Through the above steps, this embodiment publishes different virtual device nodes to different operating systems, and each operating system accesses the display hardware resources bound to the virtual device nodes through the virtual device nodes, thereby realizing scheduling isolation and hardware resource isolation. There is no need to add any hardware resource-related logical judgment code in the application layer, and the problem of resource conflict when multiple operating systems drive different display screens respectively can be solved.
[0041] In one implementation of this embodiment, in a plurality of operating systems running in parallel, respectively creating virtual device nodes includes:
[0042] A1, read the specified display screen information configured for the current operating system in the preset configuration file;
[0043] A2, searching for the specified display hardware resources required for the specified display screen information;
[0044] A3, configuring the designated display hardware resources to unused virtual device nodes to form virtual device nodes of the current operating system.
[0045] In this embodiment, the preset configuration file is DTS (DeviceTree Source), which configures display hardware resources and the mapping relationship between virtual device nodes and display hardware resources. In this embodiment, DTS configures the name of the virtual device node and the name of the display screen (display) to which the virtual device node needs to be bound, for example Figure 4 In the example, the virtual device node card1 is bound to the ivi display screen, and the virtual device node card2 is bound to the instrument display screen.
[0046] In this embodiment, after the kernel display controller KMS (Kernel Mode Setting) is loaded, the predefined vm_lease_drm driver is initialized; the designated display screen information configured for the current operating system in DTS is read through the vm_lease_drm driver, for example, the name of the instrument display screen configured for the instrument system is read from DTS, the designated display hardware resources required for the instrument display screen are searched, and the designated display hardware resources are configured to an unused virtual device node to form a virtual device node card2 of the instrument system.
[0047] In this embodiment, the specified display hardware resources include a target display screen connector, a target decoding module encoder, a target synthesis module CRTC, and a target display panel plane. The specified display hardware resources required to find the specified display screen information include:
[0048] a21, searching for a target display screen connector that matches the specified display screen information in the original display screen connector list of the DRM;
[0049] a22, reading the corresponding target decoding module and target synthesis module according to the target display screen connector;
[0050] a23, obtaining the corresponding target display panel through the target synthesis module.
[0051] In this embodiment, the user space usually only needs to care about the display connector connector, the decoding module encoder, the synthesis module CRTC and the display panel plane modules in the display pipeline. In this embodiment, according to the configuration of the current operating system in the preset configuration file DTS, the display link corresponding to the current operating system and the hardware resources required for display are obtained.
[0052] Specifically, obtain the original DRM device (drmdevice) that has been initialized on the SOC platform (such as MediaTek MTK or Qualcomm, etc.), obtain the original display connector list (original connector list) of the original DRM device through the vm_lease_drm driver, and in the original connector list, find the target connector name configured in DTS that matches the specified display information, and then find the corresponding target encoder and target CRTC resources based on the target connector name, and then obtain the corresponding target plane through the target CRTC resources.
[0053] Add the configuration information of the virtual graphics card in DST. DTS is the configuration file that the driver reads the hardware device resources when the device is powered on. The configuration file configures the display screen that the relevant virtual display device needs to be bound to, obtains the target connector through the vm_lease_drm driver, and then obtains the corresponding encoder and CRTC through the connector tag information, and then obtains the corresponding planes through the CRTC tag signal, so that the complete display link (such as Figure 5 ), the user space process can use this display connection to draw images and display them on the hardware display.
[0054] In this implementation, obtaining the corresponding target display panel through the target synthesis module includes:
[0055] a231, obtaining a valid display panel set from the original display panel list of the DRM;
[0056] a232, for each display panel in the display panel set, determining whether the current display panel can be used by the target synthesis module;
[0057] a233: If the current display panel cannot be used by the target synthesis module, delete the current display panel.
[0058] According to the display panel set Planes configured by DTS, valid planes are obtained from the original display panel list (original planes list) of the original DRM device, and for each obtained plane, it is determined whether it can be used by the currently held target CRTC module. If the current display panel cannot be used by the target CRTC module, the current display panel is deleted.
[0059] In this implementation, due to the differences in Planes configurations provided by different manufacturers, some manufacturers allow Planes resources to be dynamically allocated, and any CRTC can access and use these Planes, however, some manufacturers choose to tightly bind Planes to specific CRTCs. Therefore, this implementation considers flexibility and compatibility, and determines whether the current Plane can be used by the target CRTC. If the current Plane cannot be used by the target CRTC, the current Plane is deleted.
[0060] This implementation method reallocates existing plane resources according to the business conditions on different display screens, thereby achieving reasonable use of hardware resources and reducing the system burden of the GPU.
[0061] In another implementation of this embodiment, after searching for the specified display hardware resources required for the specified display screen information, the method further includes:
[0062] B1, determining whether the designated display hardware resource is occupied by other virtual device nodes;
[0063] B2: If the designated display hardware resource is occupied by other virtual device nodes, then exit the virtual device node creation process of the current operating system.
[0064] In this embodiment, after finding the specified display hardware resources required for the specified display screen information, it is determined whether the currently acquired specified display hardware resources are held by other virtual device nodes. If they are held, the creation of the virtual device node fails, and the creation process of the virtual device node is directly terminated, and then an error message is printed. The application cannot obtain the relevant virtual device node, and the hardware resources that do not belong to the current virtual device node are completely invisible when the current virtual device node is used in the user space, thereby achieving absolute isolation of hardware resources.
[0065] In another implementation of this embodiment, the user space process in each operating system accesses the display hardware resources bound to the virtual device node through the respective virtual device node, including:
[0066] S21, when the user space process of the current operating system calls the input / output control ioctl function to request access to the virtual device node, reading the node information of the virtual device node corresponding to the current operating system from a preset configuration file;
[0067] S22, when the user space process of the current operating system calls an open function to request to open the virtual device node, activating the display hardware resources bound to the virtual device node.
[0068] In this embodiment, a virtual device node is created in the lease driver, and the operation functions of the device node are redefined. The operation functions include but are not limited to open, close, read, write and ioctl functions to meet the device management and data interaction requirements in the virtual environment.
[0069] The virtual device node is used to simulate the function of a real physical device node. To prevent the user space process from mistakenly accessing the physical device node, this implementation method hides the physical device node in the daemon process that manages the device node. Figure 4 Hide the physical device node / dev / dri / card0. The physical device node card0 is no longer used by the application layer. Figure 4 The link part of the card0 node is empty. In the application space, since card0 is hidden, all its functions cannot be used, which prevents the user space from reading all display hardware resources through card0 and implements resource isolation. In an example, when the daemon detects / dev / dri / card0, it removes its symbolic link and sets the permissions to unreadable and unwritable, thereby achieving the hiding effect.
[0070] In the module management mechanism of DRM, object ID is used for management. In the open function, the object ID of each display hardware resource bound to the virtual device node is saved in the current virtual device node, ensuring that the user space process can only access the specific hardware resources bound to the virtual card device node. In the ioctl function, when the user space version number or card name query request is received, the virtual card attribute information pre-configured in DTS is returned to achieve correct feedback of virtual device attributes.
[0071] Through the above redefinition operation, access errors are prevented. According to the operation function, only the configured hardware resources can be read, and other devices cannot be read. When the virtual graphics card is accessed at the application layer, the internal DRM library can automatically identify and call the corresponding virtual device node, ensuring the effective isolation of hardware resources in a multi-operating system environment.
[0072] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0073] Example 2
[0074] In this embodiment, a display device is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0075] Figure 6 is a structural block diagram of a display device according to an embodiment of the present application, such as Figure 6 As shown, the device comprises:
[0076] A creation module 60, configured to create virtual device nodes in a plurality of operating systems running in parallel, respectively, wherein the virtual device nodes are configured to simulate physical device nodes provided by a direct rendering manager DRM to a user space to access display hardware resources;
[0077] An access module 62, used for a user space process in each operating system to access display hardware resources bound to the virtual device node through the respective virtual device node;
[0078] The display module 64 is used to display the image drawn by the user space process on a designated display screen matching each operating system through the display hardware resources.
[0079] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0080] Example 3
[0081] An embodiment of the present application further provides a computer storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0082] Optionally, in this embodiment, the computer storage medium may be configured to store a computer program for performing the following steps:
[0083] S1, creating virtual device nodes in a plurality of operating systems running in parallel, respectively, wherein the virtual device nodes are configured to simulate physical device nodes provided by a direct rendering manager DRM to a user space to access display hardware resources;
[0084] S2, the user space process in each operating system accesses the display hardware resources bound to the virtual device node through the respective virtual device node;
[0085] S3, displaying the image drawn by the user space process on a designated display screen matching each operating system through the display hardware resources.
[0086] Optionally, in this embodiment, the above-mentioned computer storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0087] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0088] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0089] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0090] S1, creating virtual device nodes in a plurality of operating systems running in parallel, respectively, wherein the virtual device nodes are configured to simulate physical device nodes provided by a direct rendering manager DRM to a user space to access display hardware resources;
[0091] S2, the user space process in each operating system accesses the display hardware resources bound to the virtual device node through the respective virtual device node;
[0092] S3, displaying the image drawn by the user space process on a designated display screen matching each operating system through the display hardware resources.
[0093] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0094] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0095] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0096] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0098] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned computer storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0100] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A display method, It is characterized in that The method comprises: In a plurality of operating systems running in parallel, corresponding virtual device nodes are created respectively, wherein the virtual device nodes are configured to simulate physical device nodes provided by a direct rendering manager DRM to a user space to access display hardware resources; The user space process in each operating system accesses the display hardware resources bound to the virtual device node through the respective virtual device node; The image drawn by the user space process is displayed on a designated display screen matching each operating system through the display hardware resources.
2. The method according to claim 1, It is characterized in that In multiple operating systems running in parallel, corresponding virtual device nodes are created, including: Read the specified display screen information configured for the current operating system in the preset configuration file; Finding the specified display hardware resources required for the specified display screen information; The designated display hardware resources are configured to unused virtual device nodes to form virtual device nodes of the current operating system.
3. The method according to claim 2, It is characterized in that The specified display hardware resources include a target display screen connector, a target decoding module, a target synthesis module, and a target display panel. The specified display hardware resources required to find the specified display screen information include: Searching for a target display screen connector that matches the specified display screen information in the original display screen connector list of the DRM; According to the target display screen connector, reading the corresponding target decoding module and target synthesis module; The corresponding target display panel is obtained through the target synthesis module.
4. The method according to claim 3, It is characterized in that Acquiring the corresponding target display panel through the target synthesis module includes: Acquire a valid display panel set from the original display panel list of the DRM; For each display panel in the display panel set, determining whether the current display panel can be used by the target synthesis module; If the current display panel cannot be used by the target synthesis module, the current display panel is deleted.
5. The method according to claim 2, It is characterized in that After searching for the specified display hardware resources required for the specified display screen information, the method further includes: Determining whether the specified display hardware resource is occupied by other virtual device nodes; If the designated display hardware resource is occupied by other virtual device nodes, then the virtual device node creation process of the current operating system is exited.
6. The method according to claim 1, It is characterized in that The user space process in each operating system accesses the display hardware resources bound to the virtual device node through the respective virtual device node, including: When a user space process of the current operating system calls an input / output control ioctl function to request access to a virtual device node, node information of the virtual device node corresponding to the current operating system is read from a preset configuration file; When the user space process of the current operating system calls an open function to request to open the virtual device node, the display hardware resources bound to the virtual device node are activated.
7. The method according to claim 1, It is characterized in that The method further comprises: In the daemon process for managing the device nodes, the physical device nodes are hidden.
8. A display device, It is characterized in that include: A creation module, used to create virtual device nodes in a plurality of operating systems running in parallel, respectively, wherein the virtual device nodes are configured to simulate physical device nodes provided by a direct rendering manager DRM to a user space to access display hardware resources; An access module, used for a user space process in each operating system to access display hardware resources bound to the virtual device node through the respective virtual device node; The display module is used to display the image drawn by the user space process on a designated display screen matching each operating system through the display hardware resources.
9. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: Memory, used to store computer programs; A processor, configured to execute the display method according to any one of claims 1 to 7 by running a program stored in a memory.
10. A computer storage medium, It is characterized in that The computer storage medium includes a stored program, wherein the display method according to any one of claims 1 to 7 is executed when the program is executed.
Citation Information
Cited By
Display method and apparatus, and electronic device and computer storage medium
WO2026011601A1
