Double-display-card display method and system based on Feiteng platform
By configuring the graphics card as the main and secondary graphics card on the Feiteng platform, and enabling source output and video memory sharing in the DDX driver, the problem of dual graphics cards being displayed simultaneously on devices that do not support GPU 2D/3D acceleration function is solved, and the application is achieved Dual graphics card display function for a wide range of embedded hardware devices.
Patent Information
- Application Number
- CN202411628423.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art cannot realize the simultaneous display function of dual graphics cards on embedded hardware devices that do not support GPU 2D/3D acceleration functions, especially on the Feiteng platform.
By configuring two graphics cards as the main graphics card and the secondary graphics card, select the DDX driver, and add the configuration code to enable source output to the DDX driver, so that the main graphics card supports the source output function. Then, change the DDX driver mode of the main graphics card from glamor to dumb, and share the graphics memory of the main graphics card to the secondary graphics card to realize the simultaneous display of the main and secondary graphics card.
It realizes the simultaneous display function of dual graphics cards on hardware devices that do not support glamor acceleration. It is suitable for all embedded hardware devices that do not support glamor acceleration. It is convenient to operate, low cost and wide application range.
Smart Images

Figure CN119440450A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of multi-graphics card display technology, and in particular to a dual-graphics card display method and system based on a Feiteng platform. Background Art
[0002] Dual graphics card display technology refers to the technology of driving multiple displays by using two or more graphics processing units (GPUs) at the same time. The existing dual graphics card display technologies are dual / multi graphics card display solutions launched by various graphics card manufacturers based on their own graphics cards. For example, NVIDIA launched the Optimus Technology solution based on the Hybrid SLI technology, and AMD launched the Hybrid CrossFireX technology solution. Among them, Optimus Technology can only be used in Windows systems and is mainly for graphics card combinations such as Nvidia and Intel. In addition, there is also a general technology solution Prime for Multi-GPU Rendering / GPU Offloading in Linux systems.
[0003] However, the above solutions are generally applied in relatively large and bulky terminal devices, and most of the solutions use Xorg's corresponding proprietary DDX driver to call Mesa's Opengl through Glamor, and use the drm library libdrm to call prime's dma-buf video memory sharing technology in the gem framework in the kernel to achieve multi-graphics card display. For embedded hardware devices with relatively weak display performance, since they do not support the 2D / 3D acceleration function of the GPU, they cannot use Glamor's acceleration method to perform multi-graphics card memory sharing, resulting in the inability to directly achieve dual graphics card simultaneous display on such devices. Therefore, there is an urgent need for a dual graphics card display method for embedded hardware devices on domestic platforms (such as the Feiteng platform) to achieve the simultaneous display function of two graphics cards without supporting Glamor. Summary of the invention
[0004] The technical problem to be solved by the present invention is: in view of the technical problems existing in the prior art, the present invention provides a dual graphics card display method and system based on the Feiteng platform to realize the simultaneous display of two graphics cards.
[0005] In order to solve the above technical problems, the technical solution proposed by the present invention is: A dual graphics card display method based on Feiteng platform, comprising: Step S1, configuring the dual graphics cards as a main graphics card and a secondary graphics card respectively; Step S2, configuring the graphics card drivers of the main graphics card and the secondary graphics card as DDX drivers in the graphics display server Xorg; Step S3, adding a configuration code for enabling source output so that the main graphics card supports the source output function; Step S4, changing the driving mode corresponding to the DDX driver of the main graphics card from glamor to dumb, and sharing the video memory of the main graphics card with the secondary graphics card to achieve simultaneous display work of the main and secondary graphics cards.
[0006] Furthermore, in step S1, the main graphics card is a Feiteng integrated graphics card, and the secondary graphics card is an external graphics card that is matched with the Feiteng integrated graphics card.
[0007] Furthermore, the step S2 comprises: Configure the configuration option of the graphics card driver name in the configuration file corresponding to the Feiteng integrated graphics card as the setting value of the Feiteng platform graphics card driver, and configure the driver configuration option as the Modesetting out-of-core driver in Xorg; The configuration option of the graphics card driver name in the configuration file corresponding to the external graphics card is configured as the setting value of the external graphics card driver, and the driver configuration option is configured as the Modesetting out-of-core driver in Xorg.
[0008] Furthermore, the step S3 comprises: Add the configuration code for enabling source output in the pre-initialization code of the main graphics card DDX driver to enable the source output flag so that the main graphics card supports the source output function.
[0009] Furthermore, the step S4 comprises: The driving mode corresponding to the DDX driver of the main graphics card is configured as dumb mode; Creating a shared video memory area from the main graphics card, and generating a file handle for operating the shared video memory area; The file handle is imported into the secondary graphics card, so that the secondary graphics card sets the shared graphics memory area as the graphics memory of the secondary graphics card, so as to realize the simultaneous display work of the primary and secondary graphics cards.
[0010] Furthermore, in step S4, the driving mode corresponding to the DDX driver of the main graphics card is configured as dumb mode, including: The DRM initialization mode setting function corresponding to the DDX driver of the main graphics card is adjusted from the default glamor initialization interface to call the dumb initialization interface, and the dumb initialization interface is used for the initialization setting of the image in the Xorg memory; The shared pixel mapping function corresponding to the image in Xorg memory and the shared pixel mapping backend storage function that call the glamor interface by default are adjusted to call the dumb interface.
[0011] Furthermore, in the step S4, the glamor initialization interface glamor_init called by the DRM initialization mode setting function drmmode_init by default is adjusted to the dumb initialization interface dumb_screen_init, so as to configure the driving mode corresponding to the DDX driver of the main graphics card to the dumb mode; Configure the shared pixel mapping function msSharePixmapBacking corresponding to the image Pixmap in Xorg memory to call the interface dumb_bo_create to create a whole shared video memory area from the main graphics card, and call the interface dumb_bo_map to bind and map the image buffer requested by Xorg, and finally call the interface drmPrimeHandle to return the file handle of the shared video memory area to Xorg; Configure the shared pixel map backend storage function msSetSharedPixmapBacking corresponding to the image Pixmap in the Xorg memory to call the interface drmPrimeHandle to import the file handle of the shared video memory area obtained in Xorg to the secondary graphics card, so that the secondary graphics card sets the shared video memory area as the video memory of the secondary graphics card, so as to realize that the image buffer of Xorg is sent to the primary graphics card and the secondary graphics card at the same time, so that the primary and secondary graphics cards can display at the same time.
[0012] The present invention also provides a dual graphics card display system based on the Feiteng platform, comprising a processor and a memory connected to each other, wherein the processor is programmed or configured to execute any one of the dual graphics card display methods based on the Feiteng platform described above.
[0013] The present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be programmed or configured by a microprocessor to execute any one of the dual graphics card display methods based on the Feiteng platform described above.
[0014] The present invention also provides a computer program product, including a computer program / instruction, which is programmed or configured to execute the above-mentioned dual graphics card display method based on the Feiteng platform through a processor.
[0015] Compared with the prior art, the advantages of the present invention are: The present invention configures the main and auxiliary card states of two graphics cards and selects the DDX driver, and in the DDX driver, adds the configuration code for enabling source output, so that the hardware device that does not support the glamor acceleration mode (i.e., does not support the 2D / 3D acceleration function of the GPU) supports the source output function, and then changes the driving mode of the main graphics card from glamor to dumb, so that the video memory of the main graphics card is shared with the auxiliary graphics card, thereby realizing the function of dual graphics card hybrid display, which is convenient to operate, low in cost, and has a wide range of applications, and can be applied to all embedded hardware devices that do not support the glamor acceleration mode. The dual graphics card display function can also be met for scenes in some embedded scenes that do not require high graphics card display performance, and can be fully compatible with the current more mainstream UDL devices for display expansion functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The present invention is a flowchart of a dual graphics card display method based on the Feiteng platform in one embodiment of the present invention.
[0017] Figure 2 The present invention is a flowchart for modifying the driving mode and video memory sharing in a specific application embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0019] Some relevant terms involved in the present invention are explained as follows: DRM: Full name Direct Rending Manager, it is the mainstream graphics display framework of Linux. Compared with the traditional Framebuffer, DRM is more adaptable to modern hardware, and supports GPU, 3D rendering display, etc. DRM can uniformly manage GPU and Display drivers, making the software architecture more unified, convenient for development and maintenance. It mainly includes three parts: gem (graphics execution manager), kms (kernel mode setting), and libdrm (library for user space programs to communicate with the kernel DRM subsystem).
[0020] GEM: Full name Graphic Execution Manager, mainly responsible for managing FrameBuffer. GEM commonly uses two types of buffers: Dumb Buffer and Prime Buffer.
[0021] Dumb Buffer: implemented based on cma api, only supports continuous physical memory, and is used for simple scenes with small resolution.
[0022] Prime Buffer: A buffer sharing mechanism based on dma-buf that supports continuous and non-contiguous physical memory and is used in large and complex memory scenarios.
[0023] Xorg: It is an implementation of X11, while X Window System is a C / S structured program. Xorg only provides an X Server.
[0024] UDL: DisplayLink is a connection technology that connects the monitor to the computer through the USB interface. It can connect the computer and multiple display devices very simply and conveniently.
[0025] DDX: Full name of Device Dependent X, it is the part of Xorg that handles the hardware (and to some extent the operating system).
[0026] Modesetting: It is a common ddx driver in xfree86 driver.
[0027] Glamor: is an open source 2D graphics generic driver for the X Window System implemented by X.org.
[0028] Opengl: is a cross-language, cross-platform application programming interface for rendering 2D and 3D vector graphics.
[0029] Mesa: Mesa 3D is an open source 3D computer graphics library under the MIT license that implements the OpenGL application programming interface in an open source form.
[0030] Source output: refers to the output port of the display provider, which means that the provider can send images or video signals to other devices or displays. This function allows images to be transmitted from one display provider to another display provider or display device.
[0031] Sink output: refers to the input port that accepts image or video signals from other display providers or devices. It means that the provider can accept signals sent by other providers or devices and display them on its own display.
[0032] like Figure 1 As shown, this embodiment provides a dual graphics card display method based on the Feiteng platform, including: Step S1, configuring the dual graphics cards as a main graphics card and a secondary graphics card respectively; Step S2, configuring the graphics card drivers of the main graphics card and the secondary graphics card as DDX drivers in the graphics display server Xorg; Step S3, adding a configuration code for enabling source output so that the main graphics card supports the source output function; Step S4, changing the driving mode corresponding to the DDX driver of the main graphics card from glamor to dumb, and sharing the video memory of the main graphics card with the secondary graphics card to achieve simultaneous display work of the main and secondary graphics cards.
[0033] It can be understood that this embodiment configures the status of the main and auxiliary cards of the two graphics cards and selects the DDX driver. In the DDX driver, the configuration code for enabling source output is added so that the hardware device that does not support the glamor acceleration mode (i.e., does not support the 2D / 3D acceleration function of the GPU) supports the source output function. Then, the driving mode of the main graphics card is changed from glamor to dumb so that the video memory of the main graphics card is shared with the auxiliary graphics card, thereby realizing the function of dual graphics card hybrid display. The operation is convenient, the cost is low, and the application range is wide. It can be applied to all embedded hardware devices that do not support the glamor acceleration mode. For some embedded scenarios that do not require high graphics card display performance, the display function of the dual graphics card can also be met, and it can be fully compatible with the current mainstream UDL devices for display expansion functions.
[0034] In step S1 of this embodiment, the main graphics card is a Feiteng integrated graphics card, and the secondary graphics card is an external graphics card that matches the Feiteng integrated graphics card.
[0035] In a specific application embodiment, a Feiteng E2000Q device (the E2000Q device itself has an integrated graphics card) is paired with a domestically produced Silicon Motion graphics card SM750 device as an example for detailed description.
[0036] The configuration file path of the Phytium integrated graphics card is / usr / share / X11 / Xorg.conf.d / 20-phytium.conf, where the configuration file specifically includes the following contents: Section "OutputClass" Identifier "PHYTIUM" MatchDriver "dc" Driver "Modesetting" Option "PrimaryGPU" "true" #Option "PageFlip" "false" EndSection (Configuration File 1) Among them, Section "OutputClass" indicates the beginning of the configuration section of an output class; the Identifier identifier is used to uniquely identify this output class so that it can be referenced or distinguished elsewhere; the MatchDriver option is used to specify the driver that matches this output class; the Driver option is used to specify the driver to be used; the PrimaryGPU option is used to specify whether the device is the primary GPU, a value of true indicates that it is the primary graphics card, and a value of false indicates that it is the secondary graphics card; PageFlip is used to specify whether the page flip function is enabled.
[0037] The configuration file path of the Huirong graphics card is / usr / share / X11 / Xorg.conf.d / 20-smifb.conf, where the configuration file specifically includes the following contents: Section "OutputClass" Identifier "SM750" MatchDriver "smifb" Driver "Modesetting" Option "PrimaryGPU" "false" Option "PageFlip" "false" EndSection (Configuration File 2) Therefore, by configuring the configuration option PrimaryGPU in the Section OutputClass of the configuration file of the Phytium integrated graphics card to true, and configuring the configuration option PrimaryGPU in the Section OutputClass of the configuration file of the external graphics card (such as the Phison graphics card) that is paired with the Phytium integrated graphics card to false, you can configure the Phytium integrated graphics card and the external graphics card as the primary graphics card and the secondary graphics card respectively.
[0038] In this embodiment, step S2 includes: Configure the graphics driver name configuration option in the configuration file corresponding to the Feiteng integrated graphics card to the setting value of the Feiteng platform graphics driver, and configure the driver configuration option to the Modesetting out-of-core driver in Xorg; Configure the configuration option of the graphics card driver name in the configuration file corresponding to the external graphics card to the setting value of the external graphics card driver, and configure the driver configuration option to the Modesetting out-of-core driver in Xorg.
[0039] In a specific application embodiment, the configuration option MatchDriver of Section OutputClass in the configuration file of the Feiteng integrated graphics card (main graphics card) is modified to dc and the configuration option Driver is modified to Modesetting, so that the main graphics card uses the DDX general driver Modesetting. The dc field is the corresponding graphics card driver name. For the graphics card driver, the specific definition of the member variable name in the global variable defined in the struct drm_driver structure in the corresponding graphics card driver is mainly found. For the Feiteng driver, the defined value is dc. The Feiteng graphics card driver name is defined in the struct drm_driver phytium_display_drm_driver variable in the drivers / gpu / drm / phytium / phytium_display_drv.c file. The Driver "Modesetting" field in the 20-phytium.conf (configuration file 1) file indicates that the Feiteng integrated graphics card dc uses the Modesetting out-of-core driver in Xorg.
[0040] Similarly, modify the configuration option MatchDriver in the output class of the secondary graphics card (using the Huirong graphics card as an example) to smifb and the configuration option Driver to Modesetting, so that the secondary graphics card uses the DDX general driver Modesetting. The smifb field is the name of the corresponding graphics card driver. For the graphics card driver, the specific definition of the member variable name in the global variable defined in the struct drm_driver structure of the corresponding graphics card driver is mainly found. For the driver of the Huirong graphics card, the defined value is smifb. The Huirong graphics card driver name is defined in the struct drm_driver driver variable in the drivers / gpu / drm / smidrm / smi_drv.c file. The field Driver "Modesetting" in the 20-smifb.conf (configuration file 2) file indicates that the corresponding Huirong graphics card smifb uses the Modesetting out-of-core driver in Xorg.
[0041] In this embodiment, step S3 includes: Add the configuration code for enabling source output in the pre-initialization code of the main graphics card DDX driver to enable the source output flag so that the main graphics card supports the source output function.
[0042] In a specific application embodiment, since the integrated graphics card fails to enable the glamor function by default, the source output function is not supported by default. It is necessary to adjust the Preinit (pre-initialization) code to enable the source output function when glamor is not supported (that is, adjust the function of Xrandr identifying the corresponding graphics card device main graphics card supporting source output in the Modesetting driver). For Feiteng and Huirong graphics cards that do not support the GPU 2D / 3D acceleration function, the hardware acceleration interface of glamor is not implemented, resulting in the backend causing its enabling failure. Among them, to enable the sourceoutput function in the Preinit code, it is necessary to force the addition of source output capability configuration code in the path code that does not support glamor: pScrn->capabilities |= RR_Capability_SourceOutput (pScrn is a pointer to a structure, which represents a display screen or display device; the capabilities structure member is a flag bit set used to indicate the various capabilities of the device; |= is a compound assignment operator, which first performs a bitwise OR operation on the two operands and then assigns the result to the left operand; RR_Capability_SourceOutput is a constant indicating that the device has the ability to output as a video source). This code indicates that the RR_Capability_SourceOutput flag position in the capabilities of the screen pointed to by pScrn is set to 1, indicating that the screen supports output to other display devices as an image source. It should be noted that the device used as a secondary graphics card needs to have a sink output function. The default graphics cards all support the sink output function because this function can be supported as long as the graphics card supports the display function. The dual graphics card displays the image in a sink output manner. The image information sent for display is taken from the shared memory buffer area exported by the source output function of the main graphics card. The single graphics card sends the image directly from the memory buffer of Xorg.
[0043] In this embodiment, step S4 includes: Configure the driver mode corresponding to the DDX driver of the main graphics card to dumb mode; Create a shared video memory area from the main graphics card and generate a file handle for operating the shared video memory area; The file handle is imported into the secondary graphics card, so that the secondary graphics card sets the shared graphics memory area as the graphics memory of the secondary graphics card, so as to realize the simultaneous display work of the primary and secondary graphics cards.
[0044] Among them, the driver mode corresponding to the DDX driver of the main graphics card is configured as dumb mode, including: Adjust the DRM initialization mode setting function corresponding to the DDX driver of the main graphics card from the default glamor initialization interface to call the dumb initialization interface, which is used for the initialization setting of the image in the Xorg memory; The shared pixel mapping function corresponding to the image in Xorg memory and the shared pixel mapping backend storage function that call the glamor interface by default are adjusted to call the dumb interface.
[0045] In this embodiment, the specific process of step S4 is as follows Figure 2 First, adjust the glamor initialization interface glamor_init called by the DRM initialization mode setting function drmmode_init by default to the dumb initialization interface dumb_screen_init, so as to configure the driving mode corresponding to the DDX driver of the main graphics card to the dumb mode; Secondly, configure the shared pixel mapping function msSharePixmapBacking corresponding to the image Pixmap in Xorg memory to call the interface dumb_bo_create to create a whole shared video memory area from the main graphics card, and call the interface dumb_bo_map to bind and map the image buffer requested by Xorg, and finally call the interface drmPrimeHandle to return the file handle of the shared video memory area to Xorg; Finally, configure the shared pixel map backend storage function msSetSharedPixmapBacking corresponding to the image Pixmap in the Xorg memory to call the interface drmPrimeHandle to import the file handle of the shared video memory area obtained in Xorg to the secondary graphics card, so that the secondary graphics card sets the shared video memory area as the video memory of the secondary graphics card, so as to realize that Xorg's image buffer is sent to the primary graphics card and the secondary graphics card at the same time, so that the primary and secondary graphics cards can display at the same time.
[0046] In a specific application embodiment, it is necessary to adjust drmmode_init from the default glamor display initialization to dumb display initialization, so that Modesetting can realize video memory sharing through dumb (Modesetting uses the drm library libdrm to call the dumb buffer video memory sharing technology in the gem framework in the kernel to realize simultaneous display of multiple graphics cards). By default, drmmode_init supports glamor and directly calls the glamor initialization interface glamor_init interface function. This interface is a general interface function. The specific interface registration callback part is related to the corresponding hardware graphics card and is generally implemented by the corresponding graphics card manufacturer. The dumb_screen_init interface function is called when glamor is not supported. This interface mainly implements the initialization setting function of the X11 screen (display) and the image Pixmap in the memory of Xorg.
[0047] Then, adjust the code of msSharePixmapBacking and msSetSharedPixmapBacking in the image Pixmap in Xorg's memory, and change it from the default glamor mode to dumb mode. The implementation of glamor is to call the glamor_shareable_fd_from_pixmap interface, and the implementation of dumb is to call the custom interface dumb_shareable_fd_from_pixmap of dumb. Dumb_shareable_fd_from_pixmap actually calls the general interfaces dumb_bo_create, drmPrimeHandle, dumb_bo_map, etc. Among them, the msSharePixmapBacking function mainly creates a whole block of shared video memory area from the main graphics card (implemented by calling the general interface dumb_bo_create) and binds and maps it with the image buffer applied by Xorg (implemented by calling the general interface dumb_bo_map), and returns the file handle that can operate this area (implemented by calling the general interface drmPrimeHandle) to the Xorg service. The msSetSharedPixmapBacking function is mainly used to import the file handle of the main graphics card's video memory operation obtained in Xorg to the corresponding slave graphics card device (implemented by calling the general interface drmmode_SetSlaveBO), and the slave graphics card sets the video memory as the graphics card's video memory. In this way, the image buffer of the Xorg upper layer operation can be sent to the main graphics card and the slave graphics card at the same time, so as to achieve the effect of the main and slave graphics cards displaying at the same time.
[0048] After the configuration is complete, you can verify the dual graphics card effect through xrandr: The two corresponding providers can be viewed through the command xrandr --listproviders.
[0049] You can use the xrandr --output command to set different graphics cards for extended display or mirrored display, and the display output meets the xrandr setting expectations. For example, graphics card A has an output interface DP, and graphics card B has a display output interface VGA.
[0050] Use the command xrandr --output DP --same-as VGA --auto to set graphics card A and graphics card B to display on the same screen. You can observe that the images of the monitors connected to DP and VGA are the same.
[0051] Use the command xrandr --output VGA --right-of DP --auto to set the VGA output of graphics card B as the right extended display of the DP output of graphics card A. It can be observed that the image display contents of the monitors connected to DP and VGA are different and the VGA display content extends the DP content to the right.
[0052] The present invention also provides a dual graphics card display system based on the Feiteng platform, including a processor and a memory connected to each other, and the processor is programmed or configured to execute the dual graphics card display method based on the Feiteng platform.
[0053] The present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be programmed or configured by a microprocessor to execute the dual graphics card display method based on the Feiteng platform.
[0054] The present invention also provides a computer program product, including a computer program / instruction, which is programmed or configured to execute the above-mentioned dual graphics card display method based on the Feiteng platform through a processor.
[0055] The system and medium of the present invention correspond to the above method and also have the advantages described in the above method.
[0056] The present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiment can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media include: any entity or device that can carry computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. The memory is used to store computer programs and / or modules. The processor implements various functions by running or executing computer programs and / or modules stored in the memory, and calling data stored in the memory. The memory may include a high-speed random access memory and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0057] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A dual graphics card display method based on Feiteng platform, characterized in that: include: Step S1, configuring the dual graphics cards as a main graphics card and a secondary graphics card respectively; Step S2, configuring the graphics card drivers of the main graphics card and the secondary graphics card as DDX drivers in the graphics display server Xorg; Step S3, adding a configuration code for enabling source output so that the main graphics card supports the source output function; Step S4, changing the driving mode corresponding to the DDX driver of the main graphics card from glamor to dumb, and sharing the video memory of the main graphics card with the secondary graphics card to achieve simultaneous display work of the main and secondary graphics cards.
2. The dual graphics card display method based on the Feiteng platform according to claim 1, characterized in that: In step S1, the main graphics card is a Feiteng integrated graphics card, and the secondary graphics card is an external graphics card that matches the Feiteng integrated graphics card.
3. The dual graphics card display method based on the Feiteng platform according to claim 2 is characterized in that: The step S2 comprises: Configure the configuration option of the graphics card driver name in the configuration file corresponding to the Feiteng integrated graphics card as the setting value of the Feiteng platform graphics card driver, and configure the driver configuration option as the Modesetting out-of-core driver in Xorg; The configuration option of the graphics card driver name in the configuration file corresponding to the external graphics card is configured as the setting value of the external graphics card driver, and the driver configuration option is configured as the Modesetting out-of-core driver in Xorg.
4. The dual graphics card display method based on the Feiteng platform according to claim 1, characterized in that: The step S3 comprises: A configuration code for enabling source output is added to the pre-initialization code of the main graphics card DDX driver to enable a flag bit for source output, so that the main graphics card supports the source output function.
5. The dual graphics card display method based on the Feiteng platform according to claim 1, characterized in that: The step S4 comprises: The driving mode corresponding to the DDX driver of the main graphics card is configured as dumb mode; Creating a shared video memory area from the main video card, and generating a file handle for operating the shared video memory area; The file handle is imported into the secondary graphics card, so that the secondary graphics card sets the shared graphics memory area as the graphics memory of the secondary graphics card, so as to realize the simultaneous display work of the primary and secondary graphics cards.
6. The dual graphics card display method based on the Feiteng platform according to claim 5, characterized in that: In the step S4, configuring the driving mode corresponding to the DDX driver of the main graphics card to a dumb mode includes: The DRM initialization mode setting function corresponding to the DDX driver of the main graphics card is adjusted from the default glamor initialization interface to call the dumb initialization interface, and the dumb initialization interface is used for initialization setting of images in the Xorg memory; The shared pixel mapping function corresponding to the image in Xorg memory and the shared pixel mapping backend storage function that call the glamor interface by default are adjusted to call the dumb interface.
7. The dual graphics card display method based on the Feiteng platform according to claim 6, characterized in that: In the step S4, the glamor initialization interface glamor_init called by the DRM initialization mode setting function drmmode_init by default is adjusted to the dumb initialization interface dumb_screen_init, so as to configure the driving mode corresponding to the DDX driver of the main graphics card to the dumb mode; Configure the shared pixel mapping function msSharePixmapBacking corresponding to the image Pixmap in Xorg memory to call the interface dumb_bo_create to create a whole shared video memory area from the main graphics card, and call the interface dumb_bo_map to bind and map the image buffer requested by Xorg, and finally call the interface drmPrimeHandle to return the file handle of the shared video memory area to Xorg; The shared pixel map backend storage function msSetSharedPixmapBacking corresponding to the image Pixmap in the Xorg memory is configured to call the interface drmPrimeHandle to import the file handle of the shared video memory area obtained in Xorg to the secondary graphics card, so that the secondary graphics card sets the shared video memory area as the video memory of the secondary graphics card, so as to realize that the image buffer of Xorg is sent to the primary graphics card and the secondary graphics card at the same time, so that the primary and secondary graphics cards can display at the same time.
8. A dual-graphics card display system based on the Feiteng platform, comprising a processor and a memory connected to each other, characterized in that: The processor is programmed or configured to execute the dual graphics card display method based on the Feiteng platform as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored therein, characterized in that: The computer program is used to be programmed or configured by a microprocessor to execute the dual graphics card display method based on the Feiteng platform as described in any one of claims 1 to 7.
10. A computer program product comprising a computer program / instructions, characterized in that The computer program / instruction is programmed or configured to execute the dual graphics card display method based on the Feiteng platform as described in any one of claims 1 to 7 through a processor.
Citation Information
Cited By
Sensitive file control method based on Linux
CN120234821A