Layer synthesis method and terminal equipment
Patent Information
- Application Number
- CN202380011992.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-04-26
- Filing Date
- 2023-11-24
- Publication Date
- 2024-12-27
AI Technical Summary
Terminal equipment deploys user interface display-related loads onto high-power application processors, resulting in high power consumption and poor battery life.
By transferring the layer composition operation from the high-power processing unit to the low-power processing unit, the UI display-related load on the high-power processing unit is reduced, and the sleep probability of the high-power processing unit is increased, thereby reducing the power of the terminal device. consumption and improve battery life.
It effectively reduces the power consumption of the terminal device and improves the battery life. The specific implementation method includes transferring the layer synthesis request from the high-power processing unit to the low-power processing unit for execution, and switching the display right to ensure that the low-power processing unit can Send images directly to the display.
Smart Images

Figure CN119213461A_ABST
Abstract
Description
Layer synthesis method and terminal device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on April 26, 2023, with application number 202310478477.X and application name “Layer Synthesis Method and Terminal Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of terminal technology, and in particular to a layer synthesis method and a terminal device. Background Art
[0003] Currently, in order to effectively reduce the power consumption of terminal devices, terminal devices usually adopt a heterogeneous architecture, which includes an application processor (AP) with strong computing power and a coprocessor (CP) with low power consumption.
[0004] Although the terminal device has adopted a heterogeneous architecture, the terminal device system will deploy the related loads of the user interface (UI) display to the AP, which makes the power consumption of the terminal device still high and the battery life poor.
[0005] Summary of the Invention
[0006] The present application provides a layer synthesis method and a terminal device, which can reduce the related load of the UI display on the AP, reduce the power consumption of the terminal device, and improve the battery life of the terminal device.
[0007] To achieve the above objectives, this application adopts the following technical solutions:
[0008] In a first aspect, a layer synthesis method is provided, which is applied to a terminal device including a first processing unit and a second processing unit. The method includes: obtaining a synthesis request for a first layer, where the first layer is a layer rendered by the first processing unit; in response to the synthesis request for the first layer, synthesizing the first layer into an image using the second processing unit; wherein the first processing unit is a high-power processing unit and the second processing unit is a low-power processing unit.
[0009] Based on the above technical solution, after the terminal device obtains the synthesis request of the layer rendered by the high-power processing unit, such as AP, etc., it uses the low-power processing unit, such as CP, to synthesize the layer into an image. That is to say, the high-power processing unit no longer performs the layer synthesis operation. In this way, there is no load for performing the layer synthesis operation on the high-power processing unit, which reduces the relevant load of the UI display on the high-power processing unit. Compared with using a high-power processing unit to synthesize the layer into an image, the power consumption of the low-power processing unit is lower. And after the layer synthesis operation is transferred to the low-power processing unit for execution, the probability of the high-power processing unit to sleep can be increased, thereby reducing the power consumption of the terminal device and improving the battery life of the terminal device.
[0010] In one possible design, the synthesis request of the first layer instructs the terminal device to use the first processing unit to synthesize the first layer into an image. Based on this design, after the terminal device obtains the request instructing the use of the high processing unit to perform the layer synthesis operation, it uses the low processing unit to perform the layer synthesis operation, which is equivalent to transferring the layer synthesis operation on the high-power processing unit to the low-power processing unit for execution. That is, the relevant load of the UI display deployed on the high-power processing unit is deployed on the low-power processing unit, that is, the relevant load of the UI display on the high-power processing unit is reduced. Compared with using a high-power processing unit to perform the layer synthesis operation, the power consumption of the low-power processing unit is lower. And after the layer synthesis operation is transferred to the low-power processing unit for execution, the probability of the high-power processing unit to sleep can be increased, thereby reducing the power consumption of the terminal device and improving the battery life of the terminal device.
[0011] In one possible design, before the second processing unit is used to composite the first layer into an image, the method further includes: the second processing unit receiving the first layer from the first processing unit. Because the first layer is rendered by the high-power processing unit, based on this design, the low-power processing unit can obtain the rendered first layer from the high-power processing unit to subsequently perform compositing operations on the first layer.
[0012] In one possible design, the method further includes: if display rights belong to the first processing unit, switching the display rights to the second processing unit, where display rights refer to the right to control the display subsystem (DSS). It is understood that only with display rights can the synthesized image be sent to the display screen for display. Based on this design, switching the display rights of the high-power processing unit to the low-power processing unit allows the low-power processing unit to directly send the synthesized image to the display screen for display, thereby reducing the power consumption of the terminal device.
[0013] In one possible design, switching the display right to the second processing unit includes: the first processing unit powers off the DSS; the first processing unit sends a first message to the second processing unit; and in response to the first message, the second processing unit powers on the DSS. It can be understood that establishing a connection between the DSS driver and the DSS allows the DSS to be powered on. Disconnecting the connection between the DSS driver and the DSS allows the DSS to be powered off. Since the high-power processing unit and the low-power processing unit may use different DSS drivers, the high-power processing unit powers off the DSS, and the low-power processing unit powers on the DSS, allowing the low-power processing unit to use its own DSS driver to drive the DSS.
[0014] In one possible design, after the second processing unit synthesizes the first layer into an image, the method further includes: the second processing unit sending a status synchronization message to the first processing unit, where the status synchronization message is used to indicate that the second processing unit has synthesized the first layer into an image. Based on this design, after the low-power processing unit completes the synthesis operation, it notifies the high-power processing unit of the completion of the synthesis operation. This facilitates the high-power processing unit to prepare (or send to the low-power processing unit) the data to be synthesized for the next frame of the image.
[0015] In one possible design, the method further includes: the second processing unit obtaining a vertical synchronization (VSYNC) signal; and the second processing unit sending the VSYNC signal to the first processing unit, where the VSYNC signal is used to instruct the first processing unit to render a layer included in the next frame of the image. Based on this design, when the low-power processing unit performs a layer compositing operation, the VSYNC signal may be obtained by the low-power processing unit. The low-power processing unit may send the VSYNC signal to the high-power processing unit to facilitate the high-power processing unit to perform the rendering operation.
[0016] In one possible design, the terminal device further includes a third processing unit; the method further includes: obtaining a synthesis request for the second layer; if the synthesis request for the second layer instructs the terminal device to use the third processing unit to synthesize the second layer into an image, then in response to the synthesis request for the second layer, the terminal device uses the third processing unit to synthesize the second layer into an image. Based on this design, after the terminal device receives a request for the third processing unit to perform a synthesis operation, the third processing unit is used to perform the synthesis operation. In other words, the synthesis operation performed by the third processing unit is not transferred to the low-power processing unit for execution. The third processing unit may perform some layer synthesis operations that the low-power processing unit cannot perform, or layer synthesis operations that require higher performance. In this way, the execution of these layer synthesis operations can be facilitated.
[0017] In one possible design, the method further includes: if the display right belongs to the second processing unit, switching the display right to the first processing unit. Based on this design, if the previous frame of image was layered by the low-power processing unit, the display right belongs to the low-power processing unit. However, if the next frame of image requires layering by the third processing unit, the display right of the low-power processing unit needs to be switched to the AP so that the third processing unit can complete the layering and display operation.
[0018] In one possible design, switching display rights to the first processing unit includes: the first processing unit sending a second message to the second processing unit; in response to the second message, the second processing unit powers off the DSS; the second processing unit sending a third message to the third processing unit; in response to the third message, the first processing unit powers on the DSS. Based on this design, the low-power processing unit powers off the DSS, while the high-power processing unit powers on the DSS, allowing the high-power processing unit to use its own DSS driver to drive the DSS.
[0019] In one possible design, the first processing unit includes an application processor AP, and / or the second processing unit includes a coprocessor CP, and / or the third processing unit includes a graphics processor GPU.
[0020] In a second aspect, a terminal device is provided, which has the functionality to implement the method described in the first aspect and any design thereof. The functionality can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functionality described above.
[0021] In a third aspect, a terminal device is provided, comprising a processor and a memory, wherein the memory is coupled to the processor, the memory is used to store computer program code, the computer program code comprising computer instructions, and the processor reads the computer instructions from the memory so that the terminal device executes the method described in the first aspect and any one of the designs thereof.
[0022] In one possible design, the processor includes a first processor and a second processor, where the first processor is a high-power processor and the second processor is a low-power processor. The first processor is configured to execute the method performed by the first processing unit as described in the first aspect and any design thereof, and the second processor is configured to execute the method performed by the second processing unit as described in the first aspect and any design thereof. For example, the first processor may include an AP, and the second processor may include a CP, etc.
[0023] In one possible design, the processor may further include a third processor. The third processor is configured to execute the method executed by the third processing unit as described in the first aspect and any design thereof.
[0024] In one possible design, the terminal device further includes a communication interface that can be used for the terminal device to communicate with other devices (e.g., terminal devices). Exemplarily, the communication interface can be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin, or related circuits.
[0025] In one possible design, the terminal device may further include a display screen, which may be used for the terminal device to perform display operations, such as displaying a synthesized image.
[0026] In a fourth aspect, a computer-readable storage medium is provided, which includes a computer program or instructions. When the computer program or instructions are run on a terminal device, the terminal device executes the method described in the first aspect and any one of the designs thereof.
[0027] In a fifth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer can execute the method described in the first aspect and any one of the designs thereof.
[0028] In a sixth aspect, a circuit system is provided, the circuit system including a processing circuit, wherein the processing circuit is configured to execute the method described in any one of the designs of the first aspect.
[0029] In the seventh aspect, a chip system is provided, comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor. When the at least one processor executes the instructions, the at least one processor executes the method described in the first aspect and any one of the designs therein.
[0030] It should be noted that the technical effects brought about by any design in the above-mentioned second to seventh aspects can refer to the technical effects brought about by the corresponding design in the first or second aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] FIG1 is a schematic diagram of an interface provided in an embodiment of the present application;
[0032] FIG2 is a schematic diagram of an architecture for deploying a load in a terminal device provided in an embodiment of the present application;
[0033] FIG3 is a schematic diagram of a UI display load provided in an embodiment of the present application;
[0034] FIG4 is a schematic diagram of a flow chart of an existing layer synthesis method;
[0035] FIG5 is a schematic structural diagram of a terminal device provided in an embodiment of the present application;
[0036] FIG6 is a schematic diagram of the structure of another terminal device provided in an embodiment of the present application;
[0037] FIG7 is a schematic diagram of a software structure of a terminal device provided in an embodiment of the present application;
[0038] FIG8 is a schematic diagram of a process of a layer synthesis method provided in an embodiment of the present application;
[0039] FIG9 is a flow chart of a method for a terminal device to determine whether a current scenario is a CP synthesis scenario, provided by an embodiment of the present application;
[0040] FIG10 is a schematic diagram of a VSYNC signal transmission process provided by an embodiment of the present application;
[0041] FIG11 is a schematic diagram of a process of switching the display right of an AP to a CP according to an embodiment of the present application;
[0042] FIG12 is a schematic diagram of a process for synchronizing data to be synthesized from an AP to a CP according to an embodiment of the present application;
[0043] FIG13 is a schematic diagram of a flow chart of another layer synthesis method provided in an embodiment of the present application;
[0044] FIG14 is a schematic diagram of a flow chart of another layer synthesis method provided in an embodiment of the present application;
[0045] FIG15 is a schematic diagram of a benefit effect provided by an embodiment of the present application;
[0046] FIG16 is a schematic structural diagram of another terminal device provided in an embodiment of the present application;
[0047] FIG17 is a schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In the description of this application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship, for example, A / B can represent A or B; "and / or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.
[0049] In the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, a, b, and c, where a, b, and c can be single or plural.
[0050] In addition, to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean different.
[0051] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner to facilitate understanding.
[0052] The features, structures, or characteristics of this application may be combined in any suitable manner in one or more embodiments. In the various embodiments of this application, the order of the sequence numbers of the processes does not necessarily indicate the order of execution. The order of execution of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation of the embodiments of this application.
[0053] Some optional features in the embodiments of the present application can be implemented independently in certain scenarios without relying on other features to solve corresponding technical problems and achieve corresponding effects. They can also be combined with other features in certain scenarios as needed.
[0054] In this application, unless otherwise specified, the same or similar parts between the various embodiments can be referenced to each other. In the various embodiments of this application, unless otherwise specified and there is no logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other. The technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships. The implementation methods of this application do not constitute a limitation on the scope of protection of this application.
[0055] In addition, the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0056] To facilitate understanding, the following first introduces the technical terms and related concepts that may be involved in the embodiments of this application.
[0057] 1. Heterogeneous architecture
[0058] Heterogeneous architecture is an architectural model that describes the hardware composition of a device. In some scenarios, heterogeneous architecture can refer to the inclusion of different computing units (or computing modules, or processing units, etc.) in a device. For example, computing units can include but are not limited to application processors (APs), coprocessors (CPs), graphics processing units (GPUs), etc. Different operating systems (OSs) can be deployed in these computing units, for example, an AP can be deployed with Embedded real-time operating systems such as Huawei LiteOS can be deployed on CP, and binary operating systems can be deployed on GPU.
[0059] In some embodiments, devices using heterogeneous architectures require different computing units to communicate or synchronize status, data, etc. when completing a certain function. This execution logic that requires cooperation between different computing units can be called heterogeneous collaboration.
[0060] 2. Synthesis
[0061] The process of sorting different layers, cropping the display area, calculating the overlay area, and merging them into a single image is called compositing. For example, as shown in FIG1 , a mobile phone displays an interface 100, which is a single image. The layers in interface 100 include a status bar 101, a navigation bar 102, and a wallpaper 103. Compositing is the process of merging these layers into interface 101.
[0062] In some embodiments, the synthesis method can include offline synthesis and online synthesis. Offline synthesis refers to drawing all layers to be displayed onto a final layer, which is then sent to the display screen for display. Online synthesis refers to sending all layers to be synthesized directly to the display screen, which uses dedicated hardware to synthesize and display the layers to be displayed. Compared to offline synthesis, online synthesis can save device power consumption because it eliminates the step of reading the final layer.
[0063] In some embodiments, online synthesis may include but is not limited to layer synthesis using a GPU, a hardware composer (HWC), etc.
[0064] 3. Display Rights
[0065] The display subsystem (DSS) is a general term for display-related hardware. It is responsible for extracting pixel data from memory and sending it to the display. The DSS can be controlled by the operating system in the computing unit. Only one computing unit can control the DSS at a time. This computing unit's control over the DSS is called display rights.
[0066] For example, consider a device using a heterogeneous architecture where computing units include an AP and a CP. In some embodiments, when the device is in high-performance mode, the DSS may be controlled by the AP, and when the device is in low-power mode, the DSS may be switched to CP control. The process of switching display rights between the two computing units may be referred to as display rights switching.
[0067] In some scenarios, when a terminal device utilizes a heterogeneous architecture, the heterogeneous architecture typically includes an AP and a CP. The terminal device system deploys the relevant loads displayed by the UI onto the AP. For example, Figure 2 illustrates an architectural diagram of load deployment in a terminal device provided in an embodiment of the present application. It will be understood that in this embodiment of the present application, all operations performed by a terminal device that consume power consumption are referred to as loads.
[0068] As shown in Figure 2, the terminal device includes an AP and a CP. Specifically, the AP includes an AP OS and an AP core, while the CP includes a CP OS and a CP core. It should be understood that "core," also known as a kernel or core, refers to the chip within the computing unit that processes data. The kernel of the computing unit can execute commands, receive commands, store commands, and process data.
[0069] For example, touch interaction loads, such as clicks and slides, and UI display loads are deployed on the AP. It is understood that when a terminal device receives various operations such as clicks and slides, the image displayed on the terminal device may change. During this process, the terminal device performs operations related to image display. In this embodiment of the application, these image display-related operations are referred to as UI display loads.
[0070] Exemplarily, FIG3 shows some examples of UI display loads provided by the embodiments of the present application. Exemplarily, as shown in FIG3 , the UI display load includes a UI thread, a rendering thread, a synthesis and display thread. Among them, the UI thread is mainly used to complete the drawing of each layer. Specifically, the UI thread can complete the drawing operation by processing UI events, animation, measurement, layout, drawing, etc. Among them, when a UI element, such as a view (control), is operated by the user in a specific way, the terminal device will generate an event corresponding to the UI element, referred to as a UI event for short. Animation can be used to achieve UI animation effects. Measurement and layout can be used to determine the size and position of each view (control) included in the layer that needs to be drawn, and drawing is used to complete the drawing of the view, etc.
[0071] The rendering thread is mainly used to complete the rendering of each layer. Specifically, the rendering thread can complete the rendering operation by synchronizing the vertical synchronization (VSYNC) signal, updating the rendering cache, etc. In some embodiments, the VSYNC signal can be used to trigger the drawing, rendering and synthesis process of the next frame of image. Updating the rendering cache can be used to store the rendered layer in the cache. Optionally, the rendering thread can also be used to select the synthesis method of the layer. Exemplarily, the synthesis method of the layer can include but is not limited to using GPU, HWC, etc. to synthesize the layer.
[0072] The compositing and display threads are primarily responsible for layer compositing, image delivery, and image display. Layer compositing combines one or more rendered layers into a single image frame, which is then stored in the cache. Image delivery sends the resulting image to the DSS, which can optionally process it and then send it to the display. Image display displays the image on the display.
[0073] Since terminal devices often need to execute UI display loads, but as mentioned above, terminal devices deploy all UI display loads on APs with higher power consumption, which results in higher power consumption and poor battery life for terminal devices.
[0074] Based on this, a solution is proposed in the related art, as shown in FIG4 , which includes the following steps:
[0075] S401: The AP determines whether it is a specific scenario.
[0076] For example, specific scenarios include the scenario where the screen of a mobile phone is turned off when in standby mode, and the scenario where the screen of a watch is turned on when the wrist is raised after the screen is turned off.
[0077] If it is a specific scene, then execute steps S402 to S404. If it is not a specific scene, then execute steps S405 to S407 and step S404.
[0078] S402: The CP processes the prefabricated layer.
[0079] The prefabricated layers refer to layers that have been drawn and rendered in advance. Specifically, the CP may calculate the display position of the prefabricated layers, determine the prefabricated layers to be displayed, and so on.
[0080] S403, CP sends the prefabricated layer to the display screen for display.
[0081] S404: The display screen displays an image.
[0082] S405. AP performs layer drawing.
[0083] S406: AP performs layer rendering.
[0084] S407: AP performs layer synthesis.
[0085] The above solution requires pre-drawing layers for specific scenarios. However, terminal devices display images in a wide variety of scenarios, making it difficult to pre-draw layers for each scenario. Therefore, the above solution is only applicable to specific scenarios and cannot effectively reduce the power consumption of the terminal device or improve its battery life.
[0086] Based on this, an embodiment of the present application provides a layer synthesis method, which is applied to a terminal device including a first processing unit and a second processing unit. The terminal device transfers the layer synthesis operation performed by the first processing unit to the second processing unit for execution. It can be understood that in the embodiment of the present application, the layer synthesis operation may refer to the operation of synthesizing one or more layers into a frame of image. The first processing unit may be a processing unit with high power consumption, such as an AP, and the second processing unit may be a processing unit with low power consumption, such as a CP. In this way, the terminal device transfers the layer synthesis operation performed by the AP to the CP for execution, that is, deploys the relevant load of the UI display on the AP to the CP, thereby reducing the relevant load of the UI display on the AP. The power consumption of the CP to perform the layer synthesis operation is lower than that of the AP, and after the layer synthesis operation is transferred to the CP for execution, the probability of the AP being in sleep mode can be increased, thereby reducing the power consumption of the terminal device and improving the battery life of the terminal device.
[0087] The technical solution provided in the embodiment of the present application can be applied to the terminal device 100, or to a system including the terminal device 100.
[0088] For example, the terminal device 100 may be a mobile phone, a tablet computer, a handheld computer, a netbook, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, or a wearable device, including but not limited to a smart watch, a smart bracelet, and a smart anklet. The operating system installed on the terminal device 100 may include but is not limited to: This application does not limit the specific type of the terminal device 100 or the installed operating system.
[0089] For example, taking the terminal device 100 as a mobile phone as an example, FIG5 shows a structural diagram of a mobile phone provided in an embodiment of the present application.
[0090] As shown in Figure 5, the mobile phone may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a subscriber identification module (SIM) card interface 195 and a DSS 196, etc.
[0091] The processor 110 may include multiple different processing units, for example, the processor 110 may include an AP, a CP, a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0092] In some embodiments of the present application, the processor 110 may include one or more high-power processing units, such as APs, and one or more low-power processing units, such as CPs. In some examples, if the power consumption of a processing unit is greater than or equal to a power consumption threshold, the processing unit is considered a high-power processing unit. If the power consumption of a processing unit is less than the power consumption threshold, the processing unit is considered a low-power processing unit. Optionally, the power consumption threshold can be set by the developer based on actual needs.
[0093] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0094] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0095] In some embodiments, processor 110 may include one or more interfaces.
[0096] The charging management module 140 is configured to receive charging input from a charger, which may be a wireless charger or a wired charger.
[0097] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160.
[0098] The wireless communication function of the mobile phone can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
[0099] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in a mobile phone can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0100] The mobile communication module 150 can provide wireless communication solutions for mobile phones, including 2G / 3G / 4G / 5G, etc. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
[0101] The wireless communication module 160 can provide wireless communication solutions for mobile phones, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.
[0102] In some embodiments, the mobile phone's antenna 1 is coupled to the mobile communication module 150 , and the antenna 2 is coupled to the wireless communication module 160 , so that the mobile phone can communicate with the network and other devices through wireless communication technology.
[0103] The mobile phone implements its display functions through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or modify display information. In some embodiments of the present application, the GPU may also be used to perform layer compositing operations.
[0104] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). In some embodiments, the mobile phone can include one or N display screens 194, where N is a positive integer greater than 1. In some embodiments of the present application, the display screen can be used to display an image composed of one or more layers.
[0105] DSS 196 is used to extract pixel data from the buffer and send the pixel data to the display screen. In some embodiments of the present application, the DSS can be used to obtain an image composed of one or more layers from the buffer. The DSS can process the composed image, such as performing color conversion and image rotation, and send the processed image to display screen 194 for display.
[0106] The camera 193 is used to capture still images or videos. In some embodiments, the mobile phone may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0107] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone. The external memory card communicates with the processor 110 through the external memory interface 120 to implement data storage function.
[0108] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 can include a program storage area and a data storage area.
[0109] Audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The phone can use audio module 170 for functions such as music playback and recording. Audio module 170 may include a speaker, receiver, microphone, headphone jack, and application processor to implement audio functions.
[0110] Optionally, the sensor module 180 may also include one or more of a touch sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0111] The buttons 190 include a power button, a volume button, etc. The buttons 190 can be mechanical buttons or touch buttons.
[0112] Motor 191 can generate vibration prompts.
[0113] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0114] The SIM card interface 195 is used to connect a SIM card.
[0115] For example, the above only uses a mobile phone as an example to illustrate the structure of the terminal device 100 in the embodiment of the present application, but does not constitute a limitation on the structure and form of the terminal device 100. The embodiment of the present application does not limit the structure and form of the terminal device 100. For example, Figure 6 shows another exemplary structure of the terminal device 100. As shown in Figure 6, the terminal device 100 includes: a processor 601, a processor 602, a memory 603, and a display screen 604. The implementation of the processor 601, the processor 602, the memory 603, and the display screen 604 can refer to the implementation of the processor, memory, and display screen shown in Figure 5.
[0116] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than those shown in Figures 5 and 6, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0117] For example, the software architecture of the terminal device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. For example, taking the processing unit installed in the terminal device 100 as an example, FIG7 shows a schematic diagram of the software architecture of the terminal device 100 provided in an embodiment of the present application, including an AP and a CP.
[0118] As shown in FIG. 7 , the terminal device 100 includes an AP, a CP, and a display module 708 .
[0119] The AP includes a drawing module 701 , a rendering module 702 , a synthesis scene judgment module 703 , a collaborative display switching module 704 , a data collaborative processing module 705 , a synthesis module 706 , and a driving module 707 .
[0120] The CP includes a collaborative display switching module 709 , a data collaborative processing module 710 , a synthesis module 711 , and a driving module 712 .
[0121] Exemplarily, the drawing module 701 can be used to perform drawing operations. For example, the drawing module 701 can complete the drawing of the layer through a UI thread such as shown in Figure 3. The rendering module 702 can be used to perform rendering operations. For example, the rendering module 702 can complete the rendering of the layer through a rendering thread such as shown in Figure 3. The rendering module 702 can also be used to select a layer synthesis method, such as: including but not limited to using GPU, HWC, etc. to synthesize the layer. The synthesis scene judgment module 703 can be used to determine whether the current scene is a GPU synthesis scene or a CP synthesis scene based on the layer synthesis method selected by the rendering module 702. For example: if the GPU is selected to synthesize the layer, the synthesis scene judgment module 703 can determine that the current scene is a GPU synthesis scene. For another example: if the AP is selected to synthesize the layer, the synthesis scene judgment module 703 can determine that the current scene is a CP synthesis scene.
[0122] It is understood that in the embodiments of the present application, a GPU-synthesized scene may refer to a scene in which the GPU performs layer compositing operations, compositing one or more layers into a single image frame. In this scenario, the display rights must belong to the AP. A CP-synthesized scene may refer to a scene in which the CP performs layer compositing operations, compositing one or more layers into a single image frame. In this scenario, the display rights must belong to the CP.
[0123] It can be understood that in the architecture shown in Figure 7, the synthetic scene judgment module 703 is introduced as being located in the AP. The synthetic scene judgment module 703 can also be located in other locations in the terminal device 100, and this application does not impose any restrictions on this.
[0124] The collaborative display switching module 704 on the AP side can be used to interact with the collaborative display switching module 709 on the CP side to implement the switching of display rights. For example, if the display rights belong to the AP, the display rights are switched to the CP. If the display rights belong to the CP, the display rights are switched to the AP.
[0125] The data collaborative processing module 705 on the AP side can be used to send the data to be synthesized, such as one or more layers rendered by the AP side, to the CP side. Correspondingly, the data collaborative processing module 710 on the CP side can receive the data to be synthesized from the AP.
[0126] The AP-side synthesis module 706 and the CP-side synthesis module 711 can both be used to synthesize one or more rendered layers into a single frame. For example, the synthesis module 706 and the synthesis module 711 can use a HWC to perform the synthesis operation. In some embodiments, the synthesis module 706 and the synthesis module 711 can share a HWC, that is, the AP and the CP can share a HWC.
[0127] Both the AP-side driver module 707 and the CP-side driver module 712 can be used to activate the DSS, which can process the synthesized image, such as performing color conversion and image rotation. The DSS module can also send the processed image to the display module 708 for display. In some embodiments, the driver module 707 and the driver module 712 can share a single DSS, that is, the AP and the CP can share a single DSS.
[0128] The display module 708 may be configured to display one or more synthesized images.
[0129] It can be understood that the software modules included in the terminal device 100 described in Figure 7 are only one possible division method. In actual applications, the terminal device 100 may include more or fewer modules, or there may be other module division methods, and this application does not limit this.
[0130] The technical solutions involved in the following embodiments can all be implemented in devices having the structures shown in Figures 5, 6, and 7.
[0131] It is understood that in the embodiments of the present application, the terminal device may perform some or all of the steps in the embodiments of the present application. These steps or operations are merely examples, and the embodiments of the present application may also perform other operations or variations of various operations. In addition, the various steps may be performed in a different order than those presented in the embodiments of the present application, and it is possible that not all operations in the embodiments of the present application need to be performed.
[0132] The technical solutions involved in the following embodiments are all described with the first processing unit being the AP and the second processing unit being the CP.
[0133] For example, FIG8 shows a schematic flow chart of a layer synthesis method provided in an embodiment of the present application, which includes the following steps:
[0134] S801: The terminal device determines whether the current scene is a CP synthesis scene.
[0135] If yes, execute step S802; if no, execute step S803.
[0136] In some embodiments, the layer synthesis method may include but is not limited to using a GPU for layer synthesis and / or using an AP for layer synthesis. The terminal device may determine whether the current scene is a CP synthesis scene based on the layer synthesis method.
[0137] As a possible implementation, FIG9 shows a flow chart of a method provided by an embodiment of the present application for a terminal device to determine whether a CP synthesis scene is currently in progress. The method includes the following steps:
[0138] S901. The terminal device determines whether the layer synthesis is performed using a GPU according to the layer synthesis method.
[0139] If yes, execute step S902; if no, execute step S903.
[0140] Optionally, in step S901 , the synthesis mode of the layer may be selected by a rendering thread such as that shown in FIG. 3 .
[0141] S902: The terminal device determines that it is not a CP synthesis scenario.
[0142] In this step, after the terminal device determines that it is not a CP synthesis scene, the terminal device can use the GPU to synthesize one or more layers into a frame of image.
[0143] S903: The terminal device determines whether to use the AP to perform layer synthesis.
[0144] If yes, execute step S904; if no, end.
[0145] In some embodiments, if the layer synthesis method only includes two methods: using a GPU for layer synthesis and using an AP for layer synthesis, the terminal device may not execute step S903 and directly execute step S904.
[0146] S904: The terminal device determines that it is a CP synthesis scenario.
[0147] It is understood that the method shown in FIG9 may also include more or fewer steps, and the execution order of certain steps may also be changed. For example, the terminal device may directly execute step S903, and if yes, execute step S904, and if not, execute step S902, etc.
[0148] S802: The terminal device uses the CP to perform a layer synthesis operation.
[0149] In some embodiments, when the terminal device uses CP to perform a layer synthesis operation, the layer synthesis operation can be specifically completed using HWC.
[0150] For example, the CP may receive a VSYNC signal from the HWC and perform a layer synthesis operation based on the signal. Alternatively, the VSYNC signal may be used to trigger the CP to perform a layer synthesis operation for the next frame of image.
[0151] Optionally, the CP may synchronize (or send) the VSYNC signal to the AP so that the AP can perform preparation operations for the next frame of image data based on the VSYNC signal, such as drawing or rendering the layers included in the next frame of image. Optionally, the CP may synchronize the VSYNC signal to the AP during step S802 or after step S802 is completed.
[0152] For example, Figure 10 shows a schematic diagram of a VSYNC signal transmission process provided by an embodiment of the present application. As shown in Figure 10, the AP side and the CP side share a HWC, such as HWC 1009, which can generate a VSYNC signal.
[0153] When the CP performs layer compositing operations, the transmission process of the VSYNC signal is shown in path 1. The VSYNC signal is transmitted upward to the CP-side composite display driver 1008, and then passes through the composite service hardware abstract layer (HAL) 1007 to the CP-side VSYNC signal synchronization module 1005. The VSYNC signal synchronization module 1005 transmits the VSYNC signal to the display synchronization module 1006. Finally, the CP side sends the VSYNC signal to the display synchronization module 1002 on the AP side through the display synchronization module 1006. Correspondingly, the AP side receives the VSYNC signal from the CP through the display synchronization module 1002. Furthermore, the display synchronization module 1002 can send the VSYNC signal to the VSYNC signal synchronization module 1001.
[0154] When the AP performs layer composition, the VSYNC signal transmission process is shown in path 2. The VSYNC signal is transmitted upward to the composition display driver 1004 on the AP side, and then passed to the VSYNC signal synchronization module 1001 through the composition service HAL 1003.
[0155] The VSYNC signal synchronization module 1001 and the VSYNC signal synchronization module 1005 can both be used to perform VSYNC signal synchronization operations in the rendering thread, such as shown in FIG3 . The composition service HAL 1003 and the composition service HAL 1007 can both be used to perform layer composition operations. The composition display driver 1004 and the composition display driver 1008 can both be used to drive the HWC 1009.
[0156] Optionally, the display synchronization module 1006 shown in FIG10 can be integrated with the data collaborative processing module 710 shown in FIG7 , or integrated with other modules, or can also be an independent module. Similarly, the display synchronization module 1002 can be integrated with the data collaborative processing module 705 shown in FIG7 , or integrated with other modules, or can also be an independent module.
[0157] S803: The terminal device uses a GPU to perform a layer synthesis operation.
[0158] It is understood that the method shown in FIG8 is based on the example of two methods of layer synthesis, namely, using a GPU for layer synthesis and using an AP for layer synthesis. When the layer synthesis method includes using an AP for layer synthesis and using other methods for layer synthesis, step S803 can also be specifically implemented as performing the layer synthesis operation using the other method. When there are multiple such other methods, the terminal device can perform the layer synthesis operation using the corresponding method according to the layer synthesis method selected by the rendering thread, such as shown in FIG3.
[0159] Based on the above technical solution, when the terminal device determines that the method of using AP for layer synthesis is a CP synthesis scenario, the CP is used to perform the layer synthesis operation. In other words, the terminal device transfers the layer synthesis operation performed by the AP to the CP, that is, deploys the relevant load of the UI display on the AP (such as the layer synthesis operation) to the CP, reducing the relevant load of the UI display deployed on the AP. The power consumption of the CP performing the layer synthesis operation is lower than that of the AP, and after the layer synthesis operation is transferred to the CP for execution, the probability of the AP being dormant can be increased, thereby reducing the power consumption of the terminal device and improving the battery life of the terminal device.
[0160] In some embodiments, when the terminal device determines that the current scene is a CP synthesis scene, the display right may still belong to the AP. Therefore, the method shown in FIG8 may further include step S804.
[0161] S804: The terminal device switches the display right of the AP to the CP.
[0162] It is understood that the present application does not limit the execution order of step S802 and step S804, which can be executed simultaneously or one after another. When they are executed one after another, the present application does not limit the order.
[0163] For example, FIG11 shows a schematic diagram of a process for switching the display rights of an AP to a CP, as provided in an embodiment of the present application. In some embodiments, since the CP and the AP share a DSS, but the CP and the AP have different DSS drivers, the DSS needs to be powered on (or turned on) and powered off (or turned off) so that the CP or the AP can drive the DSS through their respective DSS drivers, thereby enabling the CP or the AP to have display rights. When the display rights belong to the AP, the DSS on the AP side is powered on. In the process of switching the display rights of the AP to the CP, as shown in FIG11, the AP first executes the DSS power-off process, such as disconnecting the communication connection between its own DSS driver and the DSS. Then, the AP notifies the CP to execute the DSS power-on process. Accordingly, after receiving the notification from the AP, the CP executes the DSS power-on process, such as establishing a communication connection between its own DSS driver and the DSS. At this time, the display rights belong to the CP. This completes the process of switching the display rights of the AP to the CP.
[0164] In some embodiments, after the AP executes the DSS power-off process, the terminal device may lock the display screen to prevent the display screen from being black.
[0165] Optionally, in the embodiment of the present application, the communication method adopted between the AP and the CP may include but is not limited to inter-process communication (IPC) and the like.
[0166] Based on this solution, the display right of the AP is switched to the CP, so that the CP can send the synthesized image to the display screen for display.
[0167] In some embodiments, one or more layers synthesized by the CP for a frame of image are rendered by the AP. For example, the AP can use a rendering thread such as that shown in FIG3 to complete the rendering operation of the layers included in the frame of image. Therefore, before executing step S802 shown in FIG8 , the method shown in FIG8 may further include step S805.
[0168] S805: The terminal device synchronizes the data to be synthesized from the AP to the CP.
[0169] Exemplarily, the data to be synthesized may refer to one or more layers used to synthesize a frame of image.
[0170] For example, Figure 12 illustrates a schematic diagram of a process for synchronizing data to be synthesized from an AP to a CP, according to an embodiment of the present application. As shown in Figure 12 , the AP prepares the data to be synthesized. For example, the AP may perform operations such as drawing and rendering to generate the data to be synthesized. The data to be synthesized is then sent to the CP. The CP, in turn, receives the data to be synthesized from the AP.
[0171] It is understood that the present application does not limit the execution order of step S805 and step S804, which can be executed simultaneously or one after another. When they are executed one after another, the present application does not limit the order.
[0172] As a specific embodiment, FIG13 shows a flow chart of another layer synthesis method provided in an embodiment of the present application. As shown in FIG13 , the method includes the following steps:
[0173] S1301: The AP determines whether the current scenario is a CP synthesis scenario.
[0174] If yes, then execute steps S1302 to S1307. If no, then execute step S1308.
[0175] For example, the AP may determine whether the current scene is a CP synthesis scene through a synthesis scene determination module 703 such as that shown in FIG. 7 .
[0176] For the specific implementation of this step, please refer to the relevant implementation of step S801 shown in FIG8 .
[0177] S1302: The AP executes the DSS power-off process.
[0178] S1303: The AP notifies the CP to execute the DSS power-on process. Correspondingly, the CP receives a notification message from the AP to execute the DSS power-on process.
[0179] In some embodiments, the CP may use thread A to receive the notification message.
[0180] S1304: The CP executes the DSS power-on process.
[0181] S1305: The AP sends the data to be synthesized to the CP. Correspondingly, the CP receives the data to be synthesized from the AP.
[0182] In some embodiments, after the AP executes step S1305, the AP's composition thread enters a blocked state. It is understood that the composition thread refers to the thread used by the AP to perform layer composition operations. After the AP's composition thread enters a blocked state, the AP suspends the layer composition operation.
[0183] In some embodiments, the CP may use thread B to receive the data to be synthesized. It will be appreciated that, in this embodiment, the CP uses two different threads to receive the notification message in step S1303 and the data to be synthesized in step S1305, respectively. The CP may also use the same thread to receive the notification message and the data to be synthesized. For example, the CP may use thread C to first receive the notification message in step S1303, and after receiving the notification message, continue to use thread C to receive the data to be synthesized in step S1305.
[0184] Optionally, the execution order of the above-mentioned steps S1302, S1303, S1304, and S1305 may also be changed. For example, the AP may first execute step S1305, and then execute step S1302 and step S1303, or step S1302 and / or step S1303 may be executed simultaneously with step S1305. For another example, the CP may first execute step S1305, and then execute step S1303 and step S1304, or step S1303 and / or step S1304 may be executed simultaneously with step S1305. In other words, this application does not limit the execution order of steps S1302, S1303, and S1305 by the AP, nor does it limit the execution order of steps S1303, S1304, and S1305 by the CP.
[0185] S1306. CP performs synthesis and display operations.
[0186] The CP can synthesize the data to be synthesized into a frame of image and then send the image to the DSS. Correspondingly, the DSS can process the image and send it to the display screen for display.
[0187] In some embodiments, the method shown in FIG. 13 may further include step S1307 .
[0188] S1307: The CP sends a state synchronization message to the AP. Correspondingly, the AP receives the state synchronization message from the CP.
[0189] Among them, the status synchronization message can be used to instruct the AP to prepare (or send) the data to be synthesized for the next frame of image, etc., or to indicate that the CP has completed the synthesis and display operation of the xth frame of image, etc., where x is an integer greater than or equal to 0.
[0190] In some embodiments, when the CP uses different threads to respectively receive the notification message described in step S1303 and the data to be synthesized described in step S1305, the CP may execute step S1307 after both threads are finished.
[0191] In some embodiments, after or before the CP executes step S1307, the CP may also send a VSYNC signal to the AP. Alternatively, step S1307 and the sending of the VSYNC signal may be performed simultaneously. For the specific transmission process of the VSYNC signal, reference may be made to the implementation described in FIG. 10 .
[0192] In some embodiments, after the AP receives the state synchronization message, the synthesis thread described in step 1305 is unblocked and the execution of the synthesis thread ends.
[0193] S1308: AP performs the process of synthesizing and displaying the original layers.
[0194] For example, the process of original synthesis and display may refer to the process of using a GPU to perform layer synthesis and display.
[0195] In some embodiments, there may be scenarios where it is necessary to switch the display rights of the CP to the AP. For example, when displaying multiple frames, if the CP performed layer compositing on the previous frame, the display rights belong to the CP. However, if the GPU performs layer compositing on the next frame, the display rights of the CP need to be switched to the AP to allow the GPU to complete the layer compositing and display.
[0196] As a specific embodiment, FIG14 shows a flow chart of another layer synthesis method provided by an embodiment of the present application. As shown in FIG14 , the method includes the following steps:
[0197] S1401: The AP determines whether the current scenario is a CP synthesis scenario.
[0198] If not, then execute steps S1402 to S1406. If yes, then execute step S1407.
[0199] In some embodiments, this step may also be implemented as follows: the AP determines whether the current scene is GPU synthesis, and if so, executes steps S1402 to S1406. If not, executes step S1407.
[0200] In some embodiments, before executing step S1401 , the AP has learned, based on step S1307 shown in FIG. 13 , which frame of image data to be synthesized currently needs to be accurately (or sent).
[0201] In other embodiments, if the method shown in FIG. 13 does not include step S1307, then in such embodiments, the CP may send a state synchronization message to the AP. For an introduction to such a state synchronization message, please refer to the above description. In such an embodiment, this application does not limit the timing of the CP sending the state synchronization message to the AP; for example, the CP may send the state synchronization message before or after step S1401. Optionally, the CP may also instruct the AP not to send the data to be synthesized to the CP.
[0202] S1402: The AP notifies the CP to execute the DSS power-off process. Accordingly, the CP receives a DSS power-off notification message from the AP.
[0203] In some embodiments, after the AP executes step S1402 , the composition thread of the AP enters a blocked state. For an introduction to the composition thread, refer to the corresponding introduction to step S1305 .
[0204] S1403: The CP executes the DSS power-off process.
[0205] Optionally, before executing step S1403, if the CP has a VSYNC signal, the CP may first send the VSYNC signal to the AP to facilitate the AP to perform subsequent layer synthesis and display operations. Of course, the CP may also send the VSYNC signal at other times, and this application does not limit the timing of sending the VSYNC signal.
[0206] Optionally, after executing step S1403 , the CP may further notify the AP to execute a DSS power-on process, or notify the AP that the DSS has been successfully powered off.
[0207] S1404: The CP sends an unblocking message to the AP. Correspondingly, the AP receives the unblocking message from the CP.
[0208] The unblocking message may be used to instruct the AP to unblock the synthesis thread described in step S1402.
[0209] S1405: The AP executes the DSS power-on process.
[0210] S1406. The AP performs layer synthesis and display operations.
[0211] For example, the AP can collaborate with the GPU to complete layer synthesis and display operations. For example, the AP can send various instructions and the data to be synthesized to the GPU. In response, the GPU can synthesize the data into a single image. The AP can then send this image to the DSS. The DSS then processes the image and sends it to the display for display.
[0212] S1407: The AP sends the data to be synthesized to the CP, and the CP receives the data to be synthesized.
[0213] The data to be synthesized can be used by the CP to perform layer synthesis and display operations. Optionally, the AP and the CP can execute step 1305 and subsequent related steps shown in FIG. 13 .
[0214] Of course, in other embodiments, the above-described display right switching operation (e.g., switching the display right of the AP to the CP, or vice versa) may not be performed. For example, when the display right belongs to the AP and the CP performs the compositing operation, the CP can send the synthesized image to the AP, and the AP will complete the display process. For another example, when the display right belongs to the CP and the GPU performs the compositing operation, the GPU can also send the synthesized image to the CP, and the CP will complete the display process.
[0215] For example, Figure 15 shows a schematic diagram illustrating the benefits of an embodiment of the present application. It should be understood that Figure 15 uses the example of a terminal device displaying 30 frames of images. In this scenario, the technical solution provided by the embodiment of the present application can reduce the AP load by approximately 15% to 20%, reducing the power consumption of the terminal device by approximately 7 mA.
[0216] As shown in (1) of Figure 15 , (a) is the AP load benefit when the AP performs the layer synthesis operation, such as 0%. (b) is the AP load benefit corresponding to the technical solution provided in the embodiment of the application, such as reducing the AP load by 20.91%.
[0217] As shown in (2) of Figure 15 , (c) shows the current consumption of the terminal device when the AP performs the layer synthesis operation. For example, from 486 seconds to 1802 seconds, the current consumption of the terminal device is 272.37 mA. (d) shows the current consumption of the terminal device corresponding to the technical solution provided in the embodiment of the present application. For example, from 558 seconds to 1800 seconds, the current consumption of the terminal device is 264.47 mA, which is a current consumption reduction of approximately 7 mA.
[0218] For the scenario where the terminal device displays 60 frames of images, the technical solution provided by the embodiment of the present application can reduce the AP load by about 23% to 28%, and reduce the power consumption of the terminal device by about 11 mA.
[0219] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. It is understandable that, in order to realize the above functions, the terminal device includes a hardware structure and / or software module corresponding to the execution of each function. In combination with the units and algorithm steps of each example described in the embodiment disclosed in this application, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present application.
[0220] The present application is an embodiment that can divide the functional modules of the terminal device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0221] As shown in Figure 16, a schematic diagram of the structure of another terminal device provided in an embodiment of the present application, the terminal device 1600 can be used to implement the methods described in the above method embodiments.
[0222] The processing module 1601 is used to execute the processing function of supporting the terminal device 1600 to execute any one of Figures 1 to 15.
[0223] The acquisition module 1602 is used to execute the acquisition function of supporting the terminal device 1600 to execute any one of Figures 1 to 15.
[0224] Optionally, the terminal device 1600 shown in FIG16 may further include a display module 1603. The display module 1603 may be used to display the synthesized image, etc., and / or the display module 1603 may be further used to support the terminal device 1600 in performing other display operations performed by the terminal device in the embodiments of the present application.
[0225] Optionally, the terminal device 1600 shown in Figure 16 may also include a communication module (not shown in Figure 16), which is used to support the terminal device 1600 to execute the steps of communication between the terminal device and other devices in the embodiments of the present application.
[0226] Optionally, the terminal device 1600 shown in Figure 16 may further include a storage module (not shown in Figure 16) that stores a program or instruction. When the processing module 1601 executes the program or instruction, the terminal device 1600 shown in Figure 16 can execute the method shown in the above method embodiment.
[0227] The technical effects of the terminal device 1600 shown in FIG16 can refer to the technical effects of the method described in the above method embodiment and will not be repeated here. The processing module 1601 involved in the terminal device 1600 shown in FIG16 can be implemented by a processor or processor-related circuit components, which can be a processor or processing module. The communication module can be implemented by a transceiver or transceiver-related circuit components, which can be a transceiver or transceiver module. The display module 1603 can be implemented by display screen-related components.
[0228] An embodiment of the present application also provides a chip system, as shown in Figure 17, which includes at least one processor 1701 and at least one interface circuit 1702. The processor 1701 and the interface circuit 1702 can be interconnected via lines. For example, the interface circuit 1702 can be used to receive signals from other devices. For another example, the interface circuit 1702 can be used to send signals to other devices (such as the processor 1701). Exemplarily, the interface circuit 1702 can read instructions stored in the memory and send the instructions to the processor 1701. When the instructions are executed by the processor 1701, the terminal device can execute the various steps performed by the terminal device in the above embodiment. Of course, the chip system can also include other discrete components, which is not specifically limited in the embodiment of the present application.
[0229] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
[0230] Optionally, the memory in the chip system may be one or more memories. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in this application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. This application does not specifically limit the type of memory or the configuration of the memory and the processor.
[0231] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
[0232] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
[0233] An embodiment of the present application further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on a terminal device, the terminal device executes the method described in the above method embodiment.
[0234] An embodiment of the present application provides a computer program product, which includes: a computer program or instructions, which, when executed on a computer, causes the computer to execute the method described in the above method embodiment.
[0235] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory to enable the device to execute the methods in the above-mentioned method embodiments.
[0236] Among them, the terminal device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0237] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0238] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The various embodiments can be combined with each other or referenced to each other without conflict. The device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0239] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0240] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0241] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0242] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A layer synthesis method, characterized in that: Applied to a terminal device including a first processing unit and a second processing unit, the method includes: Obtaining a composition request for a first layer, where the first layer is a layer rendered by the first processing unit; In response to a synthesis request of the first layer, synthesizing the first layer into an image using the second processing unit; The first processing unit is a high power consumption processing unit, and the second processing unit is a low power consumption processing unit.
2. The method according to claim 1, characterized in that: The synthesis request of the first layer instructs the terminal device to use the first processing unit to synthesize the first layer into an image.
3. The method according to claim 1 or 2, characterized in that: Before synthesizing the first layer into an image using the second processing unit, the method further includes: The second processing unit receives the first layer from the first processing unit.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If the display right belongs to the first processing unit, the display right is switched to the second processing unit, and the display right is the right to control the display subsystem DSS.
5. The method according to claim 4, characterized in that The switching the display right to the second processing unit includes: The first processing unit performs an operation of powering off the DSS; The first processing unit sends a first message to the second processing unit; In response to the first message, the second processing unit performs an operation of powering on the DSS.
6. The method according to any one of claims 1 to 5, characterized in that: After synthesizing the first layer into an image using the second processing unit, the method further includes: The second processing unit sends a status synchronization message to the first processing unit, where the status synchronization message is used to indicate that the second processing unit has synthesized the first layer into an image.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The second processing unit obtains a vertical synchronization VSYNC signal; The second processing unit sends the VSYNC signal to the first processing unit, where the VSYNC signal is used to instruct the first processing unit to render a layer included in a next frame of image.
8. The method according to any one of claims 4 to 7, characterized in that: The terminal device further includes a third processing unit; and the method further includes: Get the composition request of the second layer; If the synthesis request of the second layer indicates that the terminal device uses the third processing unit to synthesize the second layer into an image, then in response to the synthesis request of the second layer, the terminal device uses the third processing unit to synthesize the second layer into an image.
9. The method according to claim 8, characterized in that The method further comprises: If the display right belongs to the second processing unit, the display right is switched to the first processing unit.
10. The method according to claim 9, characterized in that The step of switching the display right to the first processing unit includes: The first processing unit sends a second message to the second processing unit; In response to the second message, the second processing unit performs an operation of powering off the DSS; The second processing unit sends a third message to the third processing unit; In response to the third message, the first processing unit performs an operation of powering on the DSS.
11. The method according to any one of claims 8 to 10, characterized in that: The first processing unit includes an application processor AP, and / or the second processing unit includes a coprocessor CP, and / or the third processing unit includes a graphics processor GPU.
12. A terminal device, characterized in that: The terminal device comprises a processor and a memory, wherein the memory is coupled to the processor, the memory is used to store computer program code, the computer program code comprises computer instructions, and the processor reads the computer instructions from the memory so that the terminal device executes the method as described in any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises a computer program, and when the computer program is executed on a terminal device, the terminal device is caused to execute the method according to any one of claims 1 to 11.
