Frequency modulation method and electronic device

By adjusting the GPU frequency according to different application requirements, the problems of power consumption and heat generation in electronic devices after increasing the GPU frequency are solved, achieving more efficient performance.

CN119271029BActive Publication Date: 2026-04-21HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-04-29
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, increasing the GPU frequency of electronic devices leads to a rapid increase in overall power consumption, causing overheating and affecting performance.

Method used

By adjusting the GPU frequency to different values ​​according to the needs of different applications, the power consumption and heat generation of the entire device can be controlled, thereby improving the performance of electronic devices.

Benefits of technology

It effectively controls the power consumption and heat generation of the entire device, improves the performance of electronic devices, and avoids stuttering and overheating problems caused by excessive frequency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271029B_ABST
    Figure CN119271029B_ABST
Patent Text Reader

Abstract

A frequency modulation method and electronic device, relating to the field of terminal technology, allow for increasing the frequency of a GPU by adjusting the frequency to different values ​​for different applications, thereby improving the performance of the electronic device. The method includes: the electronic device launching a first application in the foreground; in response to detecting that a GPU frequency increase condition is met, the electronic device increasing the GPU frequency to a first frequency; the electronic device launching a second application in the foreground; and in response to detecting that the frequency increase condition is met, the electronic device increasing the GPU frequency to a second frequency, wherein the first application and the second application are different, and the second frequency is different from the first frequency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a frequency modulation method and electronic device. Background Technology

[0002] In electronic devices such as mobile phones and tablets, the Graphics Processing Unit (GPU) is a crucial component for image processing. Image processing includes image rendering and image compositing. Generally, a higher GPU frequency provides greater computing power and higher image processing efficiency. Conversely, a higher GPU frequency means less computing power and lower image processing efficiency. Therefore, electronic devices can adjust the GPU frequency to meet their image processing efficiency requirements.

[0003] However, in the existing technology, increasing the GPU frequency of electronic devices may cause the overall power consumption of the electronic devices to rise rapidly, which will worsen the heat generation problem and affect the use of the electronic devices. Summary of the Invention

[0004] This application provides a frequency modulation method and an electronic device. When increasing the frequency of a GPU, the frequency can be increased to different values ​​for different applications, thereby controlling the overall power consumption of the electronic device, controlling the overall heat generation, and improving the performance of the electronic device.

[0005] To achieve the above objectives, this application adopts the following technical solution:

[0006] In a first aspect, this application provides a frequency modulation method applied to an electronic device, the electronic device including a graphics processing unit (GPU). The electronic device launches a first application in the foreground. In response to detecting that a frequency boosting condition for the GPU is met, the electronic device boosts the GPU frequency to a first frequency. That is, the upper frequency limit corresponding to the first application is the first frequency. The electronic device launches a second application in the foreground. In response to detecting that a frequency boosting condition is met, the electronic device boosts the GPU frequency to a second frequency. That is, the upper frequency limit corresponding to the second application is the second frequency. The first application and the second application are different, and the second frequency is different from the first frequency. For example, the first application and the second application can be any two of the applications A-H mentioned below, or an email address.

[0007] In summary, by adopting this application, after different applications are launched in the foreground, the GPU frequency of an electronic device can be increased to different frequencies. This allows for a more appropriate frequency boost for different applications, rather than uniformly boosting to the highest frequency. This is more conducive to controlling the overall power consumption and heat generation of the electronic device, thereby improving its performance.

[0008] In one possible design of the first aspect, the above-mentioned response to detecting that the GPU frequency boosting condition is met, the electronic device boosts the GPU frequency to a second frequency, including: when the second application meets the first condition, the electronic device boosts the GPU frequency to a second frequency in response to detecting that the GPU frequency boosting condition is met.

[0009] The first condition includes at least one of the following: (1) The second application is not an application in the blacklist. The blacklist records applications that do not require frequency adjustment. If the second application is not an application in the blacklist, it means that the electronic device can use the frequency corresponding to the second application (hereinafter referred to as the frequency upper limit) for frequency adjustment. That is to say, by using (1), the electronic device can increase the frequency of the GPU based on the frequency corresponding to the application outside the blacklist.

[0010] (2) The second application is the application with the largest display size in the foreground. The largest display size of the second application indicates that the GPU performs image processing on the second application with the most pixels, and the frequency requirement of the GPU is higher. (3) The second application is the application with the highest priority among the applications running in the foreground. The priority matches the application load. The higher the application load, the higher the priority and the higher the frequency requirement of the GPU. That is to say, by using (2) and / or (3), the electronic device can increase the frequency of the GPU based on the frequency corresponding to the application with higher GPU frequency requirements, thereby ensuring the operation of the application with higher GPU requirements.

[0011] In one possible design of the first aspect, after the electronic device launches the second application in the foreground, the method further includes: the electronic device running the first application and the second application in the foreground. That is, the electronic device can launch the first application first, then launch the second application, and after both the first and second applications are launched, the electronic device simultaneously runs the first application and the second application in the foreground. For example, the first application is application A below, and the second application is email below; or, the first application is application C below, and the second application is application D below; or, the first application and the second application are a combination of applications E and F below.

[0012] If the second application does not meet the first condition, the electronic device increases the GPU frequency to the first frequency in response to detecting that the GPU frequency boosting condition is met. In other words, when multiple applications are running simultaneously on the electronic device, if the currently launched application (i.e., the second application) does not meet the first condition, the GPU frequency can be increased based on the frequency of the previously launched application that is still running in the foreground (i.e., the first application).

[0013] It should be noted that since the electronic device boosts the GPU frequency based on the first frequency corresponding to the first application before launching the second application, it is evident that the GPU frequency can be boosted using the frequency corresponding to the first application. Therefore, even if the second application does not meet the first condition, the GPU frequency can be boosted to the first frequency once the boosting condition is detected. Conversely, if the first application also does not meet the first condition, the GPU frequency cannot be boosted to the first frequency if the second application does not meet the first condition.

[0014] It should be noted that the two specific design methods described above only pertain to the second application. In practice, the first application follows the same principle, and will not be elaborated upon here.

[0015] In one possible design approach of the first aspect, after the electronic device launches the second application in the foreground, the method further includes: the electronic device running the second application in the foreground, and ending the running of the first application in the foreground. That is, after the electronic device launches the second application in the foreground, the first application is no longer running in the foreground. For example, the first application is a desktop application, and the second application is the application corresponding to a certain application icon on the desktop; the application icon on the desktop can trigger entry into a certain application from the desktop. Another example is that the first application is application A, application B, application C, etc., and the second application is a desktop application; swiping up from the bottom of the application interface of application A, application B, application C, etc., allows entry into the desktop.

[0016] If the second application does not meet the first condition, and the first application has also exited the foreground, it indicates that the phone is adjusting the GPU frequency based on the frequency corresponding to the first application that has been moved to the background or closed. Since an application that has been moved to the background or closed typically no longer requires image processing, there is no need to continue adjusting the GPU frequency based on the frequency corresponding to that application. In this case, the electronic device can turn off the first switch. After turning off the first switch, the electronic device does not adjust the GPU frequency.

[0017] By adopting this design approach, electronic devices can promptly shut down frequency modulation when there is no need for it, thereby reducing the power consumption of the electronic devices.

[0018] In one possible design approach of the first aspect, after the electronic device launches the second application in the foreground, the method further includes: the electronic device running the second application in full-screen mode in the foreground, and running the first application in a floating window in the foreground. That is, at this time, the display size of the second application is at its maximum, and in response to detecting that the frequency increase condition is met, the electronic device can increase the GPU frequency to a second frequency to ensure the operation of the second application, which has a higher frequency requirement for the GPU.

[0019] After the electronic device increases the GPU frequency to the second frequency in response to detecting that the frequency increase condition is met, the method further includes: in response to the first trigger operation (i.e., the switching operation hereinafter), the electronic device runs the first application in full-screen mode in the foreground and the second application in a floating window in the foreground. That is, the display size of the first application is maximized when switched to. In this case, in response to detecting that the frequency increase condition is met, the electronic device increases the GPU frequency to the first frequency.

[0020] In one possible design of the first aspect, after the electronic device launches the second application in the foreground, the method further includes: the electronic device running the first and second applications in a split-screen manner in the foreground. At this time, if the split-screen size of the second application is larger, or the split-screen sizes of the first and second applications are the same, the electronic device can increase the GPU frequency to a first frequency in response to detecting that the frequency increase condition is met. After the electronic device increases the GPU frequency to a second frequency in response to detecting that the frequency increase condition is met, the method further includes: in response to a second trigger operation (i.e., the adjustment operation hereinafter), the electronic device adjusts the split-screen size of the first application to a first size and adjusts the split-screen size of the second application to a second size, where the first size is larger than the second size. That is, after adjustment, the split-screen size of the first application is larger. In this case, in response to detecting that the frequency increase condition is met, the electronic device increases the GPU frequency to the first frequency.

[0021] By adopting the two design methods described above, when an electronic device is running multiple applications simultaneously in the foreground, after the application with the largest display size is switched, the electronic device will also switch to increase the upper limit of the GPU frequency so that the upper limit of the frequency is consistent with the application with the largest display size. This ensures the operation of applications with higher GPU frequency requirements.

[0022] In one possible design of the first aspect, after the electronic device launches the second application in the foreground, the method further includes: the electronic device running the first and second applications in the foreground. After the electronic device increases the GPU frequency to a second frequency in response to detecting that a frequency increase condition is met, the method further includes: in response to a third trigger operation (i.e., triggering an operation to exit foreground execution), the electronic device ending the execution of the second application in the foreground. In response to detecting that a frequency increase condition is met, the electronic device increases the GPU frequency to a first frequency.

[0023] Using this design, when multiple applications are running simultaneously on an electronic device, if a second application is exited and run in the foreground, the electronic device can resume using a frequency boosted based on the frequency of the first application.

[0024] It should be noted that before launching the second application, the electronic device boosts the GPU frequency based on the first frequency corresponding to the first application. This shows that the GPU frequency can be boosted using the frequency corresponding to the first application. Therefore, after exiting the second application running in the foreground, the GPU frequency can be restored to be boosted based on the frequency corresponding to the first application.

[0025] Of course, if other applications are running in the foreground, the electronic device can increase the GPU frequency based on the frequency of the application with the highest priority and / or the largest display size.

[0026] In one possible design approach of the first aspect, after the electronic device launches a first application in the foreground, or after the electronic device launches a second application in the foreground, the method further includes: in response to detecting that a GPU downclocking condition is met, the electronic device reduces the GPU frequency. For example, the electronic device may reduce the GPU frequency in frequency increments.

[0027] In one possible design approach of the first aspect, the electronic device stores a mapping table between application identifiers and frequencies (hereinafter referred to as matching frequencies), as shown in Table 1 below. After the electronic device launches a first application in the foreground, the method further includes: the electronic device queries the mapping table to find the application identifier of the first application, indicating that the first application is a power-sensitive application as described below, and the first frequency is the frequency corresponding to the application identifier of the first application in the mapping table. After the electronic device launches a second application in the foreground, the method further includes: the electronic device does not find the application identifier of the second application in the mapping table, indicating that the second application is a regular application as described below, and the second frequency is the highest frequency of the GPU, which is higher than the first frequency.

[0028] In other words, by adopting this design approach, when power-sensitive applications are launched, electronic devices can increase the GPU frequency to a slightly lower frequency than the maximum frequency to avoid overheating and deterioration, thus ensuring the performance of electronic devices while increasing the GPU frequency.

[0029] In one possible design approach of the first aspect, the electronic device also includes image compositing processing services, accelerated graphics interface services, display drivers, and a hardware overlay (HWC). After the electronic device launches the second application in the foreground, the upper limit of the GPU frequency can be determined through the following steps:

[0030] The second application requests an application from the image compositing service layer. This layer request includes the application's identifier. The image compositing service retrieves the application's identifier from the layer request and sends it to the accelerated image interface service. The accelerated image interface service checks whether the second application meets a first condition based on the application's identifier. If the second application meets the first condition, the accelerated image interface service queries a mapping table for the application's identifier, which includes the correspondence between application identifiers and frequencies. If the application's identifier is found in the mapping table, the service obtains the corresponding frequency and sends it to the display driver. This means the upper frequency limit is the frequency corresponding to the application's identifier in the mapping table. If the application's identifier is not found in the mapping table, the service sends the GPU's highest frequency to the display driver. In other words, the electronic device can determine the upper frequency limit through the accelerated image interface service, rather than always deciding on the highest frequency.

[0031] Furthermore, the display driver can also detect whether the frequency increase conditions are met. In response to detecting that the frequency increase conditions are met, the electronic device increases the GPU frequency to a second frequency, including: in response to detecting that the frequency increase conditions are met, the display driver sends a frequency increase message to the HWC, the frequency increase message including the frequency or maximum frequency corresponding to the identifier of the second application, and the second frequency including the frequency or maximum frequency corresponding to the identifier of the second application. The HWC then increases the GPU frequency to the second frequency. In this way, the HWC can increase the GPU frequency according to the upper limit of the frequency, instead of increasing it to the maximum frequency every time.

[0032] Secondly, this application also provides an electronic device including a display screen, a memory, and one or more processors. The display screen, memory, and processors are coupled. The memory stores computer program code, including computer instructions, which, when executed by the processor, cause the electronic device to perform the methods described in the first aspect and any of its possible designs.

[0033] Thirdly, this application provides a chip system applied to an electronic device including a display screen and a memory; the chip system includes one or more interface circuits and one or more processors; the interface circuits and processors are interconnected via lines; the interface circuits are used to receive signals from the memory of the electronic device and send signals to the processor, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device performs the method as described in the first aspect and any of its possible design embodiments.

[0034] Fourthly, this application provides a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform a method as described in the first aspect and any possible design thereof.

[0035] Fifthly, this application provides a computer program product that, when run on a computer, causes the computer to perform a method as described in the first aspect and any of its possible design methods.

[0036] Understandably, the beneficial effects that the electronic device of the second aspect, the chip system of the third aspect, the computer storage medium of the fourth aspect, and the computer program product of the fifth aspect can achieve can be referred to the beneficial effects of the first aspect and any of its possible design embodiments, which will not be repeated here. Attached Figure Description

[0037] Figure 1 This is one of the application diagrams of the frequency modulation method provided in the embodiments of this application;

[0038] Figure 2 A scenario diagram illustrating the running of multiple applications in the foreground, provided as an embodiment of this application;

[0039] Figure 3 This is the second schematic diagram illustrating the application of the frequency modulation method provided in the embodiments of this application;

[0040] Figure 4 A flowchart of the frequency modulation method provided in the embodiments of this application;

[0041] Figure 5 A flowchart of a frequency modulation method;

[0042] Figure 6 This is the third schematic diagram illustrating the application of the frequency modulation method provided in the embodiments of this application;

[0043] Figure 7 Fourth schematic diagram illustrating the application of the frequency modulation method provided in the embodiments of this application;

[0044] Figure 8 Fifth schematic diagram illustrating the application of the frequency modulation method provided in the embodiments of this application;

[0045] Figure 9 This is the sixth schematic diagram illustrating the application of the frequency modulation method provided in the embodiments of this application;

[0046] Figure 10 A hardware and software architecture diagram of a mobile phone provided in an embodiment of this application;

[0047] Figure 11 Timing interaction diagram of the frequency modulation method provided in the embodiments of this application;

[0048] Figure 12 This is a schematic diagram of an image processing procedure;

[0049] Figure 13 A diagram showing the correspondence between frequency ranges and frequency values ​​provided in the embodiments of this application;

[0050] Figure 14 A schematic diagram illustrating the principle of determining the frequency increase timing provided in an embodiment of this application;

[0051] Figure 15 A schematic diagram illustrating the principle of determining the timing of frequency reduction as provided in an embodiment of this application;

[0052] Figure 16 This is a frequency modulation example diagram provided for an embodiment of this application. Detailed Implementation

[0053] The technical solutions of the embodiments of this application are described below with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" refer to one or more (including two). The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0054] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0055] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0056] The frequency modulation method provided in this application can be applied to scenarios in electronic devices that require GPU image processing, including scenarios where the GPU is needed for image rendering and image compositing. It should be noted that, typically, the hardware composer (HWC) in electronic devices can only perform simple image compositing tasks, while complex image compositing also requires GPU participation. For example, in game applications, the GPU is needed to participate in image rendering and image compositing to process multiple frames of game footage. Similarly, in video players, the GPU is needed to participate in image rendering and image compositing to process multiple video frames. Furthermore, displaying motion effects may also require the GPU to participate in image rendering and image compositing to process multiple motion effect frames.

[0057] In the above scenarios, by employing the frequency modulation method provided in this application embodiment, the electronic device can adjust the GPU frequency to meet the needs of image processing. In some embodiments, after detecting that the GPU cannot complete the image processing task in a timely manner, the electronic device can increase the GPU frequency to the maximum frequency, enabling the GPU to provide sufficient computing power to complete the image processing in a timely manner.

[0058] Understandably, increasing the GPU frequency will increase the overall power consumption of electronic devices. In practice, the impact of increasing the GPU frequency on the overall power consumption of electronic devices varies depending on the application being run, and consequently, the impact on the user experience also differs.

[0059] Take the comparison between game applications and video players as an example:

[0060] When running games, electronic devices rapidly increase their GPU frequency to the maximum, leading to a rapid rise in overall power consumption and noticeable heat generation. If this overheating worsens, such as reaching a preset temperature, the device will limit the GPU frequency to a lower value, a process known as thermal throttling. After thermal throttling, games may experience frame drops and stuttering due to insufficient GPU frequency.

[0061] When a video player is running, increasing the GPU frequency to its maximum does not significantly increase the overall power consumption or cause a rapid rise in temperature. In this situation, the device does not quickly reach thermal throttling, allowing the video player to run smoothly without frame drops or stuttering.

[0062] For ease of explanation, applications that have a significant impact on the overall power consumption, such as the aforementioned gaming applications, can be referred to as power-sensitive applications, while applications that have a smaller impact on the overall power consumption, such as the aforementioned video players, can be referred to as regular applications.

[0063] In other words, when running power-sensitive applications, increasing the GPU frequency to its maximum frequency may affect the user experience of these applications, such as causing frame drops or stuttering.

[0064] To address the aforementioned issues, this application provides a frequency tuning method. After launching an application (denoted as the target application, including power-sensitive applications and regular applications), when the electronic device increases the GPU frequency, it can raise the GPU frequency to a matching frequency corresponding to the target application, rather than raising it to the highest frequency. The matching frequency can satisfy two conditions: meeting the image processing requirements of the target application and not significantly increasing the overall power consumption. For example, the matching frequency corresponding to a power-sensitive application is lower than the matching frequency (i.e., the highest frequency) corresponding to a regular application. Thus, for each application, increasing the GPU frequency will not significantly increase power consumption and thus reduce the user experience.

[0065] Normally, when an application's interface is displayed in the foreground, the GPU needs to perform image processing on that application. Correspondingly, in this article, "launching an application" refers to launching the application in the foreground, that is, running and displaying the application interface in the foreground after startup.

[0066] For example, the electronic device in this application embodiment can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, and other devices that support display functions. This application embodiment does not impose any special limitations on the specific form of the electronic device. In the following, a mobile phone will be used as an example to illustrate the solution of this application.

[0067] After launching the target application, the phone can obtain the application identifier of the target application and determine the matching frequency corresponding to the target application based on the application identifier. The application identifier can be the application name, application package name, etc. In the following text, we will mainly use the application package name as an example. For ease of explanation, the application package name of the target application can be referred to as the target package name.

[0068] For example, the phone records the application package names of each of the multiple power-sensitive applications installed on the phone, along with their corresponding matching frequencies. For instance, the phone records the data shown in Table 1 below:

[0069] Table 1

[0070] Application package name Matching frequency AAAAA f1 BBBBB f2 CCCCC f3 DDDDD f4

[0071] After obtaining the target package name, the mobile phone can query the target package name from the data recorded above. If the target package name is found, it indicates that the target application is a power-sensitive application, and the mobile phone can obtain the matching frequency corresponding to the target package name, thus obtaining the matching frequency corresponding to the target application. For example, if the target package name is "AAAAA", the mobile phone can obtain the frequency f1 corresponding to the target application by querying Table 1 above. Conversely, if the target package name is not found, it indicates that the target application is a regular application, and the mobile phone can obtain the highest matching frequency corresponding to the target application. For example, if the target package name is "EEEEE", the mobile phone can obtain the highest matching frequency corresponding to the target application by querying the application package names in Table 1 above, excluding "EEEEE".

[0072] Of course, the phone can also record the package names of regular applications and their corresponding highest frequencies. If the target application is a regular application, the phone can query the highest frequency corresponding to the target package name, thus determining that the target application's matching frequency is the highest frequency.

[0073] Different power-sensitive applications may require different matching frequencies. For example, f1 and f2 in Table 1 above are different, indicating that the matching power for a power-sensitive application indicated by "AAAAA" is different from that indicated by "BBBBB". Generally, the heavier the load of a power-sensitive application, the higher the matching frequency should be, so that the matching frequency can meet the application's load requirements. For example, "AAAAA" indicates an application installed on the phone, denoted as application A, and "BBBBB" indicates another application installed on the phone, denoted as application B. Both applications A and B are power-sensitive applications, but application A has a more complex screen and a higher frame rate, resulting in a higher image processing load, while application B has a simpler screen and a lower frame rate, resulting in a lower image processing load. Therefore, the matching frequency f1 corresponding to "AAAAA" can be set higher than the matching frequency f2 corresponding to "BBBBB".

[0074] See Figure 1 Taking two different game applications, A and B, as an example, application A's screen is shown in interface 101, and application B's screen is shown in interface 102. Interface 101 is more complex than interface 102. When running application A, if you want to increase the frequency, you can increase it to f1. When running application B, if you want to increase the frequency, you can increase it to f2, where f1 > f2.

[0075] Therefore, it should be noted that the timing for increasing the frequency is detailed below. Figures 12-15 The relevant explanations will not be elaborated upon here.

[0076] A mobile phone can run one or more applications in the foreground. The more applications running at the same time, the heavier the image processing tasks that require the GPU and the higher the frequency requirement for the GPU.

[0077] When a phone is running an application in the foreground, such as in full-screen mode, the GPU is primarily used for image processing within that application. See also... Figure 1 The phone can display interface 101 or interface 102. Interface 101 displays the application interface of application A in full screen, while interface 102 displays the application interface of application B in full screen. That is, the phone runs one application in full screen, and the GPU is mainly used for image processing of one application.

[0078] When a phone runs multiple applications in the foreground, such as in split-screen or floating window mode, the GPU needs to be used for image processing across these applications. See also Figure 2 In response to a user's swipe from the right edge of interface 201 (same as interface 101 above) to the left (as indicated by the arrow in interface 201), the phone can display interface 202. Interface 202 includes the application interface 2021 of application A and a pop-up window 2022. Pop-up window 2022 includes application icons for multiple shortcut applications, such as the application icon 2023 for Favorites, the application icon 2024 for Email, and the application icon 2025 for Notes. In response to a user's click on the application icon of any shortcut application, the phone can further display the application interface of that shortcut application in the form of a floating window. Taking Email as an example, in response to a user's click on the application icon 2024 of Email in interface 202, the phone can display interface 203. Interface 203 still includes the application interface 2021 of application A, and also includes the application interface 2032 of Email displayed in the floating window 2031. That is, the phone runs two applications, application A and email, in the foreground, and the GPU is used for image processing of application A and email.

[0079] It should be noted that running application A and email in the foreground is just one specific example. In reality, many applications installed on a mobile phone can run simultaneously in the foreground, such as multiple games, chat applications, shopping applications, video players, etc., which can run in the foreground simultaneously as floating windows or in split-screen mode.

[0080] Considering both the scenarios of running one application and running multiple applications, in some embodiments, the mobile phone can set a matching frequency for a power-sensitive application based on the GPU frequency requirements when running multiple applications. Specifically, for any power-sensitive application, the mobile phone can set a matching frequency such that it is greater than or equal to the GPU frequency required by multiple applications, including the power-sensitive application, running simultaneously in the foreground.

[0081] Taking any power-sensitive application, application A, as an example: When the phone runs application A in the foreground, the required GPU frequency (which can be the highest frequency, average frequency, etc., as discussed below) is f5. When the phone runs application A in the foreground and email in a floating window, the required GPU frequency is f6. And when the phone runs application A and email in split-screen mode in the foreground, the required GPU frequency is f7. Accordingly, the matching frequency corresponding to "AAAAA" indicating application A in Table 1 above can be the highest frequency f6 among f5, f6, and f7, or a frequency higher than f6. In this way, after launching application A, the GPU frequency can be increased to f1, ensuring sufficient GPU frequency even when running multiple applications, including application A, in the foreground.

[0082] Although a phone can run multiple apps in the foreground, at any given time, the phone will adjust the GPU frequency based on the frequency limit corresponding to one of the apps, rather than adjusting the GPU frequency based on multiple frequency limits corresponding to multiple apps separately, to avoid frequency adjustment confusion. It should be noted that the frequency limit here is not the same as the matched frequency mentioned earlier. If the app is a power-sensitive app, the frequency limit for that app refers to the matched frequency; if the app is a regular app, the frequency limit for that app refers to the highest frequency.

[0083] See also Figure 2 The phone can display interface 203, which shows multiple applications running in the foreground, including application A and email. The phone can increase the GPU frequency based on the frequency limit (e.g., f1) corresponding to application A, instead of increasing the GPU frequency separately based on the frequency limit (e.g., f1) corresponding to application A and the frequency limit (e.g., maximum frequency) corresponding to email, thus avoiding chaotic GPU frequency adjustment.

[0084] In some embodiments, the mobile phone may decide whether to adjust the GPU frequency based on the frequency limit corresponding to the target application based on at least one of the following: the triggering method of the target application and the priority order of the target application.

[0085] First, the triggering method of the target application.

[0086] The triggering launch methods include, but are not limited to, at least one of the following: triggering the launch of the target application by performing a triggering operation (such as a click operation) on the application icon of the target application on the desktop (referred to as method 1); triggering the launch of the target application by performing a triggering operation (such as a click operation) on the shortcut icon of the target application in the pop-up window (such as pop-up window 2022 in interface 202) (referred to as method 2); and triggering the launch of the target application by performing a triggering operation (such as a click operation) on the interface thumbnail of the target application in the multitasking interface (referred to as method 3).

[0087] Different trigger launch methods can cause the phone to run the target application in different forms (such as full-screen, floating window, etc.). For example, in response to method 1 or method 3, the phone can run the target application in full-screen mode, such as... Figure 1 In interface 101, application A runs in full screen; in interface 102, application B runs in full screen. As another example, in response to method 2, the phone can run the target application in a floating window, such as... Figure 2 The email service runs in the floating window 2031 in the interface 203 shown.

[0088] Understandably, the number of pixels the GPU needs to process during image processing differs depending on the target application's execution mode, and consequently, the required GPU frequency varies. Full-screen mode has the largest display size, requiring the GPU to process the most pixels; while floating-window mode has a smaller display size than full-screen mode, requiring the GPU to process fewer pixels.

[0089] When deciding whether to adjust the GPU frequency based on the frequency limit corresponding to a target application's launch method, the phone can use the following approach: If the launch method, such as method 1 or method 3, triggers the phone to run the target application in full-screen mode, it indicates that the target application's display size is the largest, and the GPU needs to process the most pixels. In this case, the phone can adjust the GPU frequency based on the frequency limit corresponding to the target application. If the launch method, such as method 2, triggers the phone to run the target application in a floating window mode, it indicates that the target application's display size is not the largest, and the GPU does not need to process the most pixels. In this case, the phone can choose not to adjust the GPU frequency based on the frequency limit corresponding to the application with higher GPU frequency requirements, thus ensuring the smooth operation of applications with higher GPU frequency requirements.

[0090] Taking the example of first triggering application A using method 1, and then triggering email using method 2, see [link to example]. Figure 3 The phone can display interface 301, which is the phone's desktop. Interface 301 includes an application icon 3011 for application A. In response to a user's click on application icon 3011 in interface 301 (i.e., in response to method 1), the phone can launch application A; that is, the current target application is application A. Furthermore, since method 1 can trigger the phone to run the target application in full-screen mode, such as the application interface of application A displayed in full-screen mode in interface 101, the phone can adjust the GPU frequency based on the frequency limit (e.g., f1) corresponding to application A. Figure 3 (This is abbreviated as FM, and will be the same throughout). Note that interface 101 has switched from portrait to landscape mode compared to interface 301. Subsequently, it responds to the user's action of clicking the email application icon in the pop-up window that appears from interface 101 (i.e., responding to method 2, see details below). Figure 2 (As introduced above), the phone can launch the email application, meaning the current target application is the email application. Furthermore, since method 2 can trigger the phone to run the target application in a floating window, such as the email application interface 2032 displayed in the floating window 2031 in interface 203, the phone will not adjust the GPU frequency based on the email application's running status, but will continue to adjust the GPU frequency based on the frequency limit (e.g., f1) corresponding to application A.

[0091] Of course, besides the aforementioned trigger launch methods, there are other trigger launch methods that can cause the phone to run the target application in split-screen mode. In split-screen mode, the larger the split-screen size, the more pixels the GPU needs to process; conversely, the smaller the split-screen size, the fewer pixels the GPU needs to process. Based on this, when deciding whether to adjust the GPU frequency based on the target application's frequency limit, the phone can use the following method: If the trigger launch method causes the phone to run the target application in split-screen mode, and the target application's split-screen size is the largest, then the GPU needs to process the most pixels, and the phone can adjust the GPU frequency based on the target application's frequency limit. If the trigger launch method causes the phone to run the target application in split-screen mode, but the target application's split-screen size is not the largest, and the number of pixels the GPU needs to process is not the largest, the phone can choose not to adjust the GPU frequency based on the target application's frequency limit.

[0092] Additionally, if it's an average split-screen, meaning the split-screen sizes are equal (e.g., an average two-screen split), then the GPU needs to process the same number of pixels. Furthermore, if a launch method triggers the phone to run the target application in split-screen mode, and the target application's split-screen size is the same as other applications' split-screen sizes, the phone can adjust the GPU frequency based on the frequency limit corresponding to any of the multiple applications (including the currently launched target application or other applications).

[0093] Second, the order of application priorities.

[0094] The priority order can be matched with the application's load. Generally, the heavier the application's load, the higher the demand on the GPU frequency, and the higher the priority can be set; the lighter the application's load, the lower the demand on the GPU frequency, and the lower the priority can be set. For example, if application A has a heavier load than application B, then application A's priority is higher than application B's priority.

[0095] The phone can record the priority of installed applications. For example, the phone can record the following priority order: AAAAA, BBBBB, CCCCC, DDDDD, which represent the application package names of applications with high to low priority, respectively.

[0096] When deciding whether to adjust the GPU frequency based on the frequency limit corresponding to a target application's launch method, a mobile phone can use the following approach: If the target application is the highest priority among foreground applications, it indicates that the target application has the highest demand for GPU frequency, and the phone can adjust the GPU frequency based on the frequency limit corresponding to the target application. If the target application is not the highest priority among foreground applications, it indicates that the target application does not have the highest demand for GPU frequency, and the phone can choose not to adjust the GPU frequency based on the frequency limit corresponding to the target application. In this way, the phone can prioritize adjusting the GPU frequency based on the frequency limit corresponding to applications with higher GPU frequency requirements, thereby ensuring the operation of applications with higher GPU frequency requirements.

[0097] Taking an example where application A has a higher priority than email, if the phone launches application A and runs it in full-screen mode, then application A is the only application running in the foreground. Therefore, application A (the current target application) naturally has the highest priority among the foreground applications, and the phone can adjust the GPU frequency based on the frequency limit corresponding to application A. Subsequently, if the phone launches email and runs it in a floating window, then both applications are running in the foreground, and email has a lower priority than application A. This indicates that email (the current target application) is not the highest priority among the foreground applications, and the phone will not adjust the GPU frequency based on the frequency limit corresponding to email, but will continue to adjust the GPU frequency based on the frequency limit corresponding to application A.

[0098] Therefore, it should be noted that in some other embodiments, the phone may also combine the target application's launch method and application priority order to decide whether to adjust the GPU frequency based on the target application's frequency cap. For example, if the launch method triggers the phone to run the target application in split-screen mode, the phone can decide whether to adjust the GPU frequency based on the target application's frequency cap based on the priority of multiple applications. Alternatively, if the launch method triggers the phone to run the target application in full-screen or floating window mode, the phone can simply decide whether to adjust the GPU frequency based on the target application's frequency cap based on the launch method.

[0099] Additionally, some applications may not require GPU for image processing; these are referred to as non-frequency-tuned applications. Therefore, in some embodiments, the phone can maintain a blacklist of non-frequency-tuned applications. After launching a target application, the phone can check if the target application is on the blacklist. If the target application is on the blacklist, the phone can decide not to immediately adjust the frequency to the upper limit corresponding to the target application.

[0100] To facilitate understanding of the foregoing embodiments, the following will be combined with... Figure 4The simplified flowchart shown outlines the overall process of setting the upper limit of decision frequency after launching the target application. (See also...) Figure 4 The overall process includes:

[0101] S401, The phone launches the target application.

[0102] For example, the target application can be launched in response to methods 1, 2, 3, etc. mentioned above.

[0103] S402, The mobile phone obtains the target package name of the target application.

[0104] S403. The phone determines whether the target packet name is in the blacklist. If yes, proceed to S408; otherwise, proceed to S404.

[0105] The blacklist contains the application package names of applications that do not adjust frequencies.

[0106] If the target package name is in the blacklist, it indicates that the target application is not a frequency-tuned application. In this case, the phone will not adjust the GPU frequency based on the frequency limit corresponding to the target application. S408 can be executed to accurately control the disabling of the frequency tuning scheme. If the target package name is not in the blacklist, it indicates that the target application is not a frequency-tuned application (i.e., one that requires frequency tuning). The phone can then execute S404 to further decide whether to adjust the GPU frequency based on the frequency limit corresponding to the target application.

[0107] S404. The phone decides whether to adjust the GPU frequency based on the frequency limit corresponding to the target application. If yes, proceed to S405; otherwise, proceed to S408.

[0108] For example, a mobile phone can decide whether to adjust the GPU frequency based on the target application's launch method and application priority order, thereby ensuring the operation of applications with higher GPU frequency requirements. For details, please refer to the previous explanations regarding "First, the target application's launch method" and "Second, the application priority order," which will not be repeated here.

[0109] If the decision is made to adjust the GPU frequency based on the frequency limit corresponding to the target application, it indicates that a frequency modulation scheme should be used to adjust the GPU frequency. The phone can execute S405 and subsequent steps to determine the frequency limit corresponding to the target application and adjust the frequency accordingly. Conversely, if the phone does not adjust the GPU frequency based on the frequency limit corresponding to the target application, S408 can be executed to accurately control the disabling of the frequency modulation scheme.

[0110] S405. The phone checks whether the target package name is in the list of power-sensitive applications. If yes, proceed to S406; otherwise, proceed to S407.

[0111] For example, the list of power-sensitive applications is included in Table 1 above, such as "AAAAA"-"DDDDD". If the target package name is in Table 1, it indicates that the target application is a power-sensitive application. If the target package name is not in Table 1, it indicates that the target application is not a power-sensitive application, i.e., it is a regular application. Of course, the mobile phone can also store a separate list of power-sensitive applications for detection, and this application does not specifically limit this.

[0112] If the target application is a power-sensitive application, the phone can execute S406 below to adjust the GPU frequency. If the target application is not a power-sensitive application, i.e., a regular application, the phone can execute S407 below to adjust the GPU frequency.

[0113] S406: The mobile phone queries the matching frequency corresponding to the target application based on the target package name, and adjusts the GPU frequency based on the matching frequency corresponding to the target application.

[0114] Specifically, when the conditions for frequency increase are met, i.e., when there is a need for frequency increase, the phone can increase the GPU frequency to the matching frequency corresponding to the target application.

[0115] For example, the phone can query Table 1 above to obtain the matching frequency corresponding to the target application, thereby obtaining the frequency upper limit. If it detects that the frequency increase conditions are met, such as the target application dropping frames due to the inability to complete image processing tasks in time, the phone can adjust the GPU frequency to the matching frequency corresponding to the target application.

[0116] S407: The phone adjusts the GPU frequency based on the highest frequency.

[0117] In other words, the frequency limit is the highest frequency. Similarly, when the conditions for frequency increase are detected, the phone can increase the GPU frequency to the highest frequency.

[0118] It should be noted that when the frequency reduction condition is detected, the mobile phone can also reduce the GPU frequency, such as gradually reducing the GPU frequency or reducing the GPU frequency according to the degree of frame dropping, etc. This application embodiment does not specifically limit this.

[0119] Of course, after S404 determines to adjust the GPU frequency based on the frequency limit corresponding to the target application, the phone can also detect whether it is executing a frequency adjustment scheme. If the frequency adjustment scheme is not being executed, it can be enabled, and then the phone can execute S406 and S407 to adjust the GPU frequency. If the frequency adjustment scheme is being executed, there is no need to repeatedly enable the frequency adjustment scheme; instead, the GPU frequency only needs to be adjusted based on the frequency limit determined in this instance.

[0120] S408. The phone checks whether a frequency modulation scheme is being executed. If yes, proceed to S409; otherwise, do not execute the process of disabling the frequency modulation scheme.

[0121] Considering that a mobile phone can run multiple applications in the foreground, if the frequency modulation scheme is executed, it is not directly turned off. Instead, S409 can be executed to further check whether the conditions for turning off the frequency modulation scheme are met.

[0122] If the adjustment scheme is not executed, it indicates that the frequency modulation scheme has been turned off, and the mobile phone does not need to repeat the process of turning off the frequency modulation scheme.

[0123] S409: The phone checks whether the GPU frequency is being adjusted based on the frequency limit corresponding to any application running in the foreground. If yes, the frequency adjustment scheme is not disabled; otherwise, proceed to S410.

[0124] If the phone adjusts the GPU frequency based on the frequency limit corresponding to any application running in the foreground, the phone can continue to execute the frequency adjustment scheme and there is no need to turn off the frequency adjustment scheme.

[0125] If the phone does not adjust the GPU frequency based on the frequency limit of any application running in the foreground, it indicates that the phone may be adjusting the GPU frequency based on the frequency limit of an application that has been moved to the background or closed. Since an application that has been moved to the background or closed usually no longer has image processing requirements, there is no need to continue adjusting the GPU frequency based on the frequency limit of that application that has exited the background. S410 can be executed to turn off the frequency adjustment scheme.

[0126] In some embodiments, the mobile phone can record a list of package names of applications running in the foreground. The mobile phone can also record frequency modulation package names, where a frequency modulation package name refers to the package name of the application corresponding to the frequency limit. The mobile phone can query the list of package names for frequency modulation package names. If a frequency modulation package name is found, it indicates that the mobile phone is adjusting the GPU frequency based on the frequency limit corresponding to an application running in the foreground. If no frequency modulation package name is found, it indicates that the mobile phone is not adjusting the GPU frequency based on the frequency limit corresponding to any application running in the foreground.

[0127] Furthermore, when a new application launches in the foreground, the phone can add the corresponding application package name to the package name list; when an application exits and runs in the foreground, the phone can remove the corresponding application package name from the package name list. This ensures that the application package name is consistent with the application running in the foreground.

[0128] Furthermore, after each decision is made to adjust the GPU frequency based on the frequency upper limit corresponding to the target application, the frequency tuning package name is updated to the application package name of the target application; after each frequency tuning scheme is closed, the frequency tuning package name is deleted. This ensures that the frequency tuning package name remains consistent with the actual frequency upper limit on which the frequency tuning is based.

[0129] S410, solution to disable frequency modulation on mobile phones.

[0130] In this way, the phone can ensure that the frequency modulation scheme is turned off even when the phone is not disabling the frequency modulation scheme and the phone is adjusting the GPU frequency based on the frequency limit corresponding to a certain application that has been exited to the background.

[0131] In some embodiments, the mobile phone can record the on / off state of the frequency modulation scheme, which is initially in the off state.

[0132] When frequency adjustment is required, such as after an application starts and the S404 determines to adjust the GPU frequency based on the upper frequency limit corresponding to the currently launched target application, the phone can update the switch status to the on state and adopt the frequency adjustment scheme based on the upper frequency limit. In this way, the on state can indicate that the frequency adjustment scheme is enabled.

[0133] If it is necessary to disable the frequency modulation scheme, such as after receiving a negative detection result in S409, the phone can update the switch status to the off state and disable the frequency modulation scheme. In this way, the off state can indicate that the frequency modulation scheme has been disabled.

[0134] Thus, in the S408 mentioned above, the mobile phone can accurately obtain the operating status of the frequency modulation scheme by checking the switch status.

[0135] It should be noted that in actual implementation, the phone can execute S409 first and then S408. Specifically, S409 is executed first, and the phone checks whether the GPU frequency is being adjusted based on the frequency limit corresponding to any application running in the foreground. If yes, the frequency adjustment scheme is not disabled. If no, it indicates that the phone may be adjusting the GPU frequency based on the frequency limit corresponding to an application that has been exited to the background, or the frequency adjustment scheme may have already been disabled. In this case, S408 is executed, and the phone checks whether the frequency adjustment scheme is being executed. If yes, it indicates that the phone is adjusting the GPU frequency based on the frequency limit corresponding to an application that has been exited to the background, and S410 is executed to disable the frequency adjustment scheme. If no, it indicates that the frequency adjustment scheme has already been disabled, and the frequency adjustment scheme will not be disabled again.

[0136] Of course, if we don't consider the issue of repeatedly disabling the frequency modulation scheme, the phone can also avoid executing S408, and if the detection result of S409 is yes, then the frequency modulation scheme will not be disabled, and if the detection result of S409 is no, then the frequency modulation scheme will be disabled.

[0137] The following will continue in conjunction with the preceding text. Figure 3 Examples are provided, and further descriptions are given for different scenarios involving application A and email. Figure 4 Effects of the example:

[0138] Example 1: Let's take an example where neither application A nor email is on the blacklist, and application A is a power-sensitive application while email is a regular application.

[0139] Execute S401, the phone launches application A; Execute S402, the phone obtains the target package name "AAAAA" for application A; Execute S403, the phone determines that "AAAAA" is not in the blacklist; Execute S404, application A runs in full screen, and the phone can decide to adjust the GPU frequency based on the frequency limit corresponding to application A; Execute S405, the phone detects that "AAAAA" is in the list of power-sensitive applications shown in Table 1 above; Execute S406, the phone queries the matching rate f1 corresponding to "AAAAA" from Table 1 above, that is, it obtains that the frequency limit corresponding to application A is f1, and the phone can adjust the GPU frequency based on f1. For example, when a frequency increase is needed, the GPU frequency is increased to f1 instead of the highest frequency.

[0140] Execute S401: The phone launches the email service; Execute S402: The phone obtains the target packet name of the email service, such as "EEEEE"; Execute S403: The phone determines that "EEEEE" is not in the blacklist; Execute S404: The email service runs in a floating window, and at this time, application A is running in full screen. The phone can decide not to adjust the GPU frequency based on the frequency limit corresponding to the email service; Execute S408: The phone detects that application A running in the foreground is not in the blacklist, which means that the phone can adjust the GPU frequency based on the frequency limit f1 corresponding to application A. Therefore, the phone will not turn off the frequency modulation scheme.

[0141] Example 2: Take application A as an example, where application A is not on the blacklist and is a power-sensitive application, while email is on the blacklist.

[0142] As in Example 1, execute S401-S406 to adjust the GPU frequency based on the frequency limit f1 corresponding to application A.

[0143] Execute S401 to start the email; Execute S402 to obtain the target packet name "EEEEE" from the email; Execute S403 to determine that "EEEEE" is in the blacklist; Execute S408 to detect that the foreground application A is not in the blacklist, which means that the phone can adjust the GPU frequency based on the frequency limit f1 corresponding to application A, so the phone will not turn off the frequency adjustment scheme.

[0144] It is evident that adopting Figure 4In one embodiment, when adjusting the GPU frequency, the phone uses S405 and S406 to increase the GPU frequency to a lower matching frequency, rather than the maximum frequency, for power-sensitive applications, thus ensuring phone performance while increasing the GPU frequency. In some embodiments, see... Figure 5 The phone will not execute S405 and S406 as described above, thus failing to achieve the aforementioned goal. Figure 4 The effects of the example.

[0145] use Figure 4 In one embodiment, the phone also considers the scenario of multiple applications running in the foreground. Therefore, S404 determines to adjust the GPU frequency based on the frequency limit corresponding to the application with higher GPU frequency requirements, and S408-S410 disables the frequency adjustment scheme only if the phone does not adjust the GPU frequency based on the frequency limit corresponding to any application running in the foreground. In some embodiments, however, the phone does not consider the scenario of multiple applications running in the foreground; see [link to relevant documentation]. Figure 5 The phone does not execute S404, and after S403 determines that the target application is in the blacklist, it executes S408 and S410 to disable frequency modulation, thus failing to achieve the above-mentioned goal. Figure 4 The effects of the example.

[0146] The preceding embodiments described the scheme for launching a target application. In actual implementation, when launching any target application, the preceding embodiments can be used to decide whether to adjust the GPU frequency based on the frequency limit corresponding to the target application and to determine the frequency limit (the matching frequency or the highest frequency corresponding to the target application).

[0147] In some embodiments, the mobile phone may execute the above embodiments only when the target application is launched, while at other times, the decision result remains unchanged. For example, from the time application A is launched until the email is launched, the GPU frequency is adjusted based on the frequency upper limit corresponding to application A, and when the GPU frequency is increased, it is increased to the matching frequency f1 corresponding to application A.

[0148] In other embodiments, after the target application is launched, the mobile phone can also dynamically adjust the decision result so that the decision result matches the real-time state of the mobile phone.

[0149] In some scenarios, users can switch between floating window and full-screen application interfaces. Responding to user actions such as long-pressing or zooming in on the floating window, the phone can switch the application interface displayed in the floating window to full-screen mode, and vice versa. In other words, it completes the switching between floating window and full-screen application interfaces. In this scenario, in response to the user's switching action, the phone can also adjust the GPU frequency based on the frequency limit corresponding to the application running in full-screen mode after the switch. This way, the phone can always adjust the GPU frequency based on the frequency limit corresponding to the application running in full-screen mode.

[0150] Taking the switching operation as an example of a long press on a floating window, see [link / reference]. Figure 6 Before switching, the phone displays interface 601, where application C's interface is displayed in full screen, and application D's interface is displayed in floating window 6011. That is, before the switch, application C is running in full screen, and the phone can adjust the GPU frequency based on the frequency limit corresponding to application C. In response to a long press operation on floating window 601, the phone displays interface 602, where application C's interface is displayed in floating window 6011, and application D's interface is displayed in full screen. That is, after the switch, application D is running in full screen, and the phone can adjust the GPU frequency based on the frequency limit corresponding to application D.

[0151] Similar to the decision frequency limit mentioned earlier, if the application running in full-screen mode after the switch is a power-sensitive application, then the frequency limit is the matching frequency of the application running in full-screen mode after the switch; if the application running in full-screen mode after the switch is a regular application, then the frequency limit is the highest frequency, which will not be elaborated here.

[0152] In other scenarios, users can adjust the size of the split-screen. Responding to user adjustments, such as zooming in on a split-screen area or dragging the split-screen boundary, the phone can adjust the split-screen size. In this scenario, in response to user adjustments, the phone can also adjust the GPU frequency based on the frequency limit corresponding to the application with the largest split-screen size after the adjustment. In this way, the phone can always adjust the GPU frequency based on the frequency limit corresponding to the application with the largest split-screen size.

[0153] Taking the adjustment operation as an example, which involves dragging the split-screen boundary line, see [link / reference]. Figure 7Before adjustment, the phone can display interface 701. At this time, the split-screen size of application C is larger than that of application D. Therefore, before adjustment, the split-screen size of application C is the largest, and the phone can adjust the GPU frequency based on the frequency limit corresponding to application C. Responding to the user's dragging operation on the split-screen boundary 701 upwards (as shown by the arrow in interface 701), the phone can display interface 702. At this time, the split-screen size of application C is smaller than that of application D. Therefore, after adjustment, the split-screen size of application D is the largest, and the phone can adjust the GPU frequency based on the frequency limit corresponding to application D.

[0154] Similar to the previous discussion on the upper limit of the frequency, if the application with the largest split-screen size after adjustment is a power-sensitive application, then the upper limit of the frequency is the matching frequency corresponding to the application with the largest split-screen size after adjustment; if the application with the largest split-screen size after adjustment is a regular application, then the upper limit of the frequency is the highest frequency, which will not be elaborated here.

[0155] In practice, after launching an application, the phone can also exit the application running in the foreground, such as running the application in the background or closing the application.

[0156] When a phone has an application running in the foreground, exiting that application indicates that the phone will run a new application in the foreground. For example, when application A is running in the foreground, the phone can display the previous screen 101. In response to the user performing a return-to-desktop operation on screen 101, such as swiping up from the bottom of screen 101, the phone can display the previous screen 301. That is, the phone exits application A from the foreground and simultaneously starts running a desktop application in the foreground. In other words, the new application is a desktop application. In this case, the phone uses the aforementioned embodiment for launching the target application, deciding whether to adjust the GPU frequency based on the frequency limit corresponding to the new application after launching it, and determining the frequency limit.

[0157] When multiple apps are running in the foreground on a phone, exiting one of them will still keep the remaining apps running in the foreground. In this case, the phone can adjust the GPU frequency based on the highest priority and / or largest display size of the remaining apps. As explained earlier, higher priority and larger display size require higher GPU frequencies. Therefore, even after one app exits the foreground, the phone can still ensure that the GPU frequency is adjusted based on the frequency limit of the app with the higher GPU frequency requirement.

[0158] Taking adjusting the GPU frequency based on the frequency cap corresponding to the application with the largest display size among the remaining applications as an example:

[0159] See Figure 8When the phone is running application E in full-screen mode in the foreground and application F in a floating window, interface 801 can be displayed, indicating that multiple applications are running in the foreground. At this time, application E is running in full-screen mode, and the phone can adjust the GPU frequency based on the frequency limit corresponding to application E. In response to the user dragging the floating window 8011 containing application F off-screen (as indicated by the arrow in interface 801), the phone can display interface 802. Interface 802 no longer includes the floating window; instead, it displays the application interface of application E in full-screen mode. This means that application F is no longer running in the foreground, and application E remains the only application running in the foreground. Therefore, application E naturally has the largest display size, and the phone can continue to adjust the GPU frequency based on the frequency limit corresponding to application E.

[0160] See Figure 9 When the phone is running applications E and F in split-screen mode in the foreground, interface 901 can be displayed, meaning multiple applications are running in the foreground. In this case, application E's split-screen size (i.e., display size) is larger, and the phone can adjust the GPU frequency based on the frequency limit corresponding to application E. This is in response to the user closing the display area of ​​application E in interface 901 (…). Figure 9 When a click operation (represented by ×9011) is performed, the phone can display interface 902. Interface 902 no longer includes the application interface of application E, but instead displays the application interface of application F in full screen. That is, when application E is exited from the foreground and application F remains, the display size of application F is naturally the largest, and the phone can switch to adjust the GPU frequency based on the frequency limit corresponding to application F.

[0161] Similar to the previous discussion on the upper limit of frequency, if the application with the highest priority and / or the largest display size among the remaining applications is a power-sensitive application, then the upper limit of frequency is the matching frequency corresponding to the application with the highest priority and / or the largest display size among the remaining applications; if the application with the highest priority and / or the largest display size among the remaining applications is a regular application, then the upper limit of frequency is the highest frequency, which will not be elaborated here.

[0162] It should be noted that in the preceding text, applications A and B, C and D, and E and F each represent two different applications installed on the phone, but applications in different groups can be the same. For example, at least two of applications A, C, and E can be the same application, and at least two of applications B, D, and F can also be the same application; this application does not impose specific limitations on this.

[0163] In this embodiment, the mobile phone's software system can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. The following embodiments will primarily use the layered architecture of the Android system as an example to illustrate the mobile phone's hardware and software architecture.

[0164] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. See also the documentation for some embodiments. Figure 10 The hardware and software architecture of a mobile phone, from top to bottom, consists of the application layer, the application framework layer, the native layer, the hardware abstraction layer (HAL), the kernel layer, and the hardware layer.

[0165] The application layer can contain applications such as desktop applications, games, video players, and chat applications. These applications all require displaying images on the phone's screen. For example, they need to display application icons, game screenshots, and video frames on the screen. These images mostly require GPU processing (such as rendering and compositing), thus falling under the category of scenarios requiring GPU image processing. The applications mentioned in the previous examples, such as applications A through F, can all be applications within the application layer.

[0166] The application framework layer provides the application layer with an application programming interface (API) and a programming framework. For example, the application framework layer may include a window manager, a content provider, a resource manager, etc.

[0167] The native layer provides various services to upper layers (such as the application framework layer). For example, the native layer includes image compositing services (SurfaceFlinger), accelerated graphical port services (AGP services), and 3D graphics processing libraries (such as OpenGL ES), etc. Only a portion of these are shown in the figure.

[0168] SurfaceFlinger can receive layer requests from applications within the application layer. Layer requests are used to request layers for drawing images. Based on these layer requests, SurfaceFlinger can determine if the target application has been launched in the foreground.

[0169] Of course, SurfaceFlinger can also be used for refresh rate control. Understandably, when an application in the application framework layer needs to display a new frame of image, it can request a Vertical Synchronization (vSync) signal through SurfaceFlinger. The vSync signal triggers the application to complete the rendering of the new frame of image, which is then composited and finally displayed. Furthermore, after a refresh, the electronic device's display can distribute the vSync signal through SurfaceFlinger to the applications that requested it, i.e., to applications with rendering needs. In other words, SurfaceFlinger can control the application to start rendering after the display refreshes by distributing the vSync signal from the display to the application. That is, it achieves refresh rate control.

[0170] AGP services can be used to make frequency modulation decisions, such as whether to adjust the GPU frequency based on the frequency limit corresponding to the target application, and determining the frequency limit. For example, the AGP service records a blacklist of applications that do not require frequency modulation, a list of power-sensitive applications, and information such as power-sensitive applications and their corresponding matching frequencies, which is used to make frequency modulation-related decisions.

[0171] In some embodiments, the AGP service can also be used to control the switching of frequency modulation schemes. For example, if the frequency of the GPU is adjusted based on the frequency upper limit corresponding to the target application, and the frequency modulation scheme is not enabled, the AGP service can determine whether to enable the frequency modulation scheme.

[0172] The Hardware Abstraction Layer (HAL) encapsulates the underlying hardware drivers and provides a generic interface for calling the drivers to the upper layers, enabling the upper layers to invoke the drivers and drive the corresponding hardware. The HAL includes the Hardware Composer (HWC) and the Display Abstraction Module (displayHAL).

[0173] HWC can control and adjust the GPU frequency. Of course, HWC can also perform image compositing and other processing, but this application does not specifically limit this.

[0174] The display abstraction module (displayHAL) can be used to send AGP service decision results to lower-level components (such as display drivers in the kernel layer). Of course, the display abstraction module can also be used for display-related processing; this application does not specifically limit its use in this regard.

[0175] The kernel layer includes drivers that enable hardware operation, such as display drivers and GPU drivers (kgsl driver).

[0176] The display driver can detect whether to adjust (including increase or decrease) the GPU frequency based on the application's running status. If it detects that the GPU frequency needs adjustment, it sends a frequency adjustment message to the upper layer (such as the HWC in the Hardware Abstraction Layer). Furthermore, the frequency adjustment message includes a frequency increase message or a frequency decrease message. A frequency increase message indicates increasing the GPU frequency, and a frequency decrease message indicates decreasing the GPU frequency. The frequency increase message can carry a frequency upper limit so that the HWC can obtain the upper limit of the frequency increase, achieving targeted frequency increase. Of course, the display driver can also be used to drive the display screen to display images; this application does not specifically limit this.

[0177] GPU drivers are used to drive the GPU to work, such as driving the GPU to adjust its frequency.

[0178] The hardware layer includes devices such as displays and GPUs. The displays are used for image display, while the GPUs are used for image rendering and compositing.

[0179] The following is in conjunction with the above. Figure 10 The software and hardware architecture is shown, and the implementation of the frequency modulation scheme provided in this application embodiment is illustrated using the decision-making process when launching the target application as an example. For details, see [link to relevant documentation]. Figure 11 The frequency modulation scheme includes:

[0180] S1101, Target application starts.

[0181] It should be noted that "starting" refers to starting the program to run in the foreground, such as switching from running in the background to running in the foreground, or starting the program from never running to running in the foreground.

[0182] S1102. The target application sends a layer request to SurfaceFlinger. The layer request includes the target package name of the target application.

[0183] The layer allocation function is used to allocate layers, and subsequent drawing of the target application's image takes place within the allocated layers. It should be noted that for the specific implementation details of layer allocation, please refer to relevant technical documentation; this article will not provide a detailed explanation.

[0184] Layer requests include the target package name of the target application, indicating the application requesting the layer. For example, after application A starts, application A can send a layer request to SurfaceFlinger, carrying the target package name "AAAAA" of application A in the layer request to indicate that application A is requesting the layer.

[0185] S1103, SurfaceFlinger obtains the target package name from the layer application.

[0186] S1104. SurfaceFlinger sends the target packet name to the AGP service.

[0187] After obtaining the target packet name, the AGP service can perform a series of decision-making actions, specifically as follows: S1105-S1109 and S1117-S1119:

[0188] S1105, the AGP service checks if the target package name is in the blacklist. If yes, proceed to S1117; otherwise, proceed to S1106.

[0189] For example, the AGP service stores a blacklist of applications that do not use frequency tuning. The AGP service can compare the target packet name with the blacklist to determine whether the target packet name is in the blacklist. For the parts not described in detail in S1105, please refer to the description in S403 above, which will not be repeated here.

[0190] S1106: The AGP service decides whether to adjust the GPU frequency based on the frequency limit corresponding to the target application. If yes, proceed to S1107; otherwise, proceed to S1117. See the relevant explanation for S404 for details, which will not be repeated here.

[0191] S1107: The AGP service queries the on / off status of the frequency modulation scheme and updates the on / off status of the frequency modulation scheme to the on / off status if the query finds that the on / off status is off.

[0192] If S1106 determines that the GPU frequency should be adjusted based on the frequency limit corresponding to the target application, it indicates that a frequency modulation scheme should be used for frequency modulation. The mobile phone can keep the frequency modulation scheme in the on state to match the frequency modulation requirements.

[0193] For example, the AGP service records the on / off status of the frequency modulation scheme. If the on / off status is "off," it indicates that the frequency modulation scheme is not enabled. The AGP service can update the on / off status to "off," indicating that the frequency modulation scheme is enabled.

[0194] For details not provided in S1107, please refer to the explanation of the switch state in S410 above, which will not be repeated here.

[0195] S1108: The AGP service checks whether the target packet name is on the list of power-sensitive applications. If yes, proceed to S1109; otherwise, proceed to S1111.

[0196] For example, the AGP service records a list of power-sensitive applications. The AGP service can compare the target packet name with the list of power-sensitive applications to determine whether the target packet name is on the list. For details not explained in S1108, please refer to the explanation in S405 above; it will not be repeated here.

[0197] S1109. The AGP service queries the matching frequency corresponding to the target application. See S406 for details; it will not be repeated here.

[0198] S1110 and AGP service send frequency tuning commands to Display Driver through Display HAL. The frequency tuning commands include matching frequencies.

[0199] If the frequency modulation command includes a matching frequency, it indicates that when increasing the frequency, the frequency will be increased to the matching frequency.

[0200] S1111: The AGP service sends frequency modulation commands to the Display Driver through the Display HAL. The frequency modulation commands include the highest frequency.

[0201] If the frequency modulation command includes the highest frequency, it indicates that when increasing the frequency, the frequency should be increased to the highest frequency.

[0202] In some embodiments, if the frequency modulation scheme's switch state is found to be off in S1107, it indicates that the frequency modulation scheme is off. The AGP service can also carry an enable message in S1110 and S1111 to instruct the Display Driver to enable the frequency modulation scheme. If the frequency modulation scheme's switch state is found to be on in S1107, it indicates that the frequency modulation scheme is on, meaning the Display Driver is using the frequency modulation scheme. In this case, it is not necessary to carry an enable message in the frequency modulation command. This allows for accurate instruction to the Display Driver to enable the frequency modulation scheme.

[0203] S1112: The Display Driver checks whether the conditions for increasing or decreasing the frequency are met. If not, the frequency is not adjusted.

[0204] Therefore, it's important to note that during each frame of image processing, after the GPU completes image rendering and compositing, it can then send the image to the display via the Display Driver. In other words, the Display Driver can determine whether the GPU has completed image rendering and compositing, and based on this, it can judge whether the GPU's processing time for these steps was appropriate.

[0205] If the processing time is too late (referred to as later than the preset time T0), such as when the processing time is later than the time when the display refreshes and displays the next frame of the image, then the frequency increase condition is determined to be met, and the Display Driver can execute S1113 to achieve the frequency increase.

[0206] If the processing time is too early (referred to as earlier than the preset time T3), such as when the processing time is much earlier than the time when the display refreshes and displays the next frame of the image, then the frequency reduction condition is determined to be met, and the Display Driver can execute S1115 to achieve frequency reduction.

[0207] In addition, if neither the conditions for increasing frequency nor the conditions for decreasing frequency are met, such as when the GPU completes processing between the preset time T3 and the preset time T0, it indicates that neither increasing nor decreasing frequency is required, and the Display Driver does not need to perform any frequency adjustment processing.

[0208] S1113. If the frequency increase conditions are met, the Display Driver sends a frequency increase message to the HWC. The frequency increase message carries the upper limit of the frequency, which is the matching frequency or the highest frequency.

[0209] It should be understood that if the frequency modulation command carries a matching frequency, the upper frequency limit is the matching frequency; if the frequency modulation command carries the highest frequency, the upper frequency limit is the highest frequency.

[0210] Based on the frequency increase message, S1114 and HWC use the GPU driver to increase the GPU frequency to the upper frequency limit.

[0211] S1115. If the frequency reduction condition is met, the Display Driver sends a frequency reduction message to the HWC.

[0212] S1116 and HWC reduce the GPU frequency via the GPU driver based on the frequency increase message.

[0213] For example, HWC can gradually reduce the GPU frequency through the GPU driver.

[0214] Therefore, it's important to note that when adjusting the GPU frequency, mobile phones typically adjust it in frequency increments, with different frequency increments corresponding to different frequency ranges. For example, one type of frequency increment division is as follows: Figure 12As shown, the frequency settings range from 0 to 7, with the corresponding frequency ranges decreasing sequentially. Specifically, setting 0 corresponds to a frequency range greater than or equal to f0, with a minimum value of f0; setting 1 corresponds to a frequency range greater than or equal to f1 and less than f0, with a minimum value of f1; setting 2 corresponds to a frequency range greater than or equal to f2 and less than f1, with a minimum value of f2… setting 7 corresponds to a frequency range greater than or equal to f7 and less than f6, with a minimum value of f7.

[0215] Accordingly, the frequency upper limit mentioned earlier can be a frequency upper limit tier. When the conditions for increasing the frequency are detected, the phone can adjust the GPU frequency to the frequency upper limit tier. Here, the frequency upper limit is the highest frequency, and the frequency upper limit tier is the highest frequency tier, such as... Figure 12 The 0th gear in the range. The upper frequency limit is the matched frequency, so the upper frequency limit gear is the matched frequency gear, such as... Figure 12 Gears 1 and 2, which are lower than gear 0.

[0216] S1117. The AGP service checks the on / off status of the frequency modulation scheme. If yes, proceed to S1118; otherwise, do not disable the frequency modulation scheme.

[0217] In this context, an "on" switch indicates that a frequency modulation scheme is being executed. A "off" switch indicates that a frequency modulation scheme is not being executed. In other words, S1117 can achieve the functionality described in S408 above.

[0218] For details not provided in S1117, please refer to the descriptions of the switch states in S408 and S410 above.

[0219] S1118: The AGP service checks whether the GPU frequency is being adjusted based on the frequency limit corresponding to any application running in the foreground. If yes, the frequency adjustment scheme is not disabled; otherwise, S1118 is executed. See the explanation of S409 above for details, which will not be repeated here.

[0220] S1119, AGP service update switch status is off.

[0221] S1120, the AGP service sends a frequency modulation scheme shutdown message to the Display Driver through the display HAL.

[0222] S1121, Display Driver frequency modulation shutdown scheme.

[0223] That is, S410 mentioned above is achieved through S1119-S1121.

[0224] At this point, it should be noted that the above... Figure 11The sequence shown is only one specific implementation order. In actual implementation, the order and number of steps are not necessarily the same. Figure 11 This is limited to the following: several steps can be combined into one step, or one step can be broken down into multiple steps, or the order of the steps can be changed.

[0225] For example, the AGP service can also execute S1107 after executing S1108 and before executing S1110 and S1111. Moreover, if the switch status is found to be off, the AGP service can carry an enable message in the frequency modulation command of S1110 and S1111.

[0226] For example, the AGP service can also perform the action of querying the switch status in S1107 after executing S1108 and before executing S1110 and S1111. If the switch status is found to be off, the AGP service can carry an enable message in the frequency modulation command of S1110 and S1111. Subsequently, after receiving feedback from the Display Driver that the enable was successful, the AGP service will then perform the action of updating the switch status in S1107.

[0227] As another example, S1108 and S1109 can be combined into one step: the AGP service queries the target package name and its corresponding matching frequency. If no match is found, it indicates that it is a regular application. If a match is found, the matching frequency is obtained.

[0228] For example, the execution order of S1117 and S1118 can be swapped. S1118 can be executed first to check whether the GPU frequency is adjusted based on the frequency limit corresponding to any application running in the foreground. If not, S1117 is executed.

[0229] This application embodiment exemplifies a specific implementation of a mobile phone determining the timing of frequency increase and decrease:

[0230] See Figure 13 The processing of a single frame of an image mainly includes: step 1, rendering; step 2, compositing; and step 3, displaying.

[0231] Step 1: Rendering.

[0232] After receiving the vSync signal from SurfaceFlinger, the application can begin drawing a new frame of image. Specifically, the application submits drawing instructions to the rendering thread in the local layer. Upon receiving the drawing instructions, the RenderThread processes them and then sends them to the GPU. The GPU, upon receiving the processed drawing instructions, can then perform the rendering process. In other words, during the processing of a single frame of image, the GPU can be used for image rendering.

[0233] Step 2, synthesis.

[0234] RenderThread can also send the image content obtained after processing the drawing instructions to SurfaceFlinger, such as the drawn image. After receiving the image content, SurfaceFlinger determines whether the image content needs to be composited and displayed in the current frame. Content that needs to be composited and displayed is processed, for example, to keep up with the refresh rate. Content that does not need to be composited and displayed is placed in a waiting queue, and the system checks again in the next frame to determine whether it needs to be composited and displayed.

[0235] Typically, HWC can only perform simple compositing tasks, while complex compositing requires the GPU. Therefore, SurfaceFlinger can determine whether the image compositing of the current frame requires GPU support. If so, SurfaceFlinger can call the graphics library's interface to perform compositing tasks that HWC cannot handle through the GPU. In other words, the GPU can also be used for image compositing during the processing of a single frame.

[0236] It should be noted that during step 2, the GPU may not have completed image rendering yet. Therefore, the GPU needs to complete image compositing after completing image rendering.

[0237] Step 3: Display.

[0238] After completing image compositing, HWC can send the compositing result to the display driver. Based on this compositing result, the display driver further combines the processing results of the GPU, namely the processing results of image rendering and image compositing performed by the GPU, to obtain the image to be displayed and send it to the display screen.

[0239] It should be noted that when HWC completes image compositing, the GPU may not have completed image rendering and image compositing yet. Therefore, after receiving the compositing result from HWC, the display driver still needs to wait for the GPU to complete image rendering and image compositing before it can obtain the image to be displayed and send it to the display screen.

[0240] Therefore, during the processing of a single frame of an image, the GPU needs to complete both image rendering and image compositing. Furthermore, if the GPU does not complete these processes in a timely manner, the display driver cannot obtain the image to be displayed and send it to the display screen promptly, resulting in dropped frames.

[0241] During the processing of a frame of an image, the mobile phone (such as the display driver in the kernel layer) can detect whether the time for the GPU to complete image processing (including rendering and compositing) exceeds a preset time T0. If the time exceeds the preset time T0, it means that the GPU cannot complete the processing of the current frame of the image in time. At this time, the frequency increase condition is met, and the mobile phone (such as the HWC in the hardware abstraction layer) can increase the frequency of the GPU to the frequency limit to ensure that the GPU completes the processing of the current frame of the image in time and avoids frame dropping.

[0242] In this way, the phone can increase the GPU frequency if the GPU cannot complete image processing in time for the current frame. On the one hand, by increasing the frequency in a timely manner, the phone ensures that the GPU can process the current frame image promptly, preventing frame drops; on the other hand, the phone will not increase the GPU frequency if the GPU can complete image processing in time, thus avoiding resource waste.

[0243] In some embodiments, the preset time T0 can be a time point with a fixed duration of 1 seconds remaining until the next refresh of the display. It is understood that each time the display refreshes, a new frame of image needs to be displayed. Therefore, the GPU needs to complete the processing of the current frame of image before the next refresh, and the preset time T0 also needs to be before the next refresh. In this way, the mobile phone can quickly determine the preset time T0 based on the next refresh time and the fixed duration of 1 seconds.

[0244] In other embodiments, the preset time T0 is the time length (denoted as duration L) from the moment T1 when the display driver starts waiting for the GPU to complete image processing to the next refresh time T2, where the ratio of the time length from time T1 to duration L is a preset ratio λ1 (such as 0.7, 0.8, etc.).

[0245] Taking a preset proportion λ1 of 0.7 as an example, in Figure 14 During the processing of the k-th frame image shown, the mobile phone can determine the preset time T0 as time T1+0.7*(T2-T1).

[0246] As can be seen, by adopting this embodiment, the mobile phone can determine a matching preset time T0 based on the processing progress of the current frame image, thereby allowing for targeted adjustment of the GPU frequency level. The following will primarily use this embodiment to illustrate the solution of this application.

[0247] Another point to emphasize is that when the display driver begins waiting for the GPU to complete image processing, it indicates that the CPU has essentially completed the image delivery and display processing. After this point, whether frame drops occur depends primarily on the GPU's efficiency. Therefore, configuring a preset time T0 to be the time after the display driver begins waiting for the GPU to complete image processing allows for precise control to prevent frame drops by adjusting the GPU's frequency, while remaining solely dependent on GPU efficiency.

[0248] In practice, the display driver can use a wait function (such as `plane_wait_input_fence`) to wait for the GPU to complete image processing. Understandably, after the GPU completes image processing, it releases the corresponding fence. Correspondingly, once the display driver detects that the fence has been released through the wait function, it can determine that the GPU has completed image processing. At this point, the display driver can execute the subsequent display delivery process, driving the display screen to show the current frame image. Based on this, the phone can determine that time T1 is the moment the display driver begins executing the wait function.

[0249] In one specific implementation, after a preset time T0 is reached, the mobile phone can detect whether the display driver is executing a wait function. If the display driver is still executing the wait function at the preset time T0, the mobile phone can determine that the GPU's image processing completion time exceeds the preset time T0; if the display driver has finished executing the wait function at the preset time T0, the mobile phone can determine that the GPU's image processing completion time has not exceeded the preset time T0.

[0250] See also Figure 14 If the display driver has not finished executing the waiting function within the preset time T0, the phone can determine that the GPU's image processing completion time exceeds the preset time T0.

[0251] After increasing the GPU frequency, during subsequent image processing, the phone (such as the display driver) can detect whether the GPU's completion time for image processing exceeds a preset time T3. If the completion time does not exceed the preset time T3, it indicates that the GPU can efficiently complete image processing, thus meeting the conditions for frequency reduction. The phone can then reduce the GPU frequency to save resources.

[0252] Similar to the preset time T0, the preset time T3 can be a time point where the time remaining from the next refresh time T2 is a fixed duration of 2, where the fixed duration 2 is greater than the fixed duration 1. In this way, the phone can quickly determine the preset time T3 based on the next refresh time T2 and the fixed duration 2. Alternatively, the preset time T3 can be a time point within the duration L where the ratio of the time remaining from time T1 to the duration L is a preset proportion λ2 (such as 0.5, 0.6, etc.), where the preset proportion λ2 is less than the preset proportion λ1.

[0253] Taking a preset proportion λ2 of 0.5 as an example, in Figure 15 During the processing of the second frame image shown (e.g., at a preset time T0), after the phone increases the GPU frequency to level 0, during the processing of the third frame image, the phone can detect whether the GPU has completed image processing at the preset time T3 = T1 + 0.5 * (T2 - T1). If it has, the frequency reduction condition is met.

[0254] Regarding the determination of time T1, please refer to the relevant explanation above, which will not be repeated here.

[0255] Similarly, in one specific implementation, the mobile phone can detect whether the display driver is executing a wait function after a preset time T3 has elapsed. If the display driver is still executing the wait function at the preset time T3, the mobile phone can determine that the GPU's image processing completion time exceeds the preset time T3; if the display driver has finished executing the wait function at the preset time T3, the mobile phone can determine that the GPU's image processing completion time has not exceeded the preset time T3.

[0256] See also Figure 15 At the preset time T3, the display driver has finished executing the waiting function, and the phone can determine that the GPU's completion time for image processing has not exceeded the preset time T3.

[0257] When a phone reduces its GPU frequency, it can do so in stages, such as from level 0 to level 1, then from level 1 to level 2, and so on. Figure 15 After increasing the GPU frequency to level 0, during the processing of the third frame image, the phone detects that the GPU has completed image processing at a preset time T3, and the phone can reduce the GPU frequency from level 0 to level 1.

[0258] At this point, it should be noted that: the aforementioned Figures 12-15 The embodiments described herein are merely one possible implementation for determining the timing of frequency adjustment and frequency reduction, and are not limited to this in actual implementation. In other embodiments, the mobile phone may also determine the timing of frequency adjustment or frequency reduction based on GPU utilization or whether the application is dropping frames.

[0259] Taking the frequency limit corresponding to application G (the highest frequency level, level 0) as an example, and then the frequency limit corresponding to application H (the matching frequency level, level 0):

[0260] See Figure 16Before time t0, the GPU frequency is adjusted based on the frequency limit of level 0 corresponding to application G. At time t1, the phone detects that the frequency increase condition is met and increases the GPU frequency to level 0. Subsequently, at times t2 and t3, the phone detects that the frequency decrease condition is met, and decreases the frequency from level 0 to level 1, then from level 1 to level 2, and so on...

[0261] See also Figure 16 After time t0, the GPU frequency is adjusted to level 2 based on the frequency upper limit corresponding to application H. At time t4, the phone detects that the frequency increase condition is met and increases the GPU frequency to level 2, not the maximum of 2. Subsequently, at times t5, t6, and t7, the phone detects that the frequency decrease condition is met, and decreases the frequency from level 2 to level 3, from level 3 to level 4, from level 4 to level 5, and so on...

[0262] This application also provides an electronic device, which may include a display screen, a memory, and one or more processors (such as a CPU, GPU, NPU, etc.). The display screen, memory, and processor are coupled. The memory is used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various functions or steps performed by the device in the above method embodiments.

[0263] This application also provides a chip system including at least one processor and at least one interface circuit. The processor and the interface circuit are interconnected via lines. For example, the interface circuit can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit can be used to send signals to other devices (e.g., the processor). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instructions are executed by the processor, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, and this application does not specifically limit this.

[0264] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the image processing method described above.

[0265] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the image processing method described in the above embodiment.

[0266] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component, or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the image processing methods in the above-described method embodiments.

[0267] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.

[0268] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to 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.

[0269] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0270] The unit described as a separate component may or may not be physically separate. The component shown as a unit can be one physical unit or multiple physical units, that is, it can be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of the solution in this embodiment according to actual needs.

[0271] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0272] If the integrated unit is implemented as 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 solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0273] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.

Claims

1. A frequency modulation method, characterized in that, The method is applied to an electronic device, which includes a graphics processing unit (GPU) and stores a table showing the correspondence between application identifiers of a first type of application and their frequencies. The method further states that when the GPU frequency is increased to its maximum frequency during the operation of the first type of application, the increase in power consumption of the electronic device is greater than the increase in power consumption when the GPU frequency is increased to its maximum frequency during the operation of a second type of application. The method includes: The electronic device launches the first application in the foreground; In response to detecting that the GPU's frequency boosting condition is met, the electronic device boosts the GPU's frequency to a first frequency corresponding to the first application; The electronic device launches a second application in the foreground, the first application being different from the second application; The electronic device runs the first application and the second application in a split-screen format on the foreground. If the second application satisfies the first condition, in response to detecting that the frequency boosting condition is met, the electronic device boosts the frequency of the GPU to a second frequency corresponding to the second application, the second frequency being different from the first frequency; wherein, the first condition includes the second application being the application with the largest display size in the foreground, the second application having the largest display size, and the GPU having the most pixels for image processing of the second application; wherein, if the correspondence table includes the identifier of the second application, the second frequency is the frequency corresponding to the identifier of the second application in the correspondence table, and the frequency corresponding to the identifier of the second application is lower than the highest frequency of the GPU; if the correspondence table does not include the identifier of the second application, the second frequency is the highest frequency of the GPU; In response to a second trigger operation, the electronic device adjusts the split-screen size of the first application to a first size and adjusts the split-screen size of the second application to a second size, wherein the first size is larger than the second size; in response to detecting that the frequency increase condition is met, the electronic device increases the frequency of the GPU to the first frequency.

2. The method according to claim 1, characterized in that, After the electronic device launches the second application in the foreground, the method further includes: If the second application does not meet the first condition, in response to detecting that the GPU's frequency boosting condition is met, the electronic device boosts the GPU's frequency to the first frequency.

3. The method according to claim 1, characterized in that, The method further includes: The electronic device runs the second application in the foreground and then stops running the first application in the foreground. If the second application does not meet the first condition, the electronic device turns off the first switch, and after turning off the first switch, the electronic device does not adjust the frequency of the GPU.

4. The method according to claim 1 or 2, characterized in that, The method further includes: The electronic device runs the second application in full-screen mode on the foreground and runs the first application in a floating window on the foreground. If the second application satisfies the first condition, in response to detecting that the frequency boosting condition is met, the electronic device boosts the frequency of the GPU to the second frequency corresponding to the second application. In response to a first trigger operation, the electronic device runs the first application in full-screen mode in the foreground and runs the second application in a floating window in the foreground. In response to detecting that the frequency increase condition is met, the electronic device increases the frequency of the GPU to the first frequency.

5. The method according to claim 1 or 2, characterized in that, After the electronic device launches the second application in the foreground, the method further includes: After the electronic device increases the frequency of the GPU to the second frequency corresponding to the second application in response to detecting that the frequency increase condition is met, the method further includes: In response to the third triggering operation, the electronic device terminates the running of the second application in the foreground; In response to detecting that the frequency increase condition is met, the electronic device increases the frequency of the GPU to the first frequency.

6. The method according to claim 1 or 2, characterized in that, After the electronic device launches the first application in the foreground, or after the electronic device launches the second application in the foreground, the method further includes: In response to detecting that the GPU's frequency reduction condition is met, the electronic device reduces the GPU's frequency.

7. The method according to claim 1 or 2, characterized in that, The electronic device also includes an image compositing processing service, an accelerated graphics interface service, a display driver, and a hardware overlay unit (HWC). After the electronic device launches the second application in the foreground, the method further includes: The second application sends a layer request to the image compositing service, the layer request including the application identifier of the second application; The image compositing processing service obtains the application identifier of the second application from the layer application and sends the application identifier of the second application to the accelerated image interface service; The accelerated image interface service detects whether the second application meets the first condition based on the application identifier of the second application. If the second application meets the first condition, the accelerated image interface service queries the application identifier of the second application from the correspondence table, which includes the correspondence between the application identifier and the frequency; If the application identifier of the second application is found in the correspondence table, the frequency corresponding to the application identifier of the second application is obtained from the correspondence table, and the frequency corresponding to the identifier of the second application is sent to the display driver; If the application identifier of the second application is not found in the correspondence table, the highest frequency of the GPU is sent to the display driver. The display driver detects whether the frequency increase condition is met; In response to detecting that the frequency boosting condition is met, the electronic device boosts the frequency of the GPU to the second frequency corresponding to the second application, including: In response to detecting that the frequency increase condition is met, the display driver sends a frequency increase message to the HWC. The frequency increase message includes the frequency corresponding to the identifier of the second application or the highest frequency. The second frequency includes the frequency corresponding to the identifier of the second application or the highest frequency. The HWC increases the frequency of the GPU to the second frequency.

8. The method according to claim 1, characterized in that, The first condition also includes at least one of the following: the second application is not an application in the blacklist; and the second application is the highest priority application among the applications running in the foreground.

9. An electronic device, characterized in that, include: A display screen, one or more processors, and one or more memories; the one or more processors are coupled to the display screen and the one or more memories; the one or more memories are used to store computer program code, the computer program code including computer instructions that, when the one or more processors execute the computer instructions, cause the electronic device to perform the method as described in any one of claims 1-8.

10. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Frequency adjustment method and electronic equipment

    CN117114961A

  • Image display method and related device

    CN117472483A