WO2021000226A1 - Methods and apparatus for optimizing frame response - Google Patents

Methods and apparatus for optimizing frame response Download PDF

Info

Publication number
WO2021000226A1
WO2021000226A1 PCT/CN2019/094234 CN2019094234W WO2021000226A1 WO 2021000226 A1 WO2021000226 A1 WO 2021000226A1 CN 2019094234 W CN2019094234 W CN 2019094234W WO 2021000226 A1 WO2021000226 A1 WO 2021000226A1
Authority
WO
WIPO (PCT)
Prior art keywords
vsync
current frame
value
frame
buffer
Prior art date
Application number
PCT/CN2019/094234
Other languages
French (fr)
Inventor
Bin Zhang
Sheng Fang
Zhuo FU
Jun Wang
Original Assignee
Qualcomm Incorporated
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qualcomm Incorporated filed Critical Qualcomm Incorporated
Priority to PCT/CN2019/094234 priority Critical patent/WO2021000226A1/en
Publication of WO2021000226A1 publication Critical patent/WO2021000226A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • G06F1/324Power saving characterised by the action undertaken by lowering clock frequency
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present disclosure relates to methods and apparatus for frame processing. Aspects of the present disclosure can adjust or scale a CPU frequency value in order to avoid potential janks. For instance, if a buffer queue status is accumulated, the present disclosure can determine a headroom and a new scale value. The present disclosure can also calculate the new maximum CPU frequency by multiplying the new scale value by the current maximum CPU frequency. As such, the maximum CPU frequency may be downscaled if the buffer is accumulated. Also, if the buffer queue status is not accumulated, and the headroom is decreasing, the present disclosure can upscale the minimum CPU frequency, e.g., if the new scale value is greater than 1. Thus, the present disclosure can decrease the average frame response latency, save power, and reduce janks at the same performance level to provide to the end user better experience.

Description

METHODS AND APPARATUS FOR OPTIMIZING FRAME RESPONSE TECHNICAL FIELD
The present disclosure relates generally to processing systems and, more particularly, to one or more techniques for frame or graphics processing.
INTRODUCTION
Computing devices often utilize a graphics processing unit (GPU) to accelerate the rendering of graphical data for display. Such computing devices may include, for example, computer workstations, mobile phones such as so-called smartphones, embedded systems, personal computers, tablet computers, and video game consoles. GPUs execute a graphics processing pipeline that includes one or more processing stages that operate together to execute graphics processing commands and output a frame. A central processing unit (CPU) may control the operation of the GPU by issuing one or more graphics processing commands to the GPU. Modern day CPUs are typically capable of concurrently executing multiple applications, each of which may need to utilize the GPU during execution. A device that provides content for visual presentation on a display generally includes a GPU.
Typically, a GPU of a device is configured to perform the processes in a graphics processing pipeline. However, with the advent of wireless communication and smaller, handheld devices, there has developed an increased need for improved graphics processing.
SUMMARY
The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
In an aspect of the disclosure, a method, a computer-readable medium, and an apparatus are provided. The apparatus may be a frame processor, a frame composer, a graphics processing unit (GPU) , or a display processor. The apparatus can  determine a subsequent frame buffer offset duration when an available buffer value is greater than one. The apparatus can also calculate a subsequent scale value based on the subsequent frame buffer offset duration and a current frame buffer offset duration. Also, the apparatus can determine a new maximum frequency value when the available buffer value is greater than one. The apparatus can also update a maximum central processing unit (CPU) frequency based on the new maximum frequency value. Additionally, the apparatus can downscale the maximum CPU frequency. The apparatus can also render a subsequent frame based on the updated maximum CPU frequency. The apparatus can also determine the current maximum frequency value based on a previous maximum frequency value and a current frame scale value. The apparatus can also send a current frame to a buffer queue at the current frame buffer time and increase the available buffer value when the current frame is sent to the buffer queue. The apparatus can also consume a previous frame at the first VSYNC time and decrease the available buffer value when the previous frame is consumed.
In another aspect of the disclosure, a method, a computer-readable medium, and an apparatus are provided. The apparatus may be a frame processor, a frame composer, a graphics processing unit (GPU) , or a display processor. The apparatus can determine a subsequent frame buffer offset duration when a current frame headroom offset duration is decreasing. The apparatus can also calculate a subsequent scale value based on the current frame headroom offset duration and a current frame buffer offset duration. Also, the apparatus can determine a new minimum frequency value when the subsequent scale value is greater than one. The apparatus can also update a minimum CPU frequency based on the new minimum frequency value. Additionally, the apparatus can upscale the minimum CPU frequency. The apparatus can also render a subsequent frame based on the updated minimum CPU frequency. The apparatus can also determine the current minimum frequency value based on a previous minimum frequency value and a current frame scale value. The apparatus can also send a current frame to a buffer queue at the current frame buffer time and increase an available buffer value when the current frame is sent to the buffer queue. The apparatus can also consume a previous frame at the first VSYNC time and decrease an available buffer value when the previous frame is consumed.
The details of one or more examples of the disclosure are set forth in the accompanying drawings and the description below. Other features, objects, and  advantages of the disclosure will be apparent from the description and drawings, and from the claims.
BRIEF DESCRIPTION OF DRAWINGS
FIG. 1 is a block diagram that illustrates an example content generation system in accordance with one or more techniques of this disclosure.
FIG. 2 illustrates an example GPU in accordance with one or more techniques of this disclosure.
FIG. 3 illustrates an example timing diagram in accordance with one or more techniques of this disclosure.
FIG. 4 illustrates an example timing diagram in accordance with one or more techniques of this disclosure.
FIG. 5 illustrates an example timing diagram in accordance with one or more techniques of this disclosure.
FIG. 6 illustrates an example timing diagram in accordance with one or more techniques of this disclosure.
FIG. 7 illustrates an example timing diagram in accordance with one or more techniques of this disclosure.
FIG. 8 illustrates an example flowchart of an example method in accordance with one or more techniques of this disclosure.
FIG. 9 illustrates an example flowchart of an example method in accordance with one or more techniques of this disclosure.
DETAILED DESCRIPTION
Some aspects of janks reduction technology may not adjust frequency values to avoid potential janks. This may result in the janks reduction technology being less accurate and/or use an unnecessary amount of power. However, aspects of the present disclosure can adjust or scale a CPU frequency value in order to avoid potential janks. For instance, if the buffer queue status is accumulated, e.g., the available buffer value is greater than one, i.e., there is more than one queue buffer in the buffer queue, the present disclosure can determine a headroom and a new scale value. The present disclosure can also calculate the new maximum CPU frequency by multiplying the new scale value by the current maximum CPU frequency. As such, the maximum CPU frequency may be downscaled if the buffer is accumulated. Also, if the buffer  queue status is not accumulated, and the headroom is less than a minimum headroom value, the present disclosure can upscale the minimum CPU frequency, e.g., if the new scale value is greater than 1. The present disclosure can calculate the new minimum CPU frequency by multiplying the new scale value by the current minimum CPU frequency. As such, the minimum CPU frequency can be upscaled based on the new scale value.
Various aspects of systems, apparatuses, computer program products, and methods are described more fully hereinafter with reference to the accompanying drawings. This disclosure may, however, be embodied in many different forms and should not be construed as limited to any specific structure or function presented throughout this disclosure. Rather, these aspects are provided so that this disclosure will be thorough and complete, and will fully convey the scope of this disclosure to those skilled in the art. Based on the teachings herein one skilled in the art should appreciate that the scope of this disclosure is intended to cover any aspect of the systems, apparatuses, computer program products, and methods disclosed herein, whether implemented independently of, or combined with, other aspects of the disclosure. For example, an apparatus may be implemented or a method may be practiced using any number of the aspects set forth herein. In addition, the scope of the disclosure is intended to cover such an apparatus or method which is practiced using other structure, functionality, or structure and functionality in addition to or other than the various aspects of the disclosure set forth herein. Any aspect disclosed herein may be embodied by one or more elements of a claim.
Although various aspects are described herein, many variations and permutations of these aspects fall within the scope of this disclosure. Although some potential benefits and advantages of aspects of this disclosure are mentioned, the scope of this disclosure is not intended to be limited to particular benefits, uses, or objectives. Rather, aspects of this disclosure are intended to be broadly applicable to different wireless technologies, system configurations, networks, and transmission protocols, some of which are illustrated by way of example in the figures and in the following description. The detailed description and drawings are merely illustrative of this disclosure rather than limiting, the scope of this disclosure being defined by the appended claims and equivalents thereof.
Several aspects are presented with reference to various apparatus and methods. These apparatus and methods are described in the following detailed description and  illustrated in the accompanying drawings by various blocks, components, circuits, processes, algorithms, and the like (collectively referred to as “elements” ) . These elements may be implemented using electronic hardware, computer software, or any combination thereof. Whether such elements are implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system.
By way of example, an element, or any portion of an element, or any combination of elements may be implemented as a “processing system” that includes one or more processors (which may also be referred to as processing units) . Examples of processors include microprocessors, microcontrollers, graphics processing units (GPUs) , general purpose GPUs (GPGPUs) , central processing units (CPUs) , application processors, digital signal processors (DSPs) , reduced instruction set computing (RISC) processors, systems-on-chip (SOC) , baseband processors, application specific integrated circuits (ASICs) , field programmable gate arrays (FPGAs) , programmable logic devices (PLDs) , state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform the various functionality described throughout this disclosure. One or more processors in the processing system may execute software. Software can be construed broadly to mean instructions, instruction sets, code, code segments, program code, programs, subprograms, software components, applications, software applications, software packages, routines, subroutines, objects, executables, threads of execution, procedures, functions, etc., whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise. The term application may refer to software. As described herein, one or more techniques may refer to an application, i.e., software, being configured to perform one or more functions. In such examples, the application may be stored on a memory, e.g., on-chip memory of a processor, system memory, or any other memory. Hardware described herein, such as a processor may be configured to execute the application. For example, the application may be described as including code that, when executed by the hardware, causes the hardware to perform one or more techniques described herein. As an example, the hardware may access the code from a memory and execute the code accessed from the memory to perform one or more techniques described herein. In some examples, components are identified in this disclosure. In such examples, the  components may be hardware, software, or a combination thereof. The components may be separate components or sub-components of a single component.
Accordingly, in one or more examples described herein, the functions described may be implemented in hardware, software, or any combination thereof. If implemented in software, the functions may be stored on or encoded as one or more instructions or code on a computer-readable medium. Computer-readable media includes computer storage media. Storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise a random access memory (RAM) , a read-only memory (ROM) , an electrically erasable programmable ROM (EEPROM) , optical disk storage, magnetic disk storage, other magnetic storage devices, combinations of the aforementioned types of computer-readable media, or any other medium that can be used to store computer executable code in the form of instructions or data structures that can be accessed by a computer.
In general, this disclosure describes techniques for having a graphics processing pipeline in a single device or multiple devices, improving the rendering of graphical content, and/or reducing the load of a processing unit, i.e., any processing unit configured to perform one or more techniques described herein, such as a GPU. For example, this disclosure describes techniques for graphics processing in any device that utilizes graphics processing. Other example benefits are described throughout this disclosure.
As used herein, instances of the term “content” may refer to “graphical content, ” “image, ” and vice versa. This is true regardless of whether the terms are being used as an adjective, noun, or other parts of speech. In some examples, as used herein, the term “graphical content” may refer to a content produced by one or more processes of a graphics processing pipeline. In some examples, as used herein, the term “graphical content” may refer to a content produced by a processing unit configured to perform graphics processing. In some examples, as used herein, the term “graphical content” may refer to a content produced by a graphics processing unit.
In some examples, as used herein, the term “display content” may refer to content generated by a processing unit configured to perform displaying processing. In some examples, as used herein, the term “display content” may refer to content generated by a display processing unit. Graphical content may be processed to become display content. For example, a graphics processing unit may output graphical content, such  as a frame, to a buffer (which may be referred to as a framebuffer) . A display processing unit may read the graphical content, such as one or more frames from the buffer, and perform one or more display processing techniques thereon to generate display content. For example, a display processing unit may be configured to perform composition on one or more rendered layers to generate a frame. As another example, a display processing unit may be configured to compose, blend, or otherwise combine two or more layers together into a single frame. A display processing unit may be configured to perform scaling, e.g., upscaling or downscaling, on a frame. In some examples, a frame may refer to a layer. In other examples, a frame may refer to two or more layers that have already been blended together to form the frame, i.e., the frame includes two or more layers, and the frame that includes two or more layers may subsequently be blended.
FIG. 1 is a block diagram that illustrates an example content generation system 100 configured to implement one or more techniques of this disclosure. The content generation system 100 includes a device 104. The device 104 may include one or more components or circuits for performing various functions described herein. In some examples, one or more components of the device 104 may be components of an SOC. The device 104 may include one or more components configured to perform one or more techniques of this disclosure. In the example shown, the device 104 may include a processing unit 120, and a system memory 124. In some aspects, the device 104 can include a number of optional components, e.g., a communication interface 126, a transceiver 132, a receiver 128, a transmitter 130, a display processor 127, and one or more displays 131. Reference to the display 131 may refer to the one or more displays 131. For example, the display 131 may include a single display or multiple displays. The display 131 may include a first display and a second display. The first display may be a left-eye display and the second display may be a right-eye display. In some examples, the first and second display may receive different frames for presentment thereon. In other examples, the first and second display may receive the same frames for presentment thereon. In further examples, the results of the graphics processing may not be displayed on the device, e.g., the first and second display may not receive any frames for presentment thereon. Instead, the frames or graphics processing results may be transferred to another device. In some aspects, this can be referred to as split-rendering.
The processing unit 120 may include an internal memory 121. The processing unit 120 may be configured to perform graphics processing, such as in a graphics processing pipeline 107. In some examples, the device 104 may include a display processor, such as the display processor 127, to perform one or more display processing techniques on one or more frames generated by the processing unit 120 before presentment by the one or more displays 131. The display processor 127 may be configured to perform display processing. For example, the display processor 127 may be configured to perform one or more display processing techniques on one or more frames generated by the processing unit 120. The one or more displays 131 may be configured to display or otherwise present frames processed by the display processor 127. In some examples, the one or more displays 131 may include one or more of: a liquid crystal display (LCD) , a plasma display, an organic light emitting diode (OLED) display, a projection display device, an augmented reality display device, a virtual reality display device, a head-mounted display, or any other type of display device.
Memory external to the processing unit 120, such as system memory 124, may be accessible to the processing unit 120. For example, the processing unit 120 may be configured to read from and/or write to external memory, such as the system memory 124. The processing unit 120 may be communicatively coupled to the system memory 124 over a bus. In some examples, the processing unit 120 may be communicatively coupled to each other over the bus or a different connection.
The internal memory 121 or the system memory 124 may include one or more volatile or non-volatile memories or storage devices. In some examples, internal memory 121 or the system memory 124 may include RAM, SRAM, DRAM, erasable programmable ROM (EPROM) , electrically erasable programmable ROM (EEPROM) , flash memory, a magnetic data media or an optical storage media, or any other type of memory.
The internal memory 121 or the system memory 124 may be a non-transitory storage medium according to some examples. The term “non-transitory” may indicate that the storage medium is not embodied in a carrier wave or a propagated signal. However, the term “non-transitory” should not be interpreted to mean that internal memory 121 or the system memory 124 is non-movable or that its contents are static. As one example, the system memory 124 may be removed from the device 104 and  moved to another device. As another example, the system memory 124 may not be removable from the device 104.
The processing unit 120 may be a central processing unit (CPU) , a graphics processing unit (GPU) , a general purpose GPU (GPGPU) , or any other processing unit that may be configured to perform graphics processing. In some examples, the processing unit 120 may be integrated into a motherboard of the device 104. In some examples, the processing unit 120 may be present on a graphics card that is installed in a port in a motherboard of the device 104, or may be otherwise incorporated within a peripheral device configured to interoperate with the device 104. The processing unit 120 may include one or more processors, such as one or more microprocessors, GPUs, application specific integrated circuits (ASICs) , field programmable gate arrays (FPGAs) , arithmetic logic units (ALUs) , digital signal processors (DSPs) , discrete logic, software, hardware, firmware, other equivalent integrated or discrete logic circuitry, or any combinations thereof. If the techniques are implemented partially in software, the processing unit 120 may store instructions for the software in a suitable, non-transitory computer-readable storage medium, e.g., internal memory 121, and may execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Any of the foregoing, including hardware, software, a combination of hardware and software, etc., may be considered to be one or more processors.
In some aspects, the content generation system 100 can include an optional communication interface 126. The communication interface 126 may include a receiver 128 and a transmitter 130. The receiver 128 may be configured to perform any receiving function described herein with respect to the device 104. Additionally, the receiver 128 may be configured to receive information, e.g., eye or head position information, rendering commands, or location information, from another device. The transmitter 130 may be configured to perform any transmitting function described herein with respect to the device 104. For example, the transmitter 130 may be configured to transmit information to another device, which may include a request for content. The receiver 128 and the transmitter 130 may be combined into a transceiver 132. In such examples, the transceiver 132 may be configured to perform any receiving function and/or transmitting function described herein with respect to the device 104.
Referring again to FIG. 1, in certain aspects, the graphics processing pipeline 107 may include a determination component 198 configured to determine a subsequent frame buffer offset duration when an available buffer value is greater than one. The determination component 198 can also be configured to calculate a subsequent scale value based on the subsequent frame buffer offset duration and a current frame buffer offset duration. The determination component 198 can also be configured to determine a new maximum frequency value when the available buffer value is greater than one. The determination component 198 can also be configured to update a maximum central processing unit (CPU) frequency based on the new maximum frequency value. The determination component 198 can also be configured to downscale the maximum CPU frequency. The determination component 198 can also be configured to render a subsequent frame based on the updated maximum CPU frequency. The determination component 198 can also be configured to determine the current maximum frequency value based on a previous maximum frequency value and a current frame scale value. The determination component 198 can also be configured to send a current frame to a buffer queue at the current frame buffer time and increase the available buffer value when the current frame is sent to the buffer queue. The determination component 198 can also be configured to consume a previous frame at the first VSYNC time and decrease the available buffer value when the previous frame is consumed.
In other aspects, the determination component 198 can be configured to determine a subsequent frame buffer offset duration when a current frame headroom offset duration is decreasing. The determination component 198 can also be configured to calculate a subsequent scale value based on the current frame headroom offset duration and a current frame buffer offset duration. The determination component 198 can also be configured to determine a new minimum frequency value when the subsequent scale value is greater than one. The determination component 198 can also be configured to update a minimum CPU frequency based on the new minimum frequency value. The determination component 198 can also be configured to upscale the minimum CPU frequency. The determination component 198 can also be configured to render a subsequent frame based on the updated minimum CPU frequency. The determination component 198 can also be configured to determine the current minimum frequency value based on a previous minimum frequency value and a current frame scale value. The determination component 198 can also be  configured to send a current frame to a buffer queue at the current frame buffer time and/or increase an available buffer value when the current frame is sent to the buffer queue. The determination component 198 can also be configured to consume a previous frame at the first VSYNC time and/or decrease an available buffer value when the previous frame is consumed.
As described herein, a device, such as the device 104, may refer to any device, apparatus, or system configured to perform one or more techniques described herein. For example, a device may be a server, a base station, user equipment, a client device, a station, an access point, a computer, e.g., a personal computer, a desktop computer, a laptop computer, a tablet computer, a computer workstation, or a mainframe computer, an end product, an apparatus, a phone, a smart phone, a server, a video game platform or console, a handheld device, e.g., a portable video game device or a personal digital assistant (PDA) , a wearable computing device, e.g., a smart watch, an augmented reality device, or a virtual reality device, a non-wearable device, a display or display device, a television, a television set-top box, an intermediate network device, a digital media player, a video streaming device, a content streaming device, an in-car computer, any mobile device, any device configured to generate graphical content, or any device configured to perform one or more techniques described herein. Processes herein may be described as performed by a particular component (e.g., a GPU) , but, in further embodiments, can be performed using other components (e.g., a CPU) , consistent with disclosed embodiments.
GPUs can process multiple types of data or data packets in a GPU pipeline. For instance, in some aspects, a GPU can process two types of data or data packets, e.g., context register packets and draw call data. A context register packet can be a set of global state information, e.g., information regarding a global register, shading program, or constant data, which can regulate how a graphics context will be processed. For example, context register packets can include information regarding a color format. In some aspects of context register packets, there can be a bit that indicates which workload belongs to a context register. Also, there can be multiple functions or programming running at the same time and/or in parallel. For example, functions or programming can describe a certain operation, e.g., the color mode or color format. Accordingly, a context register can define multiple states of a GPU.
Context states can be utilized to determine how an individual processing unit functions, e.g., a vertex fetcher (VFD) , a vertex shader (VS) , a shader processor, or a  geometry processor, and/or in what mode the processing unit functions. In order to do so, GPUs can use context registers and programming data. In some aspects, a GPU can generate a workload, e.g., a vertex or pixel workload, in the pipeline based on the context register definition of a mode or state. Certain processing units, e.g., a VFD, can use these states to determine certain functions, e.g., how a vertex is assembled. As these modes or states can change, GPUs may need to change the corresponding context. Additionally, the workload that corresponds to the mode or state may follow the changing mode or state.
FIG. 2 illustrates an example GPU 200 in accordance with one or more techniques of this disclosure. As shown in FIG. 2, GPU 200 includes command processor (CP) 210, draw call packets 212, VFD 220, VS 222, vertex cache (VPC) 224, triangle setup engine (TSE) 226, rasterizer (RAS) 228, Z process engine (ZPE) 230, pixel interpolator (PI) 232, fragment shader (FS) 234, render backend (RB) 236, L2 cache (UCHE) 238, and system memory 240. Although FIG. 2 displays that GPU 200 includes processing units 220-238, GPU 200 can include a number of additional processing units. Additionally, processing units 220-238 are merely an example and any combination or order of processing units can be used by GPUs according to the present disclosure. GPU 200 also includes command buffer 250, context register packets 260, and context states 261.
As shown in FIG. 2, a GPU can utilize a CP, e.g., CP 210, or hardware accelerator to parse a command buffer into context register packets, e.g., context register packets 260, and/or draw call data packets, e.g., draw call packets 212. The CP 210 can then send the context register packets 260 or draw call data packets 212 through separate paths to the processing units or blocks in the GPU. Further, the command buffer 250 can alternate different states of context registers and draw calls. For example, a command buffer can be structured in the following manner: context register of context N, draw call (s) of context N, context register of context N+1, and draw call (s) of context N+1.
The mobile gaming market is one of the most important markets in the mobile world. In this market, users care greatly about the game performance. A variety of factors can be performance indicators for the mobile gaming market. For instance, frames per second (FPS) and janks, i.e., delays or pauses in frame rendering or composition, are important key performance indicators (KPI) in this market. In some aspects, a jank can be a perceptible pause in the rendering of a software application’s user  interface. Both FPS and janks are KPIs in game performance and/or device display capability. In mobile gaming applications, janks can be the result of a number of factors, such as slow operations or poor interface design. In some instances, a jank can also correspond to a change in the refresh rate of the display at the device. Janks are important to mobile gaming because if the display fresh latency is not stable, this can impact the user experience. Accordingly, some aspects of the mobile gaming industry are focused on reducing janks and increasing FPS.
In the mobile gaming industry, games can be run at a variety of different FPS modes. In some aspects, games can run at 30 FPS mode. In other aspects, games can run at different FPS modes, e.g., 20 or 60 FPS. Aspects of the present disclosure can include a current frame latency time, which can refer to the time difference between when a previous frame completes rendering a current frame completes rendering. The frame latency time can also refer to the time between successive refreshing frames. The frame latency time can also be based on a frame rate. In some aspects, when a gaming application runs at 30 FPS mode, although the average frame rate may be around 30 FPS, the frame latency time may not be stable. For instance, the frame latency time for each frame can be 33.33 ms (e.g., corresponding to 30 FPS) , 16.67 ms (e.g., corresponding to 60 FPS) , or 50 ms (e.g., corresponding to 20 FPS) .
Jank reduction technology can be utilized in a number of different scenarios. For instance, slow frames, e.g., frames under 30 FPS, may optimize janks reduction differently than fast frames. For example, there may be frame pacing issues for frames under 30 FPS, which may utilize a different janks reduction technology than faster frames. In some aspects, different mechanisms or designs may have the ability to detect janks. Also, once janks are detected, other mechanisms can be triggered, e.g., a frame composer or surface flinger (SF) mechanism can be directly triggered to bypass a vertical synchronization (VSYNC) time in order to avoid janks.
Some aspects of jank reduction technology can utilize a buffer queue (BQ) status in order to reduce janks. In some aspects, each component or layer in a janks reduction system can have a buffer queue to maintain the buffer status. Also, the buffer queue status can be used to reduce janks, reduce latency, and/or reduce power. In some instances, when a frame is available to be sent to a buffer queue, the frame available buffer call timestamp may move closer to a VSYNC timestamp. As a result, a jank may occur. In some instances, amount of a buffer queue counter can be large or small. This can also correlate to a large or small buffer queue headroom.
In some aspects, if the buffer queue headroom is large, then the frame may be ready to be sent to the BQ. Also, if the buffer queue headroom is large relative to a VSYNC timestamp, then the buffer headroom may have enough room to avoid a jank. Additionally, if a BQ headroom is narrow, then the frame ready time, e.g., when the frame is finished rendering and ready to be sent to the BQ, may be close to the next VSYNC timestamp, which may result in a jank. Accordingly, janks can occur because a frame may not finish rendering before the next VSYNC time. For instance, if the frame ready time is close to the VSYNC time, then a jank may occur. For example, if a frame is ready to be sent to the BQ, and the next VSYNC time may be a short time away, e.g., 1 ms away, such that the headroom is small, which can mean a jank may be likely to occur.
In some instances, a CPU frequency may be changing based on the workload and/or governor strategy. For instance, a CPU frequency may be upscaling or downscaling based on a workload change. However, janks can still occur even with the CPU upscaling and/or downscaling. For instance, in some aspects, the frequency scaling at a CPU, e.g., by a CPU governor, may not help to avoid janks. Additionally, the position of a scheduler or a governor may be based on the workload, as these components may not be aware of buffer queue latency information. As such, these components may not increase the CPU frequency to improve the buffer queue headroom. In some aspects, if the CPU frequency is increased when the buffer queue status is detected, then a jank may be avoided. For example, if the frequency is increased when the buffer queue status corresponds to a frame ready time that is close to the next VSYNC time, then a potential jank may be avoided. Also, if the CPU frequency is increased, the headroom can also be increased to avoid a potential jank.
Additionally, the buffer queue status can affect the frame response latency. In many game or application scenarios, the frame response latency may not be sufficient. For instance, at a starting point of a frame, a game may render the frame on the CPU side, and then the GPU may take over the rendering. When the GPU finishes rendering the frame at the next VSYNC frame, the panel may display the frame to the user. In some instances, the ending point may be when the frame is displayed to the user, e.g., at a display. As such, the frame response latency may be from the starting point to the ending point.
FIG. 3 illustrates an example timing diagram 300 in accordance with one or more techniques of this disclosure. As shown in FIG. 3, timing diagram 300 includes  VSYNC time period (VSYNC_period) 302, first frame 311, first VSYNC time 321, second VSYNC time 322, third VSYNC time 323, and fourth VSYNC time 324. FIG. 3 also displays a CPU, a GPU, a surface flinger (SF) mechanism, a composer, a display or display engine, and a buffer queue (BufferQueue) . The display or display engine can also be referred to as a number of other terms, such as a display buffer.
In some aspects, a frame, e.g., first frame 311, may take three VSYNC time periods to move from rendering at a CPU to being displayed at a display. As shown in FIG. 3, after the first VSYNC time 321, the CPU may start rendering the frame 311. After this, the GPU may take over the rendering process. In the next VSYNC cycle, e.g., after VSYNC time 322, a surface flinger (SF) mechanism may consume the frame to perform the frame composition.
Also, when the CPU is finished rendering, the buffer queue status may be set to ready, which can result in an available buffer value, e.g., the number of available frames or buffers in the buffer queue, changing from 0 to 1. For example, an available buffer value of 1 can mean that there is one available buffer in the buffer queue. When the next VSYNC arrives, e.g., VSYNC time 322, the SF mechanism may determine if there is an available buffer in the buffer queue. If so, the SF mechanism may consume the available buffer at the VSYNC signal, e.g., VSYNC time 322. By doing so, the available buffer value or number of available buffers in the buffer queue may decrease to 0 once the SF mechanism consumes the frame. Once the SF mechanism finishes consuming the frame, the composer can finish the frame composition. After this, the display can flush the frame to the user, such that the frame is displayed to the user. As such, the frame latency period may last about 3 VSYNC periods, e.g., from VSYNC time 321 to VSYNC time 324.
However, if a jank occurs, then the frame latency may be increased. For example, a jank may cause the frame latency period to increase to about 4 VSYNC periods. For instance, if the renderer on the CPU side takes a long time to render the frame, e.g., past the next VSYNC time, this may result in a jank. Indeed, if the renderer takes a long time to render a frame, and a jank occurs as a result, this may cause a delay in the frame latency by around one additional VSYNC period. Accordingly, a jank may result in a corresponding increase to the frame latency.
FIG. 4 illustrates an example timing diagram 400 in accordance with one or more techniques of this disclosure. As shown in FIG. 4, timing diagram 400 includes VSYNC time period (VSYNC_period) 402, first frame 411, second frame 412, first  VSYNC time 421, second VSYNC time 422, third VSYNC time 423, fourth VSYNC time 424, fifth VSYNC time 425, and sixth VSYNC time 426. FIG. 4 also displays a CPU, a GPU, a surface flinger (SF) mechanism, a composer, a display or display engine, and a buffer queue (BufferQueue) .
FIG. 4 displays that when a jank occurs, the subsequent frame response latency may be affected. For instance, at the CPU side, when frame 411 finishes rendering, then the CPU may begin to render frame 412. At the buffer queue, when frame 412 is ready, the available buffer value or number of available buffers may increase from one to two. Also, when the next VSYNC time arrives, e.g., VSYNC time 423, the SF mechanism may consume frame 411. Frame 412 may be consumed by the SF mechanism at the next VSYNC signal, e.g., VSYNC time 424.
In some aspects, if there are two available frames or buffers in the buffer queue, then the buffer may be accumulated. As the SF mechanism may consume one frame at a time, if the available buffer value is two, then the buffer is accumulated. As such, the frame response latency for frame 412 may also be increased if the buffer is accumulated, similar to if frame 411 experiences a jank. For example, the frame response latency may be four VSYNC periods if the buffer queue is accumulated, e.g., the available buffer value is two or more. Additionally, the frame response latency for another frame, e.g., frame 413 (not shown) may also increase to four VSYNC periods if the buffer queue is accumulated or frame 411 experiences a jank. So the frame response latency for all subsequent frames may be impacted if the buffer is accumulated or if one frame experiences a jank. This situation can be detrimental to gaming applications, as a buffer accumulation or single jank occurrence can lead to an increase in frame response latency for a large number of consecutive frames.
As mentioned above, the frame response latency for all subsequent frames can be increased, e.g., from 3 to 4 VSYNC periods, if a buffer is accumulated and/or a jank occurs. As shown in FIG. 4, in the display pipeline, the frame response latency for frame 411 may be 4 VSYNC periods. Each subsequent frame can also have a frame response latency of 4 VSYNC periods. As such, all subsequent frames may be impacted by a buffer accumulation or a jank occurrence in a previous frame. This can occur even if there are no janks in the subsequent frames.
As further shown in FIG. 4, after the CPU renders frame 412, the buffer queue may be accumulated to an available buffer value of 2. So after frame 412 is rendered, there may be two available buffers in the buffer queue. This will impact all the frame  response latencies for each subsequent frame, e.g., increasing the respective frame response latencies to 4 VSYNC periods. In some instances, the buffer queue can be accumulated, e.g., greater than or equal to two buffers in the buffer queue, a majority of the time, e.g., up to 90%of the time. As such, the buffer accumulation or even a single jank can impact the latency of all subsequent frames.
FIG. 5 illustrates an example timing diagram 500 in accordance with one or more techniques of this disclosure. As shown in FIG. 5, timing diagram 500 includes VSYNC time period (VSYNC_period) 502, first frame 511, second frame 512, third frame 513, fourth frame 514, fifth frame 515, first VSYNC time 521, second VSYNC time 522, third VSYNC time 523, fourth VSYNC time 524, and fifth VSYNC time 525. FIG. 5 also displays a CPU, a GPU, a surface flinger (SF) mechanism, a composer, a display or display engine, and a buffer queue (BufferQueue) .
FIG. 5 illustrates one example of a frame response in a fast rendering case. For instance, FIG. 5 displays that if the renderer is rendering too fast, this can also impact the frame response latency for subsequent frames. As shown in FIG. 5, the renderer is rendering fast on the CPU side, e.g., greater than 60 FPS. If this happens, the buffer queue may become accumulated, e.g., 2 or more frames or buffers may be in the buffer queue. As mentioned above, if the buffer queue is accumulated, the frame response latency can be impacted.
In some aspects, a game or gaming application may not adhere to the VSYNC timing schedule during the rendering process. In some instances, the latency between two frames may be less than one VSYNC period, which may trigger buffer accumulation. For example, if the buffer queue becomes accumulated after two frames, e.g., frames 511 and 512, the frame response latency may start to increase after frame 512. As shown in FIG. 5, a buffer queue that is accumulated can increase the frame response latency, e.g., from 3 to 4 VSYNC periods. For example, the frame latency for  frames  511 and 512 is about 3 VSYNC periods. Once the buffer queue starts to accumulate, e.g., after frame 512, this frame latency may increase. Indeed, the frame latency for frame 513 is more than 3 VSYNC periods. Also, the frame latency for frame 514 is about 4 VSYNC periods. Although the latency for frame 515 is not shown in FIG. 5, it is also about 4 VSYNC periods.
As shown in FIG. 5, a buffer can become accumulated as a result of fast rendering. Further, if a jank occurs, this can also increase the chances of buffer accumulation. And when the buffer is accumulated, this can cause a delay in the frame response  latency. This is because the subsequent frames may wait on the previous frames to be consumed. Accordingly, the frame response latency can be affected by buffer accumulation, which can occur due to fast rendering or janks.
In some aspects, the CPU can be operating at high frequency and the available buffer may be accumulated. For example, the CPU power may be high and the FPS mode may be 60 or 90. If the buffer is accumulated, when the SF mechanism is ready to consume the frame, a large headroom may be needed in order to avoid a jank. Indeed, in some aspects, when the buffer is accumulated, the CPU may still be running at a high frequency.
Some aspects of the present disclosure may reduce the buffer accumulation if the CPU frequency is downscaled or reduced. As such, the present disclosure can downscale the CPU frequency to reduce the buffer accumulation status. Also, if the CPU is not running at a high frequency, the present disclosure may also be able to reduce janks. Accordingly, if the buffer accumulation status is high, e.g., the available buffer value is greater than or equal to 2, then the present disclosure can downscale the CPU frequency to reduce the buffer accumulation. By doing so, this can also reduce the likelihood of any potential janks. Moreover, if the headroom for a certain frame is small, aspects of the present disclosure can increase the CPU frequency in order to increase the headroom. This can also result in a reduced likelihood of any potential janks.
In some aspects, the buffer queue status can be utilized to improve performance and/or power efficiency. For example, in some instances, a CPU governor may not be sufficient to avoid janks or reduce the frame response latency. This can result in low performance or power efficiency. However, aspects of the present disclosure can utilize the buffer queue headroom in order to avoid janks or reduce the frame response latency. For instance, by utilizing the buffer queue headroom, the present disclosure can achieve the same performance with a lower frame response latency and/or low power consumption. In some instances, this approach can be accurate and sufficient for CPU frequency scaling. Accordingly, aspects of the present disclosure can utilize CPU downscaling to decrease the buffer accumulation. Aspects of the present disclosure can also save power when the CPU frequency is downscaled. Moreover, aspects of the present disclosure can reduce any potential janks by upscaling the CPU frequency when the buffer queue headroom is small. Therefore, aspects of the present  disclosure can achieve the same performance with a lower average frame response latency and/or a lower power consumption.
FIG. 6 illustrates an example timing diagram 600 in accordance with one or more techniques of this disclosure. As shown in FIG. 6, timing diagram 600 includes VSYNC time period (VSYNC_period) 602, frame 610, first frame 611, second frame 612, third frame 613, first VSYNC time 621, second VSYNC time 622, and third VSYNC time 623. FIG. 6 also displays a main surface flinger (SF) mechanism (SF -Main) , a buffer or binder SF mechanism (SF -Binder) , and a buffer queue (BufferQueue) .
FIG. 6 shows one approach by the present disclosure during buffer accumulation. For example, aspects of the present disclosure can determine the buffer accumulation status or available buffer value in order to adjust or update the CPU frequency. As shown in FIG. 6, for frames when the buffer is accumulated, e.g., frame 612, the present disclosure can determine the CPU frame latency. FIG. 6 also displays a number of abbreviations or definitions. For instance, diffQB is the duration or latency between two queueBuffer calls, i.e., the time period between frames being sent to the buffer queue. Thus, the diffQB is the time difference between frames of a queueBuffer call. Also, diffQBToSF is the duration between a previous VSYNC time and a queueBuffer call for a frame, i.e., when the frame is sent to buffer queue. Also, maxBuffer is the maximum buffer value or the value at which the buffer is accumulated. As shown in FIG. 6, the maxBuffer can be 2.
In some aspects, if a frame takes a long time to finish rendering or be sent to the buffer queue, then the buffer accumulation status may decrease. For example, if frame 613 takes a long time to finish rendering or be sent to buffer queue, then the buffer accumulation status may reduce. As the ready time for frame 613 is close to the VSYNC signal, the buffer accumulation status or available buffer value has time to decrease.
As further shown in FIG. 6, the headroom based on frame 612 is the difference between the time frame 612 is sent to the buffer queue and the time frame 613 is sent to the buffer queue. As indicated by diffQB (prediction) , this time difference between queueBuffer calls for  frames  612 and 613 can be predicted, e.g., based on the calculations mentioned below. For instances, aspects of the present disclosure may predict that if frame 613 takes a long time to be sent to the buffer queue, then the buffer accumulation may decrease. Also, based on this diffQB prediction and the  headroom based on frame 612, the present disclosure can calculate a CPU scale value, i.e., a value used to scale or adjust the CPU frequency.
As indicated above, aspects of the present disclosure can utilize a number of different formulas or calculations. For instance, the present disclosure can use a number of calculations to determine the scale value to adjust a CPU frequency based on buffer accumulation status. For example, the headroom for a frame can be equal to the VSYNC period multiplied by the maximum buffer value and subtracted by the duration between a previous VSYNC time and a buffer queue call for a frame. Indeed, headroom = VSYNC_period *maxBuffer –diffQBToSF. The maxBuffer can be equal to a number of different values, e.g., 2, 3 or any other value. This can also be based on different scenarios.
Additionally, a CPU scale value can be equal to the time difference between frames of a buffer queue call divided by the headroom for a frame. Thus, scale = diffQB /headroom. In some aspects, the scale value can be the value that is multiplied or scaled by the maximum CPU frequency. For example, if the current maximum CPU frequency is 2 GHz, and the scale value is 0.5, then the new maximum CPU frequency will be 1 GHz. Accordingly, the new maximum CPU frequency = scale *previous maximum CPU frequency. In the next frame cycle, after calculating the scale value, the present disclosure can use the new maximum CPU frequency in order to limit the maximum frequency, such as by downscaling the maximum frequency.
Aspects of the present disclosure can utilize a number of different steps, e.g., to determine a CPU scale value. For instance, aspects of the present disclosure can predict or assume a subsequent frame offset duration or headroom, e.g., the headroom based on frame 612, when the buffer is accumulated, e.g., there is greater than one available buffer in the buffer queue, e.g., 2. In some aspects, the headroom, or the frame latency for frame 612, can be equal to a VSYNC period multiplied by the maximum buffer value and subtracted by the duration between a previous VSYNC time and a buffer queue call for a frame, e.g., headroom = VSYNC_period *maxBuffer –diffQBToSF.
Aspects of the present disclosure can also determine a diffQBToSF, which can be equal to the difference between a first VSYNC time, e.g., VSYNC time 621, and buffer ready time for a current frame, e.g., the number of available buffers is increased as the frame 612 is ready to be sent to the buffer queue. Also, the subsequent scale value can be based on the diffQBToSF and diffQB. For example, the subsequent scale  value = diffQB /headroom. Further, the present disclosure can determine that a diffQB value is equal to the difference between a buffer ready time for previous frame and buffer ready time for current frame.
Further, aspects of the present disclosure can calculate or determine a new maximum CPU frequency value, e.g., when there is more than one available buffer in the buffer queue, based on the current maximum CPU frequency value and the subsequent scale value. Indeed, the new maximum CPU frequency = scale *current maximum CPU frequency. In some aspects, the new maximum CPU frequency value can be updated based on the subsequent scale value. Further, the present disclosure can update the new maximum CPU frequency value by downscaling. Also, a new or subsequent frame can be rendered or executed based on the new maximum CPU frequency value. As indicated herein, the CPU maximum frequency can be adjusted or downscaled based on the accumulation status and the next frame’s predicted or assumed execution duration.
As indicated above, aspects of the present disclosure can obtain the frame latency of a current frame, e.g., frame 612. The present disclosure can also predict the next or subsequent frame latency, e.g., the latency for frame 613. Further, aspects of the present disclosure can calculate a subsequent scale value equal to the following formula: scale = diffQB (frame 612) /diffQB (frame 613) = diffQB / (VSYNC_period *maxBuffer -diffQBToSF) . Further, the present disclosure can renew or update the maximum frequency of each CPU core.
As shown in FIG. 6, aspects of the present disclosure can determine a current maximum frequency value based on a previous maximum frequency value and a current frame scale value. Aspects of the present disclosure can also determine a subsequent frame buffer offset duration, e.g., diffQB (prediction) , when there is more than one available buffer in the buffer queue, e.g., 2. In some aspects, the subsequent frame buffer offset duration, e.g., diffQB (prediction) , can be equal to a difference between a current frame VSYNC offset duration, e.g., diffQBToSF, and the product of a first VSYNC period, e.g., VSYNC period 602, and the available buffer value, e.g., 2. Also, the first VSYNC period, e.g., VSYNC period 602, can begin at a first VSYNC time, e.g., VSYNC time 621, and end at a second VSYNC time, e.g., VSYNC time 622. In some instances, the current frame VSYNC offset duration, e.g., diffQBToSF, can be equal to a difference between the first VSYNC time, e.g., VSYNC time 621, and the current frame buffer time, e.g., frame 612 at SF -Binder.
As further shown in FIG. 6, aspects of the present disclosure can calculate a subsequent scale value, e.g., Scale, based on the subsequent frame buffer offset duration, e.g., diffQB (prediction) , and a current frame buffer offset duration, e.g., diffQB. In some aspects, the current frame buffer offset duration can be equal to a difference between a current frame buffer time, e.g., frame 612 at SF –Binder, and a previous frame buffer time, e.g., frame 611 at SF -Binder. Also, the subsequent scale value can be equal to the current frame buffer offset duration, e.g., diffQB, divided by the subsequent frame buffer offset duration, e.g., diffQB (prediction) .
Also, aspects of the present disclosure can determine a new maximum frequency value when there is more than one available buffer in the buffer queue, e.g., 2. Also, the new maximum frequency value can be based on a current maximum frequency value and the subsequent scale value, e.g., Scale. In some aspects, the new maximum frequency value can be equal to the product of the current maximum frequency value and the subsequent scale value, e.g., Scale.
As further shown in FIG. 6, aspects of the present disclosure can update a maximum CPU frequency based on the new maximum frequency value. Aspects of the present disclosure can also downscale the maximum CPU frequency. Additionally, aspects of the present disclosure can render a subsequent frame, e.g., frame 613, based on the updated maximum CPU frequency.
As also shown in FIG. 6, aspects of the present disclosure can send a current frame, e.g., frame 612, to a buffer queue, e.g., BufferQueue, at the current frame buffer time, e.g., frame 612 at SF –Binder, and the number of available buffers is increased when the current frame is sent to the buffer queue. Aspects of the present disclosure can also consume a previous frame, e.g., frame 611, at the first VSYNC time, e.g., VSYNC time 621, and/or decrease the buffer value when the previous frame is consumed. In some aspects, a SF mechanism can consume the previous frame, e.g., frame 611, at the first VSYNC time, e.g., VSYNC time 621.
In some aspects, the new or subsequent scale value may be less than 1, which can mean the CPU frequency value will be downscaled. As such, the present disclosure can obtain the scale parameter and the current CPU frequency to determine the new maximum CPU frequency for the next frame, e.g., frame 613. Thus, when frame 613 begins to render, it will be rendered at a new CPU frequency based on the CPU downscaling. Also, the VSYNC period can dynamically change, e.g., based on the  FPS mode. For example, the VSYNC period can be about 16 ms for 60 FPS mode and 11 ms for 90 FPS mode.
FIG. 7 illustrates an example timing diagram 700 in accordance with one or more techniques of this disclosure. As shown in FIG. 7, timing diagram 700 includes VSYNC time period (VSYNC_period) 702, first frame 711, second frame 712, third frame 713, first VSYNC time 721, second VSYNC time 722, and third VSYNC time 723. FIG. 7 also displays a main surface flinger (SF) mechanism (SF -Main) , a buffer or binder SF mechanism (SF -Binder) , and a buffer queue (BufferQueue) .
FIG. 7 shows one approach by the present disclosure including a reduced frame headroom. For example, aspects of the present disclosure can determine the duration of a frame headroom offset and adjust or update the CPU frequency. In some aspects, if the headroom is too small, e.g., the headroom based on frame 712 shown in FIG. 7, the present disclosure can adjust or upscale the CPU frequency to increase the headroom. By doing so, this can avoid any potential janks. Accordingly, if aspects of the present disclosure desire to avoid janks, the headroom can be increased. In some aspects, the present disclosure can also utilize the latency between consecutive frames to avoid potential janks. Further, in order to obtain the scale value, the present disclosure can utilize the frame latency between consecutive frames.
In some aspects, if the subsequent scale value is greater than 1, aspects of the present disclosure may adjust or upscale the minimum CPU frequency to avoid potential janks. If the subsequent scale value is less than or equal to 1, the present disclosure may not need to adjust or upscale the minimum CPU frequency, such that the minimum CPU frequency can remain the same. Accordingly, the present disclosure may determine if the scale value is greater than 1. By doing so, aspects of the present disclosure can renew or update the minimum CPU frequency of each core. Therefore, if the buffer queue is not accumulated, then the present disclosure may not be concerned with downscaling the CPU frequency. As further shown in FIG. 7, the maximum buffer value (maxBuffer) can be equal to 1.
Aspects of the present disclosure can perform a variety of steps or functions to determine if a CPU frequency should be adjusted. For instance, the present disclosure can determine a frame offset duration or headroom that is equal to the difference between a VSYNC period and a diffQBToSF value. Indeed, as shown in FIG. 7, the headroom based on frame 712 = (VSYNC_period –diffQBToSF) . Also, aspects of the present disclosure can determine the diffQBToSF, which is equal to the difference  between a first VSYNC time 721 and the buffer ready time for current frame, i.e., the time the number of available buffers is increased because frame 712 is ready to be sent to the buffer queue. The present disclosure can also determine a new or subsequent scale value when the headroom, e.g., headroom for frame 712, is decreasing. Also, the present disclosure can determine a subsequent scale value, which can be equal to diffQB / (headroom + VSYNC_period) .
In some aspects, the present disclosure can calculate a new minimum CPU frequency value when the new or subsequent scale value is greater than a certain value, e.g., 1. The present disclosure can also update a new minimum CPU frequency value, e.g., when the new scale value is greater than 1, based on the previous minimum CPU frequency value and the new scale value. Thus, the new minimum CPU frequency can be equal to the subsequent scale value multiplied by the current minimum CPU frequency. Also, when updating the CPU frequency, the present disclosure can upscale the CPU frequency. Aspects of the present disclosure can also render or execute a subsequent frame based on the new CPU frequency value.
As mentioned herein, aspects of the present disclosure can obtain the frame latency of a current frame, e.g., frame 712. The present disclosure can also predict the next frame latency, e.g., the latency for frame 713. Further, aspects of the present disclosure can calculate a subsequent scale value based on the following formula: scale = diffQB (frame 712) /diffQB (frame 713) = diffQB / (VSYNC_period –diffQBToSF) . Also, if the subsequent scale value is greater than 1, the present disclosure can adjust or renew the minimum frequency of each CPU core.
As such, when the buffer queue is accumulated, the present disclosure can update the maximum CPU frequency. When there is no buffer accumulation, and the headroom is decreasing, the present disclosure can update the minimum CPU frequency when the new scale value is greater than 1.
As shown in FIG. 7, aspects of the present disclosure can determine a current minimum frequency value based on a previous minimum frequency value and a current frame scale value. Aspects of the present disclosure can also determine a subsequent frame buffer offset duration, e.g., diffQB (prediction) , when a current frame headroom offset duration, e.g., headroom based on 712, is decreasing. In some aspects, the current frame headroom offset duration can be equal to a difference between a second VSYNC time, e.g., VSYNC time 722, and a current frame buffer time, e.g., frame 712 at SF -Binder. Also, a first VSYNC period, e.g., VSYNC period  702, can begin at a first VSYNC time, e.g., VSYNC time 721, and end at the second VSYNC time, e.g., VSYNC time 722. Also, the subsequent frame buffer offset duration, e.g., diffQB (prediction) , can be equal to a difference between a current frame buffer time, e.g., frame 712 at SF –Binder, and a subsequent frame buffer time, e.g., frame 713 at SF -Binder.
Additionally, aspects of the present disclosure can calculate a subsequent scale value, e.g., Scale, based on the current frame headroom offset duration, e.g., headroom based on 712, and a current frame buffer offset duration, e.g., diffQB. In some aspects, the current frame buffer offset duration, e.g., diffQB, can be equal to a difference between the current frame buffer time, e.g., frame 712 at SF –Binder, and a previous frame buffer time, e.g., frame 711 at SF –Binder. Additionally, the subsequent scale value can be equal to the current frame buffer offset duration, e.g., diffQB, divided by the sum of the current frame headroom offset duration, e.g., headroom based on 712, and the first VSYNC period, e.g., VSYNC period 702. In some instances, a current frame VSYNC offset duration, e.g., diffQBToSF, can be equal to a difference between the first VSYNC time, e.g., VSYNC time 721, and the current frame buffer time, e.g., frame 712 at SF -Binder. Also, the subsequent scale value, e.g., Scale, can be equal to the current frame buffer offset duration e.g., diffQBToSF, divided by the difference between the current frame VSYNC offset duration, e.g., diffQBToSF, and the first VSYNC period, e.g., VSYNC period 702.
As further shown in FIG. 7, aspects of the present disclosure can determine a new minimum frequency value when the subsequent scale value, e.g., Scale, is greater than one. In some aspects, the new minimum frequency value can be based on a current minimum frequency value and the subsequent scale value, e.g., Scale. Also, the new minimum frequency value can be equal to the product of the current minimum frequency value and the subsequent scale value, e.g., Scale.
Moreover, as shown in FIG. 7, aspects of the present disclosure can update a minimum CPU frequency based on the new minimum frequency value. Aspects of the present disclosure can also upscale the minimum CPU frequency. Also, aspects of the present disclosure can render a subsequent frame, e.g., frame 713, based on the updated minimum CPU frequency.
As further shown in FIG. 7, aspects of the present disclosure can send a current frame, e.g., frame 712, to a buffer queue, e.g., BufferQueue, at the current frame buffer time, e.g., frame 712 at SF –Binder, the number of available buffers can be increased when  the current frame is sent to the buffer queue. Additionally, aspects of the present disclosure can consume a previous frame, e.g., frame 711, at the first VSYNC time, e.g., VSYNC time 721, and/or decrease an available buffer value when the previous frame is consumed. In some aspects, a SF mechanism can consume the previous frame, e.g., frame 711, at the first VSYNC time, e.g., VSYNC time 721.
Aspects of the present disclosure can utilize a buffer queue based CPU scaling, such as with certain steps or workflows. For instance, based on a maxBuffer value, a diffQBToSF value, and a diffQB value, aspects of the present disclosure can calculate a scaling parameter to downscale or upscale a CPU frequency. Further, the present disclosure can detect a CPU architecture and obtain a current CPU frequency of each cluster, and then set a current CPU frequency (cpuxCurrFreq) . Aspects of the present disclosure can also calculate a new maximum frequency of each cluster, e.g., when the buffer is accumulated, based on the current CPU frequency and a new scale value (calcCpuxMaxFreq = cpuxCurrFreq *scale) . When the buffer is not accumulated, the present disclosure can calculate a new minimum frequency of each cluster, based on the current CPU frequency and a new scale value (calcCpuxMinFreq = cpuxCurrFreq *scale) . Based on the calculated CPU maximum or minimum frequency, the present disclosure can obtain a new maximum or minimum frequency, e.g., from a CPU available frequency list. For example, when a buffer is accumulated, cpuxMinFreq = min (cpuxMaxFreq, cpuxInitMinFreq) . When a buffer is not accumulated, cpuMaxFreq = max (cpuxMinFreq, cpuxInitMaxFreq) . As such, when a buffer is accumulated, the present disclosure is limiting the maximum CPU frequency, and when the buffer is not accumulated, the present disclosure is limiting the minimum CPU frequency. Moreover, the present disclosure can set a new maximum or minimum frequency of each cluster, e.g., through a perfLock API, and this setting can last for one VSYNC period.
In some aspects, when a device boots up, the present disclosure can set the minimum frequency for each cluster based on a different chipset, e.g., cpuxInitMinFreq can be set. However, in some aspects, this value may not be the minimum frequency in the available frequency list. Also, cpuxMaxFreq can correspond to the maximum frequency in the available CPU frequency list. With this feature enabled, aspects of the present disclosure can cause the CPU to run at the lowest CPU frequency.
As mentioned above, aspects of the present disclosure can achieve a number of benefits or advantages based on the aforementioned CPU frequency scaling. For  instance, based on the buffer queue accumulation status, and by utilizing the CPU downscaling strategy, the present disclosure can achieve a number of advantages. For example, when the buffer queue accumulation headroom is utilized, the power consumption per frame can be reduced, e.g., until there is no headroom. Further, the present disclosure can reduce the amount of potential janks. Also, the present disclosure can cause the average frame response latency to improve.
Additionally, as mentioned above, if the present disclosure detects that the buffer queue status is accumulated, the CPU frequency can be downscaled. Also, the present disclosure can downscale the CPU frequency until the buffer queue status is no longer accumulated. Further, when the CPU frequency is downscaled, this can save power.
As further mentioned herein, if the buffer queue status is not accumulated, there may be one available buffer, and the present disclosure may maintain a long headroom length. Thus, when the headroom is determined to be decreasing, the present disclosure can apply an upscaling strategy. For instance, an upscaling factor can be calculated based on the headroom for a certain frame. Additionally, the power consumption may be controlled. The present disclosure can also detect a potential jank scenario in advance, which can result in a reduction of potential janks. Accordingly, when the headroom is determined to be getting smaller, the present disclosure can upscale the CPU frequency to avoid potential janks. So the present disclosure can upscale a CPU frequency to increase the headroom. As mentioned above, the present disclosure may not downscale a CPU frequency unless the buffer queue status is accumulated
Aspects of the present disclosure can adjust or scale a CPU frequency value in order to avoid potential janks. For instance, if the buffer queue status is accumulated, e.g., the number of available buffers is greater than one, then the present disclosure can determine a headroom and a new scale value. The present disclosure can also calculate the new maximum CPU frequency by multiplying the new scale value by the current maximum CPU frequency. As such, the maximum CPU frequency may be downscaled if the buffer is accumulated. Also, if the buffer queue status is not accumulated, and the headroom is decreasing, the present disclosure can upscale the minimum CPU frequency, e.g., if the new scale value is greater than 1. Also, the VSYNC period can dynamically change based on the FPS mode, e.g., the VSYNC period can be about 16 ms for 60 FPS mode and 11 ms for 90 FPS mode.
Aspects of the present disclosure can reduce the frame latency based on the aforementioned frame headroom regulator techniques. For example, the present disclosure can reduce the frame latency by a certain percentage, e.g., 11%. In some aspects, the frame latency can correspond to a user display. For instance, the starting point of the frame latency can be the previous frame’s queueBuffer call end point, and the ending point of the frame latency can be when the frame is flushed on the display. Also, the present disclosure can reduce the CPU average frequency by a certain percentage, e.g., 19%or 21.4%. In many games or applications, the buffer queue can be accumulated, e.g., the buffer queue can be accumulated up to 90%of the time. As such, aspects of the present disclosure may downscale the CPU frequency in order to save power and reduce potential janks. With this optimization, the frame response latency can be reduced.
FIG. 8 illustrates an example flowchart 800 of an example method in accordance with one or more techniques of this disclosure. The method may be performed by an apparatus such as a frame processor, a frame composer, a display processor, a GPU, or an apparatus for graphics processing. At 802, the apparatus can determine a current maximum frequency value based on a previous maximum frequency value and a current frame scale value, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. At 804, the apparatus can also determine a subsequent frame buffer offset duration when an available buffer value is greater than one, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. In some aspects, the subsequent frame buffer offset duration can be equal to a difference between a current frame VSYNC offset duration and the product of a first VSYNC period and the available buffer value, i.e., the number of available buffers in the buffer queue, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. Also, the first VSYNC period can begin at a first VSYNC time and end at a second VSYNC time, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. In some instances, the current frame VSYNC offset duration can be equal to a difference between the first VSYNC time and the current frame buffer time, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7.
At 806, the apparatus can calculate a subsequent scale value based on the subsequent frame buffer offset duration and a current frame buffer offset duration, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. In some aspects, the current frame buffer offset duration can be equal to a difference between a current frame  buffer time and a previous frame buffer time, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. Also, the subsequent scale value can be equal to the current frame buffer offset duration divided by the subsequent frame buffer offset duration, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7.
At 808, the apparatus can determine a new maximum frequency value when the available buffer value is greater than one, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. Also, the new maximum frequency value can be based on a current maximum frequency value and the subsequent scale value, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. In some aspects, the new maximum frequency value can be equal to the product of the current maximum frequency value and the subsequent scale value, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7.
At 810, the apparatus can update a maximum CPU frequency based on the new maximum frequency value, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. At 812, the apparatus can downscale the maximum CPU frequency, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. At 814, the apparatus can render a subsequent frame based on the updated maximum CPU frequency, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7.
At 816, the apparatus can send a current frame to a buffer queue at the current frame buffer time and the number of available buffers, e.g., the available buffer value, is increased when the current frame is sent to the buffer queue, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. At 818, the apparatus can consume a previous frame at the first VSYNC time and/or decrease the buffer value when the previous frame is consumed, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. In some aspects, a surface flinger (SF) mechanism can consume the previous frame at the first VSYNC time, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7.
FIG. 9 illustrates an example flowchart 900 of an example method in accordance with one or more techniques of this disclosure. The method may be performed by an apparatus such as a frame processor, a frame composer, a display processor, a GPU, or an apparatus for graphics processing. At 902, the apparatus can determine a current minimum frequency value based on a previous minimum frequency value and a current frame scale value, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7.
At 904, the apparatus can determine a subsequent frame buffer offset duration when a current frame headroom offset duration is decreasing, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. In some aspects, the apparatus can determine the subsequent frame buffer offset duration when there are zero or one available buffers in buffer queue, e.g., the buffer is not accumulated. In some aspects, the current frame headroom offset duration can be equal to a difference between a second VSYNC time and a current frame buffer time, where a first VSYNC period can begin at a first VSYNC time and end at the second VSYNC time, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. Also, the subsequent frame buffer offset duration can be equal to a difference between a current frame buffer time and a subsequent frame buffer time, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7.
At 906, the apparatus can calculate a subsequent scale value based on the current frame headroom offset duration and a current frame buffer offset duration, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. In some aspects, the current frame buffer offset duration can be equal to a difference between the current frame buffer time and a previous frame buffer time, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. Additionally, the subsequent scale value can be equal to the current frame buffer offset duration divided by the sum of the current frame headroom offset duration and the first VSYNC period, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. In some instances, a current frame VSYNC offset duration can be equal to a difference between the first VSYNC time and the current frame buffer time, where the subsequent scale value can be equal to the current frame buffer offset duration divided by the difference between the current frame VSYNC offset duration and the first VSYNC period, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7.
At 908, the apparatus can determine a new minimum frequency value when the subsequent scale value is greater than one, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. In some aspects, the new minimum frequency value can be based on a current minimum frequency value and the subsequent scale value, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. Also, the new minimum frequency value can be equal to the product of the current minimum frequency value and the subsequent scale value, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7.
At 910, the apparatus can update a minimum CPU frequency based on the new minimum frequency value, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. At 912, the apparatus can upscale the minimum CPU frequency, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. At 914, the apparatus can also render a subsequent frame based on the updated minimum CPU frequency, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7.
At 916, the apparatus can send a current frame to a buffer queue at the current frame buffer time and an available buffer value is increased when the current frame is sent to the buffer queue, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. At 918, the apparatus can consume a previous frame at the first VSYNC time and/or decrease a buffer value when the previous frame is consumed, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7. In some aspects, a SF mechanism can consume the previous frame at the first VSYNC time, as described in connection with the examples in FIGs. 3, 4, 5, 6, and 7.
In one configuration, a method or apparatus for graphics processing is provided. The apparatus may be a frame processor, a frame composer, a display processor, a GPU or some other processor that can perform graphics processing. In one aspect, the apparatus may be the processing unit 120 within the device 104, or may be some other hardware within device 104 or another device. The apparatus may include means for determining a subsequent frame buffer offset duration when an available buffer value is greater than one. The apparatus may also include means for calculating a subsequent scale value based on the subsequent frame buffer offset duration and a current frame buffer offset duration. The apparatus may also include means for determining a new maximum frequency value when the buffer value is greater than one. The apparatus may also include means for updating a maximum CPU frequency based on the new maximum frequency value. The apparatus may also include means for downscaling the maximum CPU frequency. The apparatus may also include means for rendering a subsequent frame based on the updated maximum CPU frequency. The apparatus may also include means for determining the current maximum frequency value based on a previous maximum frequency value and a current frame scale value. The apparatus may also include means for sending a current frame to a buffer queue at the current frame buffer time and the available buffer value is increased when the current frame is sent to the buffer queue. The apparatus may also include means for consuming a previous frame at the first VSYNC  time and/or decreasing the available buffer value when the previous frame is consumed.
Additionally, the apparatus may include means for determining a subsequent frame buffer offset duration when a current frame headroom offset duration is decreasing. The apparatus may also include means for calculating a subsequent scale value based on the current frame headroom offset duration and a current frame buffer offset duration. The apparatus may also include means for determining a new minimum frequency value when the subsequent scale value is greater than one. The apparatus may also include means for updating a minimum CPU frequency based on the new minimum frequency value. The apparatus may also include means for upscaling the minimum CPU frequency. The apparatus may also include means for rendering a subsequent frame based on the updated minimum CPU frequency. The apparatus may also include means for determining the current minimum frequency value based on a previous minimum frequency value and a current frame scale value. The apparatus may also include means for sending a current frame to a buffer queue at the current frame buffer time and an available buffer value is increased when the current frame is sent to the buffer queue. The apparatus may also include means for consuming a previous frame at the first VSYNC time and/or decreasing an available buffer value when the previous frame is consumed.
The subject matter described herein can be implemented to realize one or more benefits or advantages. For instance, the described frame and/or graphics processing techniques can be used by GPUs, frame composers, frame processors, display processors, or other processors to enable increased accuracy of jank detection. This can also be accomplished at a low cost compared to other frame or graphics processing techniques. Moreover, the frame or graphics processing techniques herein can improve or speed up data processing or execution. Further, the frame or graphics processing techniques herein can improve resource or data utilization and/or resource efficiency. Additionally, aspects of the present disclosure can utilize jank reduction technology that can reduce the power consumption per frame and/or reduce the amount of potentially generated janks. Also, aspects of the present disclosure can improve the average frame response latency. The aforementioned techniques can result in janks predictions with increased accuracy and/or reduced power consumption.
In accordance with this disclosure, the term “or” may be interrupted as “and/or” where context does not dictate otherwise. Additionally, while phrases such as “one or more” or “at least one” or the like may have been used for some features disclosed herein but not others, the features for which such language was not used may be interpreted to have such a meaning implied where context does not dictate otherwise.
In one or more examples, the functions described herein may be implemented in hardware, software, firmware, or any combination thereof. For example, although the term “processing unit” has been used throughout this disclosure, such processing units may be implemented in hardware, software, firmware, or any combination thereof. If any function, processing unit, technique described herein, or other module is implemented in software, the function, processing unit, technique described herein, or other module may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media may include computer data storage media or communication media including any medium that facilitates transfer of a computer program from one place to another. In this manner, computer-readable media generally may correspond to (1) tangible computer-readable storage media, which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and/or data structures for implementation of the techniques described in this disclosure. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, . Disk and disc, as used herein, includes compact disc (CD) , laser disc, optical disc, digital versatile disc (DVD) , floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media. A computer program product may include a computer-readable medium.
The code may be executed by one or more processors, such as one or more digital signal processors (DSPs) , general purpose microprocessors, application specific integrated circuits (ASICs) , arithmetic logic units (ALUs) , field programmable logic arrays (FPGAs) , or other equivalent integrated or discrete logic circuitry. Accordingly, the term “processor, ” as used herein may refer to any of the foregoing structure or any other structure suitable for implementation of the techniques  described herein. Also, the techniques could be fully implemented in one or more circuits or logic elements.
The techniques of this disclosure may be implemented in a wide variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC) or a set of ICs, e.g., a chip set. Various components, modules or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily need realization by different hardware units. Rather, as described above, various units may be combined in any hardware unit or provided by a collection of interoperative hardware units, including one or more processors as described above, in conjunction with suitable software and/or firmware.
Various examples have been described. These and other examples are within the scope of the following claims.

Claims (30)

  1. A method of frame processing, comprising:
    determining a subsequent frame buffer offset duration when an available buffer value is greater than one, wherein the subsequent frame buffer offset duration is equal to a difference between a current frame vertical synchronization (VSYNC) offset duration and the product of a first VSYNC period and the available buffer value, wherein the first VSYNC period begins at a first VSYNC time and ends at a second VSYNC time;
    calculating a subsequent scale value based on the subsequent frame buffer offset duration and a current frame buffer offset duration, wherein the current frame buffer offset duration is equal to a difference between a current frame buffer time and a previous frame buffer time; and
    determining a new maximum frequency value when the available buffer value is greater than one, wherein the new maximum frequency value is based on a current maximum frequency value and the subsequent scale value.
  2. The method of claim 1, wherein the current frame VSYNC offset duration is equal to a difference between the first VSYNC time and the current frame buffer time.
  3. The method of claim 1, wherein the subsequent scale value is equal to the current frame buffer offset duration divided by the subsequent frame buffer offset duration.
  4. The method of claim 1, wherein the new maximum frequency value is equal to the product of the current maximum frequency value and the subsequent scale value.
  5. The method of claim 1, further comprising:
    updating a maximum central processing unit (CPU) frequency based on the new maximum frequency value.
  6. The method of claim 5, wherein updating the maximum CPU frequency further comprises:
    downscaling the maximum CPU frequency.
  7. The method of claim 5, further comprising:
    rendering a subsequent frame based on the updated maximum CPU frequency.
  8. The method of claim 1, further comprising:
    determining the current maximum frequency value based on a previous maximum frequency value and a current frame scale value.
  9. The method of claim 1, further comprising:
    sending a current frame to a buffer queue at the current frame buffer time, wherein the available buffer value is increased when the current frame is sent to the buffer queue.
  10. The method of claim 1, further comprising:
    consuming a previous frame at the first VSYNC time, wherein the available buffer value is decreased when the previous frame is consumed.
  11. The method of claim 10, wherein a surface flinger mechanism consumes the previous frame at the first VSYNC time.
  12. A method of frame processing, comprising:
    determining a subsequent frame buffer offset duration when a current frame headroom offset duration is decreasing, wherein the current frame headroom offset duration is equal to a difference between a second vertical synchronization (VSYNC) time and a current frame buffer time, wherein a first VSYNC period begins at a first VSYNC time and ends at the second VSYNC time;
    calculating a subsequent scale value based on the current frame headroom offset duration and a current frame buffer offset duration, wherein the current frame buffer offset duration is equal to a difference between the current frame buffer time and a previous frame buffer time; and
    determining a new minimum frequency value when the subsequent scale value is greater than one, wherein the new minimum frequency value is based on a current minimum frequency value and the subsequent scale value.
  13. The method of claim 12, wherein the subsequent frame buffer offset duration is equal to a difference between a current frame buffer time and a subsequent frame buffer time.
  14. The method of claim 12, wherein the subsequent scale value is equal to the current frame buffer offset duration divided by the sum of the current frame headroom offset duration and the first VSYNC period.
  15. The method of claim 12, wherein a current frame VSYNC offset duration is equal to a difference between the first VSYNC time and the current frame buffer time, wherein the subsequent scale value is equal to the current frame buffer offset duration divided by the difference between the current frame VSYNC offset duration and the first VSYNC period.
  16. The method of claim 12, wherein the new minimum frequency value is equal to the product of the current minimum frequency value and the subsequent scale value.
  17. The method of claim 12, further comprising:
    updating a minimum central processing unit (CPU) frequency based on the new minimum frequency value.
  18. The method of claim 17, wherein updating the minimum CPU frequency further comprises:
    upscaling the minimum CPU frequency.
  19. The method of claim 17, further comprising:
    rendering a subsequent frame based on the updated minimum CPU frequency.
  20. The method of claim 12, further comprising:
    determining the current minimum frequency value based on a previous minimum frequency value and a current frame scale value.
  21. The method of claim 12, further comprising:
    sending a current frame to a buffer queue at the current frame buffer time, wherein an available buffer value is increased when the current frame is sent to the buffer queue.
  22. The method of claim 12, further comprising:
    consuming a previous frame at the first VSYNC time, wherein an available buffer value is decreased when the previous frame is consumed.
  23. The method of claim 22, wherein a surface flinger mechanism consumes the previous frame at the first VSYNC time.
  24. An apparatus for frame processing, comprising:
    a memory; and
    at least one processor coupled to the memory and configured to:
    determine a subsequent frame buffer offset duration when an available buffer value is greater than one, wherein the subsequent frame buffer offset duration is equal to a difference between a current frame vertical synchronization (VSYNC) offset duration and the product of a first VSYNC period and the available buffer value, wherein the first VSYNC period begins at a first VSYNC time and ends at a second VSYNC time;
    calculate a subsequent scale value based on the subsequent frame buffer offset duration and a current frame buffer offset duration, wherein the current frame buffer offset duration is equal to a difference between a current frame buffer time and a previous frame buffer time; and
    determine a new maximum frequency value when the available buffer value is greater than one, wherein the new maximum frequency value is based on a current maximum frequency value and the subsequent scale value.
  25. The apparatus of claim 24, wherein the current frame VSYNC offset duration is equal to a difference between the first VSYNC time and the current frame buffer time, wherein the subsequent scale value is equal to the current frame buffer offset duration divided by the subsequent frame buffer offset duration, wherein the new maximum frequency value is equal to the product of the current maximum frequency value and the subsequent scale value.
  26. The apparatus of claim 24, wherein the at least one processor is further configured to:
    update a maximum central processing unit (CPU) frequency based on the new maximum frequency value.
  27. An apparatus for frame processing, comprising:
    a memory; and
    at least one processor coupled to the memory and configured to:
    determine a subsequent frame buffer offset duration when a current frame headroom offset duration is decreasing, wherein the current frame headroom offset duration is equal to a difference between a second vertical synchronization (VSYNC) time and a current frame buffer time, wherein a first VSYNC period begins at a first VSYNC time and ends at the second VSYNC time;
    calculate a subsequent scale value based on the current frame headroom offset duration and a current frame buffer offset duration, wherein the current frame buffer offset duration is equal to a difference between the current frame buffer time and a previous frame buffer time; and
    determine a new minimum frequency value when the subsequent scale value is greater than one, wherein the new minimum frequency value is based on a current minimum frequency value and the subsequent scale value.
  28. The apparatus of claim 27, wherein the subsequent frame buffer offset duration is equal to a difference between a current frame buffer time and a subsequent frame buffer time.
  29. The apparatus of claim 27, wherein the subsequent scale value is equal to the current frame buffer offset duration divided by the sum of the current frame headroom offset duration and the first VSYNC period, wherein a current frame VSYNC offset duration is equal to a difference between the first VSYNC time and the current frame buffer time, wherein the subsequent scale value is equal to the current frame buffer offset duration divided by the difference between the current frame VSYNC offset duration and the first VSYNC period, wherein the new minimum frequency value is equal to the product of the current minimum frequency value and the subsequent scale value.
  30. The apparatus of claim 27, wherein the at least one processor is further configured to:
    update a minimum central processing unit (CPU) frequency based on the new minimum frequency value.
PCT/CN2019/094234 2019-07-01 2019-07-01 Methods and apparatus for optimizing frame response WO2021000226A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/094234 WO2021000226A1 (en) 2019-07-01 2019-07-01 Methods and apparatus for optimizing frame response

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/094234 WO2021000226A1 (en) 2019-07-01 2019-07-01 Methods and apparatus for optimizing frame response

Publications (1)

Publication Number Publication Date
WO2021000226A1 true WO2021000226A1 (en) 2021-01-07

Family

ID=74100431

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/094234 WO2021000226A1 (en) 2019-07-01 2019-07-01 Methods and apparatus for optimizing frame response

Country Status (1)

Country Link
WO (1) WO2021000226A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6076171A (en) * 1997-03-28 2000-06-13 Mitsubishi Denki Kabushiki Kaisha Information processing apparatus with CPU-load-based clock frequency
US20160335737A1 (en) * 2015-05-14 2016-11-17 Qualcomm Innovation Center, Inc. Vsync aligned cpu frequency governor sampling
CN107924667A (en) * 2015-08-20 2018-04-17 高通股份有限公司 The refresh rate to match with predictive time shift compensation
US20180300838A1 (en) * 2017-04-13 2018-10-18 Microsoft Technology Licensing, Llc Intra-frame real-time frequency control
CN109219787A (en) * 2016-03-28 2019-01-15 高通股份有限公司 The dynamic scaling based on effect and stagnation circulation of processor frequencies and bus bandwidth
CN109800141A (en) * 2019-01-28 2019-05-24 Oppo广东移动通信有限公司 Determination method, apparatus, terminal and the storage medium of GPU performance bottleneck

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6076171A (en) * 1997-03-28 2000-06-13 Mitsubishi Denki Kabushiki Kaisha Information processing apparatus with CPU-load-based clock frequency
US20160335737A1 (en) * 2015-05-14 2016-11-17 Qualcomm Innovation Center, Inc. Vsync aligned cpu frequency governor sampling
CN107924667A (en) * 2015-08-20 2018-04-17 高通股份有限公司 The refresh rate to match with predictive time shift compensation
CN109219787A (en) * 2016-03-28 2019-01-15 高通股份有限公司 The dynamic scaling based on effect and stagnation circulation of processor frequencies and bus bandwidth
US20180300838A1 (en) * 2017-04-13 2018-10-18 Microsoft Technology Licensing, Llc Intra-frame real-time frequency control
CN109800141A (en) * 2019-01-28 2019-05-24 Oppo广东移动通信有限公司 Determination method, apparatus, terminal and the storage medium of GPU performance bottleneck

Similar Documents

Publication Publication Date Title
US9817431B2 (en) Frame based clock rate adjustment for processing unit
WO2021000220A1 (en) Methods and apparatus for dynamic jank reduction
WO2022073182A1 (en) Methods and apparatus for display panel fps switching
US11625806B2 (en) Methods and apparatus for standardized APIs for split rendering
WO2021151228A1 (en) Methods and apparatus for adaptive frame headroom
EP3991131A1 (en) Methods and apparatus for wave slot management
US20200311859A1 (en) Methods and apparatus for improving gpu pipeline utilization
US20210358079A1 (en) Methods and apparatus for adaptive rendering
WO2021096883A1 (en) Methods and apparatus for adaptive display frame scheduling
WO2021000226A1 (en) Methods and apparatus for optimizing frame response
WO2021196175A1 (en) Methods and apparatus for clock frequency adjustment based on frame latency
WO2021232328A1 (en) Methods and apparatus for tickless pre-rendering
WO2021056364A1 (en) Methods and apparatus to facilitate frame per second rate switching via touch event signals
US11238772B2 (en) Methods and apparatus for compositor learning models
US20220284536A1 (en) Methods and apparatus for incremental resource allocation for jank free composition convergence
US20220013087A1 (en) Methods and apparatus for display processor enhancement
US11151965B2 (en) Methods and apparatus for refreshing multiple displays
US20230368325A1 (en) Technique to optimize power and performance of xr workload
WO2023230744A1 (en) Display driver thread run-time scheduling
WO2024020825A1 (en) Block searching procedure for motion estimation
US11893654B2 (en) Optimization of depth and shadow pass rendering in tile based architectures
US20230196498A1 (en) Scheduling techniques in split rendering
WO2021042331A1 (en) Methods and apparatus for graphics and display pipeline management
WO2021142780A1 (en) Methods and apparatus for reducing frame latency
US11087431B2 (en) Methods and apparatus for reducing draw command information

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19936111

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19936111

Country of ref document: EP

Kind code of ref document: A1