Graph processing method, system on chip, storage medium and electronic device

By creating a surface associated with a direct memory access buffer within the system-on-a-chip (SoC), graphics data can be processed directly, solving the problem of low graphics processing efficiency in low-end SoCs and achieving memory optimization and improved graphics refresh efficiency.

CN121304429BActive Publication Date: 2026-02-17JINGCHEN SEMICON SHENZHEN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511794881.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-02-17
Estimated Expiration
2045-12-02

AI Technical Summary

Technical Problem

The lack of GPU in low-end SoCs leads to low graphics processing efficiency. The existing DirectFB graphics library has high memory consumption, low refresh rate and low response performance, which makes it difficult to meet the graphics display performance and system resource conservation requirements of embedded devices.

Method used

By creating a surface associated with a direct memory access buffer within the system-on-a-chip (SoC), graphics data in the buffer can be processed directly, avoiding CPU involvement, optimizing memory usage, and improving graphics refresh efficiency.

Benefits of technology

By directly manipulating surfaces and buffers, memory usage is optimized, graphics refresh efficiency and responsiveness are improved, and the efficiency and flexibility of graphics processing are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121304429B_ABST
    Figure CN121304429B_ABST
Patent Text Reader

Abstract

The application discloses a kind of graphic processing method, system chip, storage medium and electronic equipment, graphic processing method is used for the system chip without graphics processing unit, graphic processing method includes: receiving the calling instruction of upper application, calling instruction includes the graphics processing demand of target display picture;Based on graphics processing demand, create at least one surface provided to application drawing;For surface, graphics data stored in its associated direct memory access buffer is subjected to graphics processing operation, and the graphics after graphics processing operation is obtained;The display data corresponding to target display picture is obtained by merging the graphics after graphics processing operation, and display data is sent to display end.The method can create the surface of drawing according to graphics processing demand, and the graphics data stored in the direct memory access buffer associated with the surface is subjected to graphics processing operation, realizes memory occupation optimization, improves graphic refresh efficiency and enhances the response performance of graphics processing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of graphics processing, and particularly relates to a graphics processing method, a system on chip, a computer readable storage medium, a computer program product and an electronic device. BACKGROUND

[0002] In the prior art, low-end SOC (System on Chip) lacks GPU (Graphics Processing Unit), which leads to low graphics processing efficiency. The existing technology performs graphics processing on low-end SOC through DirectFB (Direct Frame Buffer), but the existing DirectFB graphics library has technical defects such as high memory occupation, low refresh efficiency, and low graphics processing response performance when applied to such hardware platforms. SUMMARY

[0003] The present application aims to at least solve one of the technical problems in the prior art. To this end, one object of the present application is to provide a graphics processing method, which can create a drawing surface according to the graphics processing requirement, perform graphics processing operation on the graphics data stored in the direct memory access buffer associated with the surface, and realize memory occupation optimization, improve graphics refresh efficiency and enhance the response performance of graphics processing.

[0004] A second object of the present application is to provide a system on chip.

[0005] A third object of the present application is to provide a computer readable storage medium.

[0006] A fourth object of the present application is to provide a computer program product.

[0007] A fifth object of the present application is to provide an electronic device.

[0008] To solve the above problems, the first aspect of the present application provides a graphics processing method for a system on chip without a graphics processing unit, which receives a calling instruction of an upper layer application, the calling instruction including a graphics processing requirement of a target display picture; based on the graphics processing requirement, at least one surface for drawing by an application is created, each surface being associated with at least one direct memory access buffer, the direct memory access buffer storing graphics data required for generating the target display picture; for the surface, graphics processing operation is performed on the graphics data stored in the direct memory access buffer associated with the surface, to obtain graphics after graphics processing operation; the graphics after graphics processing operation are merged to obtain display data corresponding to the target display picture, and the display data is sent to a display end.

[0009] According to the graphic processing method of the embodiment of the present application, after receiving the graphic processing requirement of the target display screen sent by the upper application, at least one surface provided for the application to draw is created according to the graphic processing requirement, the surface is associated with the direct memory access buffer, the surface is equivalent to a "virtual canvas", the graphic data stored in the direct memory access buffer associated with the surface can be directly subjected to graphic processing operation based on the upper instruction, the central processing unit is not needed, and the memory does not need to store the data processing program, only the surface needs to be established when there is a graphic processing requirement, the memory occupation is optimized, and based on the requirement, multiple surfaces can simultaneously perform image processing, the graphic refreshing efficiency is improved, and the response performance of the graphic processing is enhanced.

[0010] In some embodiments, based on the graphic processing requirement, creating at least one surface provided for the application to draw includes: based on the graphic processing requirement, applying at least one direct memory access buffer; and based on the address and graphic attribute parameters of the at least one direct memory access buffer, creating at least one surface, so that the surface is associated with the at least one direct memory access buffer; wherein the graphic attribute parameters are determined based on the graphic processing requirement, hardware adaptation and form conversion of the graphic processing requirement to the system-on-chip, management requirement of the surface, and constraint of hardware capability.

[0011] In some embodiments, based on the graphic processing requirement, creating at least one surface provided for the application to draw includes: based on the graphic processing requirement, creating multiple surfaces, the multiple surfaces including a first surface and at least one second surface; and for the surface, performing graphic processing operation on the graphic data stored in the direct memory access buffer associated with the surface to obtain graphic after graphic processing operation, including: for the at least one second surface, performing graphic processing operation on the graphic data stored in the direct memory access buffer associated with the surface to obtain graphic after graphic processing operation; and merging the graphic after graphic processing operation to obtain display data corresponding to the target display screen, and sending the display data to a display end, including: for the second surface, merging the graphic after graphic processing operation to obtain the display data; and for the first surface, sending the display data to the display end.

[0012] In some embodiments, for the first surface, the display data stored in the direct memory access buffer associated with the display data is bound to the memory manager of the display end for display.

[0013] In some embodiments, the method further comprises: after the surface completes the graphics processing operation, canceling the association between the surface and the direct memory access buffer associated with the surface, and destroying the surface.

[0014] In some embodiments, the method further comprises: for the surface performing the graphics processing operation, sending the address of the direct memory access buffer associated with the surface to the graphics acceleration module built-in the system level chip, so as to complete hardware acceleration of the graphics processing operation by the graphics acceleration module.

[0015] In some embodiments, the method further comprises: creating an external interface; and for the external interface, driving the direct memory access buffer to store the graphics data of the upper layer application in response to a call of the upper layer application.

[0016] In some embodiments, the method further comprises: decoding the graphics data of the upper layer application; and storing the graphics data after the decoding in the direct memory access buffer.

[0017] The second aspect embodiment of the present application provides a system level chip without a graphics processing unit, which is used to implement the graphics processing method in the above embodiments.

[0018] According to the system level chip in the embodiments of the present application, the system level chip receives a call instruction sent by an upper layer application in real time, and after receiving a graphics processing requirement of a target display screen sent by the upper layer application, creates at least one surface for drawing by the application according to the graphics processing requirement, and the surface is associated with a direct memory access buffer. The surface is equivalent to a "virtual canvas", and can directly perform a graphics processing operation on graphics data stored in the direct memory access buffer associated with the surface based on an upper layer instruction, without a central processing unit, and the memory does not need to store a data processing program. Only when there is a graphics processing requirement, the surface is established, thereby optimizing memory occupation, and based on the requirement, multiple surfaces can simultaneously perform image processing, thereby improving graphics refreshing efficiency and enhancing response performance of graphics processing.

[0019] In some embodiments, the system level chip further comprises: a graphics acceleration module, which is used to perform hardware acceleration of a graphics processing operation.

[0020] The third aspect embodiment of the present application provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the graphics processing method in the above embodiments is implemented.

[0021] The fourth aspect of the present application provides a computer program product, which comprises a computer program stored on a computer readable storage medium, and the computer program comprises program instructions, which, when executed by a computer, cause the computer to perform the graphic processing method described in the above embodiments.

[0022] The fifth aspect of the present application provides an electronic device, which comprises the system on chip described in the above embodiments, or the electronic device is used to implement the graphic processing method described in the above embodiments.

[0023] According to the electronic device and the system on chip, the system on chip receives the calling instruction sent by the upper application in real time, and after receiving the graphic processing requirement of the target display screen sent by the upper application, at least one surface provided for the application to draw is created according to the graphic processing requirement, the surface is associated with the direct memory access buffer, the surface is equivalent to a virtual canvas, the graphic processing operation can be directly performed on the graphic data stored in the direct memory access buffer associated with the surface based on the upper instruction, the central processing unit is not needed, and the memory does not need to store the data processing program, only the surface needs to be established when there is a graphic processing requirement, the memory occupation is optimized, the graphic refreshing efficiency is improved, and the response performance of the graphic processing is enhanced.

[0024] In some embodiments, the electronic device further comprises a display module connected with the system on chip, and used for displaying the image.

[0025] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS

[0026] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, including the appended drawings.

[0027] Figure 1 is a flowchart of a graphic processing method according to an embodiment of the present application;

[0028] Figure 2 is a schematic diagram of graphic processing according to an embodiment of the present application;

[0029] Figure 3 is a schematic diagram of surface creation and termination according to an embodiment of the present application;

[0030] Figure 4 is a schematic diagram of surface interaction with other modules according to an embodiment of the present application;

[0031] Figure 5This is a flowchart of a graphic processing method according to an embodiment of the present invention;

[0032] Figure 6 This is a structural block diagram of a system-on-a-chip according to an embodiment of the present invention;

[0033] Figure 7 This is a structural block diagram of an electronic device according to an embodiment of the present invention.

[0034] Figure label:

[0035] 200 electronic devices;

[0036] System-on-a-chip 100; display module 210; graphics acceleration module 110. Detailed Implementation

[0037] The embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. The embodiments of the present invention are described in detail below.

[0038] The lack of a GPU (Graphics Processing Unit) in existing low-end SoCs (System on Chip) leads to low graphics processing efficiency. While DirectFB (Direct Frame Buffer) is used for graphics processing in low-end SoCs, the existing DirectFB graphics library suffers from technical defects such as high memory consumption, low refresh rate, low graphics processing response performance, and poor resource utilization on such hardware platforms. It is difficult to meet the needs of embedded devices for both high graphics display performance and system resource conservation.

[0039] To address the above problems, a first aspect of the present invention provides a graphics processing method for a system-on-a-chip that does not have a graphics processing unit. This method creates a drawing surface according to graphics processing requirements, performs graphics processing operations on the graphics data stored in the direct memory access buffer associated with the surface, optimizes memory usage, improves graphics refresh efficiency, and enhances the response performance of graphics processing.

[0040] The following is for reference. Figure 1 This invention describes a graphics processing method according to a first aspect of the present invention. The graphics processing method proposed in this invention is used in a system-on-a-chip configured with a graphics processing engine, which can be used to implement the graphics processing method of this application.

[0041] In this context, a graphics processing engine refers to the hardware and software system or core module responsible for generating, manipulating, and rendering visual content (images, graphics, and videos). For example... Figure 1 As shown, the method includes at least steps S1 to S4.

[0042] Step S1, receiving a calling instruction of an upper application, the calling instruction including a graphic processing requirement of a target display picture.

[0043] Specifically, the upper application can be understood as an application calling a graphic processing method, the calling instruction including a graphic processing requirement of a target display picture, the target display picture can be understood as a picture to be displayed after graphic processing by the graphic processing method; the graphic processing requirement of the target display picture is used to determine what graphics are to be processed and what effects are to be achieved after processing, and all requirements in the graphic processing process will finally be converted into instructions executable by the graphic processing engine.

[0044] For example, the graphic processing requirement of the target display picture determines that the graphic processing actions include basic drawing, image operation, layer processing and format conversion, etc.; the processing effects achieved by the graphic processing requirement of the target display picture are used to define qualified standards, such as frame rate requirement, smoothness requirement, response speed and visual quality, etc., which can be realized through surface operation.

[0045] Step S2, based on the graphic processing requirement, creating at least one surface provided for the application to draw, each surface being associated with at least one direct memory access buffer, the direct memory access buffer storing graphic data required to generate the target display picture.

[0046] Specifically, after receiving the calling instruction of the upper application, based on the graphic processing requirement, at least one surface provided for the application to draw is created, the surface can be understood as a "virtual canvas", the virtual canvas being associated with a direct memory access buffer, data in the direct memory access buffer can be mapped to the surface, and operation of the surface is actually operation of data of the mapped direct memory access buffer.

[0047] In an embodiment, the surface provided for the application to draw can be multiple or one, if there is only one graphic processing requirement, only one surface needs to be created, if there are multiple graphic processing requirements, multiple surfaces can be created according to the requirements, for example, if the graphic has an operation processing requirement, the operation processing requirement is only image scaling, one surface is created, if the operation processing requirement has scaling, cropping and mirroring requirements, three surfaces are created, each requirement corresponding to one surface.

[0048] The surface provided to the application for drawing is not a simple storage medium, and the surface mainly includes two parts: metadata (description information) and a data storage area (actual storage area), and the graphic data exists in the data storage area corresponding to the surface, and the data storage area is actually a direct memory access buffer associated with the surface. That is, the surface is equivalent to a "management container", and the direct memory access buffer is the "underlying storage hardware", and the graphic data in the surface finally exists in the physical memory corresponding to the direct memory access buffer.

[0049] Since the surface itself is an "abstract concept at the software level", each surface is associated with at least one direct memory access buffer, and the direct memory access buffer stores the graphic data required to generate the target display picture; the graphic data exists in the direct memory access buffer, and the surface is used to manage and point to the storage address of the data.

[0050] The direct memory access buffer is a pre-allocated physical memory area that allows peripherals to bypass the CPU (Central Processing Unit, CPU) and directly read and write system memory, and is used for efficient data transmission between peripherals and memory to improve efficiency. Each surface is associated with at least one direct memory access buffer, and each surface can read and write graphic data through the associated direct memory access buffer, bypassing the central processor, achieving memory occupancy optimization, and improving graphic processing efficiency.

[0051] Step S3, for the surface, the graphic data stored in the direct memory access buffer associated with the surface is subjected to a graphic processing operation, and the graphic after the graphic processing operation is obtained.

[0052] Specifically, based on the graphic processing requirement, one or more surfaces provided to the application for drawing are created, each surface obtains graphic data through the associated direct memory access buffer, the surface performs graphic processing based on the obtained data, and stores the processed graphic in the direct memory access buffer. The graphic processing operation can be image copying, image mixing, image scaling, color keying, and format conversion, etc. For example, the graphic has scaling requirements, a surface is created based on the graphic processing requirement, the surface obtains graphic data through the associated direct memory access buffer, the surface performs scaling based on the obtained data, and stores the scaled graphic in the direct memory access buffer.

[0053] Step S4, the graphic after the graphic processing operation is merged to obtain display data corresponding to the target display picture, and the display data is sent to the display end.

[0054] Specifically, the surface provided to the application for drawing can be multiple or one. If there are multiple graphics processing requirements, multiple surfaces can be created according to the requirements. After the graphics data stored in the associated direct memory access buffer in the multiple surfaces is subjected to graphics processing operations, the graphics after the graphics processing operations of the multiple surfaces are combined to obtain display data, that is, pixel data, of a target display screen, and the display data is sent to a display end for display.

[0055] For example, if the graphics have operation processing requirements, if the operation processing requirements have scaling, clipping, and mirroring requirements, three surfaces are created at this time, one surface for each requirement. After the graphics data stored in the associated direct memory access buffer in the multiple surfaces is subjected to corresponding graphics processing operations, the scaled image, the clipped image, and the mirrored image are combined to obtain display data of a target display screen, and the display data is sent to a display end. The image displayed by the display end is the scaled, clipped, and mirrored image.

[0056] According to the graphics processing method, after receiving the graphics processing requirement of the target display screen sent by the upper application, at least one surface provided to the application for drawing is created according to the graphics processing requirement. The surface is associated with a direct memory access buffer. The surface is equivalent to a "virtual canvas" and can directly perform graphics processing operations on the graphics data stored in the associated direct memory access buffer based on the upper instruction. The central processing unit is not required, and the memory does not need to store a data processing program. Only when there is a graphics processing requirement, the surface is established. The memory occupation is optimized. In addition, multiple surfaces can simultaneously perform image processing based on the requirement, the graphics refresh efficiency is improved, and the response performance of the graphics processing is enhanced.

[0057] In some embodiments, based on the graphics processing requirement, at least one surface provided to the application for drawing is created, including:

[0058] Based on the graphics processing requirement, at least one direct memory access buffer is applied for. At least one surface is created based on the address of the at least one direct memory access buffer and a graphics attribute parameter, so that the surface is associated with the at least one direct memory access buffer. The graphics attribute parameter is determined based on the graphics processing requirement, hardware adaptation and form conversion of the graphics processing requirement to a system-on-chip, management requirement of the surface, and constraint of hardware capability.

[0059] Specifically, based on the graphics processing requirement, one or more surfaces are created for the application to draw graphics, since the surface itself is an "abstract concept at the software level", each surface is associated with at least one direct memory access buffer, and the corresponding direct memory access buffer is created for each surface; if the graphics has only one processing requirement, only one direct memory access buffer is applied, and if the graphics has multiple processing requirements, the corresponding direct memory access buffer is applied according to the number of processing requirements; the surface is created based on the address of each direct memory access buffer and the graphics attribute parameters, so that each surface is correspondingly associated with at least one direct memory access buffer, and the surface can correctly access the graphics data in the direct memory access buffer.

[0060] The surface is created based on the address of the direct memory access buffer, so that the created surface can obtain the graphics data stored in the direct memory access buffer through the corresponding address; the graphics processing requirement includes basic drawing, image operation, layer processing, and format conversion; the graphics processing requirement is used for checking the feasibility of hardware adaptation and format conversion of the system-on-chip, checking whether the format / resolution of the application request is within the hardware support range, and converting the application requirement into a hardware executable form; the management requirement of the surface and the constraint of the hardware capability are used to add the information required for adding the surface (such as surface ID, reference count), limit the maximum resolution and format of the surface; the graphics attribute parameters are determined through the graphics processing requirement, the hardware adaptation and format conversion of the system-on-chip, the management requirement of the surface, and the constraint of the hardware capability, and the surface is created based on the address of the direct memory access buffer and the graphics attribute parameters.

[0061] In some embodiments, based on the graphics processing requirement, at least one surface is created for the application to draw graphics, including: based on the graphics processing requirement, a plurality of surfaces are created, the plurality of surfaces including a first surface and at least one second surface; for the surface, the graphics data stored in the direct memory access buffer associated with the surface is subjected to a graphics processing operation to obtain graphics after the graphics processing operation, including: for at least one second surface, the graphics data stored in the direct memory access buffer associated with the surface is subjected to a graphics processing operation to obtain graphics after the graphics processing operation; the graphics after the graphics processing operation is merged to obtain display data corresponding to a target display picture, and the display data is sent to a display end, including: for the second surface, the graphics after the graphics processing operation is merged to obtain the display data; for the first surface, the display data is sent to the display end.

[0062] Specifically, as shown in Figure 2 a plurality of surfaces are created based on the graphics processing requirement, the plurality of surfaces including a first surface and at least one second surface, the surface created based on the graphics processing requirement can be multiple or one, if the graphics has only one requirement, only the first surface and one second surface need to be created, that is Figure 2In the shown embodiment, only one first surface and one second surface are created, at this time, the second surface performs a graphic processing operation on the graphic data stored in the direct memory access buffer associated with the second surface to obtain the graphic after the graphic processing operation. If there are multiple requirements, multiple surfaces can be created according to the requirements, for example Figure 2 As shown, multiple second surfaces are created based on requirements, and one first surface is created. The first surface can be understood as a surface that is finally used as a display output carrier, that is, a main surface. The second surface can be understood as a surface used to implement a corresponding graphic processing operation. For example, if the upper application has scaling, format conversion and graphic decoding requirements, multiple surfaces are created based on the requirements, for example Figure 2 As shown, three second surfaces are created, one second surface for each requirement, and one first surface is created. Each second surface performs a graphic processing operation on the graphic data stored in the direct memory access buffer associated with the second surface to obtain the graphic after the graphic processing operation. The graphics after the graphic processing operation of each second surface are merged to obtain display data. The display data can be understood as data that needs to be finally displayed and output. The display data is the image after the final scaling, format conversion and graphic decoding. The first surface is used as a display output carrier to send the display data processed by the multiple second surfaces to a display end.

[0063] In some embodiments, for the first surface, the file identifier of the direct memory access buffer storing the display data associated with the first surface is bound to the memory manager of the display end for display.

[0064] Specifically, as shown in Figure 2 According to the graphic processing requirements, multiple second surfaces are created, and one first surface is created. After each second surface completes a graphic processing operation, the corresponding data is stored in the associated direct memory access buffer,

[0065] and the graphics after the graphic processing operation of each second surface are merged to obtain display data of a corresponding target display screen. The display data after the processing operation is transmitted to the first surface. The first surface obtains the file identifier of the direct memory access buffer associated with the display data and binds the file identifier to the memory manager of the display end. The file identifier of the direct memory access buffer is used to reference the graphic data stored in the direct memory access buffer and is used for data sharing between different systems. The display end can be understood as a device that finally displays graphics, for example, the display end can be a display. The memory manager of the display end can be a DRM (Direct Rendering Manager, direct rendering manager). The direct rendering manager manages the output of the display end, for example, resolution, refresh rate and multi-screen display.

[0066] For example, when multiple surfaces are created based on the graphic processing requirements of an upper layer application, a first surface is created as a display output carrier, and after graphic processing is completed, the graphic content is transmitted to the first surface through a blit (Block Image Transfer) operation, which refers to the fast copying of image data in one block of memory to another target area, and after synchronization (sync) is completed, the display end is refreshed. Synchronization is used to display the display device after the surface completes graphic processing. The surface and the display device are synchronized to avoid the display device reading data in advance when the surface has not been completed. The graphic display link is implemented through a direct rendering manager in a Linux display framework. Specifically, the file descriptor of the direct memory access buffer corresponding to the first surface is bound to the memory manager, and then the display device is driven to output images.

[0067] In some embodiments, after the surface completes a graphic processing operation, the association between the surface and the direct memory access buffer associated therewith is canceled, and the surface is destroyed.

[0068] Specifically, as shown in Figure 3 is a schematic diagram of the creation and termination of a surface. When a surface is created, a direct memory access buffer is applied based on the requirements of an upper layer application, and the surface is created based on the address and graphic attribute parameters of the direct memory access buffer. The surface binds the identifier of the direct memory access buffer corresponding to the graphic content to the memory manager of the target display device, the memory manager drives the display end to output images, and the display end finally displays the processed graphics. After the surface completes a graphic processing task, it needs to be terminated. The graphic processing task includes graphic processing operations and graphic display output. When the surface is terminated, the association between each surface and the corresponding direct memory access buffer is canceled, and the surface is destroyed, which facilitates the creation of a surface for the next graphic processing, and the identifiers bound by the memory manager are cleared, and the display end is closed.

[0069] In some embodiments, the graphic processing method further includes: for a surface performing a graphic processing operation, sending the address of the direct memory access buffer associated therewith to a graphic acceleration module built in a system-level chip, to complete hardware acceleration of the graphic processing operation through the graphic acceleration module.

[0070] Specifically, the system-level chip is built with a graphic acceleration module, and the surface transmits the address of the direct memory access buffer associated therewith to the graphic acceleration module when performing graphic processing. The graphic acceleration module directly accesses the address to complete hardware acceleration of the graphic processing operation without the participation of the central processing unit, achieving high-performance, low-latency, and high-efficiency graphic processing.

[0071] The graphics acceleration module is a separate hardware module specially responsible for 2D graphics acceleration operations such as clipping, scaling, color conversion, and the like, and the surface is a software abstract carrier of graphics data, and the surface cooperates closely with the graphics acceleration module; the surface provides graphics data and parameter information required by the graphics acceleration module for operation, and the graphics acceleration module executes efficient processing on the graphics data associated with the surface as a hardware accelerator, and finally writes the processing result back to the direct memory access buffer area bound by the surface.

[0072] For example, as shown in FIG. 1, a plurality of second surfaces are created based on graphics processing requirements, and a first surface is created at the same time, each second surface sends graphics data and parameter information to the graphics acceleration module, the graphics acceleration module executes efficient processing on the graphics data associated with each second surface as a hardware accelerator, and finally writes the processing result back to the direct memory access buffer area bound by each second surface, to complete the graphics processing operation. Figure 2

[0073] The interaction between the surface and the graphics acceleration module and the target display device is as shown in FIG. 2, the surface sends parameters of the direct memory access buffer area to the graphics acceleration module, the parameters include attributes, memory layout and access parameters of the direct memory access buffer area, and the surface also sends processing instructions to the graphics acceleration module, and the graphics acceleration module transmits the data after operation to the corresponding surface. The surface directly renders an identifier of the direct memory access buffer area to a memory manager of the display end, and the memory manager manages the output of the display end. Figure 4

[0074] In some embodiments, the graphics processing method further includes: creating an external interface; and driving the direct memory access buffer area to store the graphics data of the upper layer application in response to a call of the upper layer application to the external interface.

[0075] Specifically, as shown in FIG. 3, the upper layer application calls the graphics processing method through the created external interface, drives the direct memory access buffer area to store the graphics data of the upper layer application, creates a surface based on the address of the direct memory access buffer area and the graphics attribute parameters, and associates each surface with the address of the direct memory access buffer area, to ensure that the surface can correctly access the graphics data of the direct memory access buffer area. Figure 2

[0076] In some embodiments, the graphics processing method further includes: decoding the graphics data of the upper layer application; and storing the graphics data after decoding in the direct memory access buffer area.

[0077] ​​​Specifically, the upper-layer application invokes the graphics processing method through the created external interface, and drives the direct memory access buffer to store the graphics data of the upper-layer application. Before the direct memory access buffer stores the graphics data of the upper-layer application, the graphics data needs to be decoded. When the graphics data is decoded, the open source graphics decoding library is used to decode and process the graphics data of the upper-layer application. The open source graphics decoding library refers to a software library whose source code is open, can be freely used and modified, and is used to convert the original graphics data into bitmap data in a pixel format, so as to be processed in the graphics processing engine subsequently.

[0078] For example, the application provides a complete 2D (Two-Dimensional, two-dimensional) graphics processing scheme, as shown in Figure 2 which covers surface management, direct memory access buffer management, graphics acceleration processing (such as graphics copying, graphics mixing, scaling, color keying, format conversion, etc.), graphics display, and graphics decoding functions.

[0079] In a specific implementation, the application supports multi-surface management, each surface is associated with a direct memory access buffer for storing graphics data. Graphics processing operations can be performed between multiple surfaces, and hardware acceleration of the graphics processing task is completed by means of a graphics acceleration module built in a system-level chip.

[0080] In addition, the application also integrates a graphics decoding function, supports decoding processing of common graphics formats such as JPEG, MPEG, PNG, GIF, BMP, etc. by integrating an open source graphics decoding library. The decoded graphics data can be directly filled into a specified surface, realizing seamless connection with a graphics processing engine, and improving the flexibility and functional integrity of graphics processing.

[0081] The graphics processing process is as shown in Figure 5 .

[0082] In step S01, at least one direct memory access buffer is applied based on a graphics processing requirement.

[0083] In step S02, a first surface and a second surface are created based on the address of the at least one direct memory access buffer and a graphics attribute parameter.

[0084] In step S03, each second surface performs a graphics processing operation on the graphics data stored in the direct memory access buffer associated with the second surface, and obtains graphics after the graphics processing operation.

[0085] In step S04, the graphics of each second surface after the graphics processing operation are merged to obtain display data, and the display data is sent to the first surface.

[0086] In step S05, the first surface sends the display data to a display end for display.

[0087] In the process of graphic processing, the upper application calls the graphic processing method through the created external interface, drives the direct memory access buffer to store the graphic data of the upper application, creates the first surface and the plurality of second surfaces based on the address of the direct memory access buffer and the graphic attribute parameters, associates each surface with the address of the direct memory access buffer, ensures that the surface can correctly access the graphic data of the direct memory access buffer, and decodes the graphic data before storing the graphic data of the upper application in the direct memory access buffer; each second surface sends the graphic data and the parameter information to the graphic acceleration module, the graphic acceleration module as a hardware accelerator performs efficient processing on the graphic data associated with each second surface, finally writes the processing result back to the direct memory access buffer bound to each second surface, completes the graphic processing operation, merges the graphic after each second surface completes the graphic processing operation, obtains the display data of the corresponding target display picture, and simultaneously transmits the display data after the processing operation to the first surface, the first surface obtains the file identifier of the direct memory access buffer associated with the display data, and binds the file identifier to the memory manager of the display end, so that the display end displays the target display picture.

[0088] The application can effectively optimize the system memory occupation and efficiently manage the memory by directly managing the application and flow process of the direct memory access buffer, can significantly improve the graphic refresh and processing efficiency by accelerating the graphic operation with the graphic acceleration module, can accelerate the graphic processing, can output the graphic based on the direct rendering manager display framework, is convenient for managing the display layer and adapting the external display device with different resolutions, can support the decoding of mainstream picture formats and multi-format graphic decoding through the graphic decoding function, and can directly import the graphic data into the surface for subsequent graphic processing or display, and enhances the system graphic processing capability.

[0089] In summary, the application provides a graphic processing solution with low resource occupation, high processing efficiency, complete functions and strong adaptability in the application scene of the low-end system level chip without the graphic processing unit, has good practicability and industrialization prospect.

[0090] The second aspect embodiment of the application provides a system level chip, and the system level chip does not have a graphic processing unit. Figure 5 As shown in the figure, the system level chip is used to implement the graphic processing method.

[0091] According to the system on chip in the embodiment of the present application, the system on chip receives the calling instruction sent by the upper application in real time, and after receiving the graphic processing requirement of the target display screen sent by the upper application, at least one surface provided for the application to draw is created according to the graphic processing requirement, the surface is associated with the direct memory access buffer, the surface is equivalent to a virtual canvas, the graphic data stored in the direct memory access buffer associated with the surface can be directly processed according to the upper instruction, the central processing unit is not needed, and the memory does not need to store the data processing program, only the surface needs to be established when there is a graphic processing requirement, the memory occupation is optimized, and the graphic refreshing efficiency is improved, and the response performance of the graphic processing is enhanced.

[0092] In some embodiments, as shown in FIG. 1, the system on chip 100 includes a graphic acceleration module 110. Figure 6

[0093] The graphic acceleration module 110 is configured to accelerate the graphic processing operation by hardware.

[0094] Specifically, the surface sends the graphic data and the parameter information to the graphic acceleration module 110, the graphic acceleration module 110 serves as a hardware accelerator to perform efficient processing on the graphic data associated with each surface, and finally writes the processing result back to the direct memory access buffer bound to each surface to complete the hardware acceleration of the graphic processing operation.

[0095] The third aspect of the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program.

[0096] The fourth aspect of the present application provides a computer program product, and the computer program product includes a computer program stored in a computer readable storage medium.

[0097] The fifth aspect of the present application provides an electronic device, as shown in FIG. 2, the electronic device 200 includes the system on chip 100, or the electronic device 200 is configured to implement the graphic processing method. Figure 7

[0098] The electronic device 200 can be a smart set top box, a smart television or the like.

[0099] ​​According to the electronic device, the system-level chip receives the calling instruction sent by the upper-layer application in real time, and after receiving the graphic processing requirement of the target display screen sent by the upper-layer application, at least one surface provided for the application to draw is created according to the graphic processing requirement, the surface is associated with the direct memory access buffer, the surface is equivalent to a virtual canvas, the graphic data stored in the direct memory access buffer associated with the surface can be directly processed according to the upper-layer instruction, the central processing unit is not needed, and the memory does not need to store the data processing program, only the surface needs to be established when there is a graphic processing requirement, the memory occupation is optimized, and furthermore, multiple surfaces can simultaneously perform image processing based on the requirement, the graphic refreshing efficiency is improved, and the response performance of the graphic processing is enhanced.

[0100] In some embodiments, as shown in FIG. 2, the electronic device 200 further includes a display module 210 connected with the system-level chip 100, configured to display images. Figure 7

[0101] Specifically, after the system-level chip 100 completes the graphic processing, the surface in the system-level chip 100 binds the identifier of the direct memory access buffer associated with the processed graphic content to the memory manager of the display module 210, the memory manager manages the output of the display module 210, and the display module 210 displays the processed image.

[0102] In the description of the present specification, any process or method description in the flowchart or otherwise described herein can be understood as representing code modules, segments or parts of code that include one or more executable instructions for implementing the custom logic function or process, and the scope of the preferred embodiments of the present application includes additional implementation in which the functions are performed in different order, including essentially simultaneously, or in reverse order, according to the function involved, which should be understood by those skilled in the art to which the embodiments of the present application belong.

[0103] ​The logic and / or steps represented in flow diagrams or otherwise described herein, for example, can be considered as a sequence of instructions to implement logic functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. In the context of this specification, a "computer-readable medium" can be any means that can contain, store, communicate, propagate or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be a machine-readable storage device (e.g., magnetic, optical or other) a machine-readable storage diskette (e.g., floppy disk, optical disk, etc.), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), optical fibers, and a portable compact disc read-only memory (CDROM). Further, the computer-readable medium can even be paper or other suitable medium upon which the program is printed, as the program can be electronically captured, for example via the optical scanner of a device or other electronic capture device, and then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and stored in a computer memory.

[0104] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. As such, in some embodiments, the steps or methods can be implemented in a combination of hardware and software. If implemented in hardware, as in another embodiment, any of the above techniques can be implemented with or without the use of a programmable data processing apparatus, using any of the following technologies: discrete logic circuitry having logic gates for implementing logic functions upon an application of data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.

[0105] Those of skill in the art would understand that the steps or methods carried out in the above-described embodiments can be carried out by program instructions executed by a processor, and that the program instructions can be stored in a computer readable storage medium. The program instructions, when executed by the processor, can cause the processor to carry out the steps or methods of the embodiments.

[0106] In addition, each function unit in each embodiment of the present application can be integrated in one processing module, or each unit can be physically present separately, or two or more units can be integrated in one module. The integrated module can be realized in the form of hardware, or in the form of a software function module. When the integrated module is realized in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium.

[0107] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

[0108] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "exemplary embodiment", "example", "specific example" or "some examples" means that the specific features, substrates, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the exemplary description of the above terms does not necessarily mean the same embodiment or example.

[0109] Although the embodiments of the present application have been shown and described above, those skilled in the art can understand that various changes, modifications, replacements and variations can be made to these embodiments without departing from the principles and spirit of the present application, and the scope of the present application is defined by the claims and their equivalents.

Claims

1. A graphics processing method, characterized in that, For a system-on-a-chip that does not have a graphics processing unit, the graphics processing method includes: Receive a call instruction from an upper-layer application, the call instruction including the graphics processing requirements of the target display screen; Based on the graphics processing requirements, at least one surface is created for the application to draw on, including: creating multiple surfaces based on the graphics processing requirements, the multiple surfaces including a first surface and at least one second surface; each surface is associated with at least one direct memory access buffer, the direct memory access buffer storing the graphics data required to generate the target display screen; For the surface, a graphics processing operation is performed on the graphics data stored in the associated direct memory access buffer to obtain the graphics after the graphics processing operation; The graphics processed by the graphics operation are merged to obtain the display data corresponding to the target display screen, and the display data is sent to the display terminal.

2. The graphics processing method according to claim 1, characterized in that, Based on the aforementioned graphics processing requirements, at least one surface is created for the application to draw on, including: Based on the graphics processing requirements, request at least one of the direct memory access buffers; At least one surface is created based on the address and graphics attribute parameters of at least one of the direct memory access buffers, such that the surface is associated with at least one of the direct memory access buffers; The graphics attribute parameters are determined based on the graphics processing requirements, the hardware adaptation and form conversion of the graphics processing requirements to the system-on-a-chip, the management requirements of the surface, and the constraints of hardware capabilities.

3. The graphics processing method according to claim 1 or 2, characterized in that, For the surface, perform graphics processing operations on the graphics data stored in the associated direct memory access buffer to obtain a graphics after the graphics processing operation, including: for at least one second surface, perform graphics processing operations on the graphics data stored in the associated direct memory access buffer to obtain a graphics after the graphics processing operation. The process of merging the graphics after graphics processing operations to obtain display data corresponding to the target display screen and sending the display data to the display terminal includes: for the second surface, merging the graphics after graphics processing operations to obtain the display data; and for the first surface, sending the display data to the display terminal.

4. The graphics processing method according to claim 3, characterized in that, Sending the display data to the display terminal for the first surface includes: For the first surface, the file identifier of the direct memory access buffer associated with the display data is bound to the memory manager of the display end for display.

5. The graphics processing method according to claim 1, characterized in that, The graphics processing method further includes: After the graphics processing operation is completed on the surface, the association between the surface and its associated direct memory access buffer is canceled, and the surface is destroyed.

6. The graphics processing method according to claim 1, characterized in that, The graphics processing method further includes: For the surface performing the graphics processing operation, the address of its associated direct memory access buffer is sent to the graphics acceleration module built into the system-on-a-chip to perform hardware acceleration of the graphics processing operation through the graphics acceleration module.

7. The graphics processing method according to claim 1, characterized in that, The graphics processing method further includes: Create external interfaces; For the external interface, in response to the call from the upper-layer application, the direct memory access buffer is driven to store the graphics data of the upper-layer application.

8. The graphics processing method according to claim 7, characterized in that, The graphics processing method further includes: The graphic data of the upper-layer application is decoded; The decoded graphics data is stored in the direct memory access buffer.

9. A system-on-a-chip, characterized in that, The system-on-a-chip does not have a graphics processing unit, and the system-on-a-chip is used to implement the graphics processing method according to any one of claims 1-8.

10. The system-on-a-chip according to claim 9, characterized in that, The system-on-a-chip includes: A graphics acceleration module, which is used to accelerate graphics processing operations in hardware.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the graphics processing method according to any one of claims 1-8.

12. A computer program product, characterized in that, The computer program product includes a computer program stored on a computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform the graphics processing method according to any one of claims 1-8.

13. An electronic device, characterized in that, The electronic device includes the system-on-a-chip as described in claim 9 or 10, or the electronic device is used to implement the graphics processing method as described in any one of claims 1-8.

14. The electronic device according to claim 13, characterized in that, The electronic device also includes a display module, which is connected to the system-on-a-chip and is used to display images.

Citation Information

Patent Citations

  • Graph processing method, device and apparatus and storage medium

    CN110415161A

  • Multi-system graphic data processing method and device, electronic equipment and storage medium

    CN114035851A