WO2021248370A1 - Methods and apparatus for reducing frame drop via adaptive scheduling - Google Patents
Methods and apparatus for reducing frame drop via adaptive scheduling Download PDFInfo
- Publication number
- WO2021248370A1 WO2021248370A1 PCT/CN2020/095393 CN2020095393W WO2021248370A1 WO 2021248370 A1 WO2021248370 A1 WO 2021248370A1 CN 2020095393 W CN2020095393 W CN 2020095393W WO 2021248370 A1 WO2021248370 A1 WO 2021248370A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- display
- frequency
- frame
- thread
- compositing
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/001—Arbitration of resources in a display system, e.g. control of access to frame buffer by video controller and/or main processor
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/36—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
- G09G5/363—Graphics controllers
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G5/00—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
- G09G5/36—Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
- G09G5/39—Control of the bit-mapped memory
- G09G5/395—Arrangements specially adapted for transferring the contents of the bit-mapped memory to the screen
- G09G5/397—Arrangements specially adapted for transferring the contents of two or more bit-mapped memories to the screen simultaneously, e.g. for mixing or overlay
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2340/00—Aspects of display data processing
- G09G2340/10—Mixing of images, i.e. displayed pixel being the result of an operation, e.g. adding, on the corresponding input pixels
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2340/00—Aspects of display data processing
- G09G2340/12—Overlay of images, i.e. displayed pixel being the result of switching between the corresponding input pixels
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/06—Use of more than one graphics processor to process data before displaying to one or more screens
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G2360/00—Aspects of the architecture of display systems
- G09G2360/08—Power processing, i.e. workload management for processors involved in display operations, such as CPUs or GPUs
Definitions
- the present disclosure relates generally to processing systems and, more particularly, to one or more techniques for display or graphics processing.
- GPUs graphics processing unit
- 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.
- An application processor or 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 user’s experience on a computing device can be affected by how smoothly the user interface (UI) animation runs on the device for any particular application.
- UI user interface
- an application may generate a frame compositing instruction to facilitate compositing a frame for display.
- a frame latency associated with when the frame compositing instruction is generated and when the corresponding composited frame is presented. Accordingly, there has developed an increased need for reducing frame latency for presenting graphical content on displays.
- the apparatus may be an application processor, a CPU, a graphics processor, a graphics processing unit (GPU) , a display processor, a display processing unit (DPU) , or a video processor.
- the apparatus can calculate a delta based on a compositing period associated with compositing a frame and a frame rate window associated with a display.
- the apparatus can also determine to perform a latency reducing mechanism that comprises synchronized scheduling based on the calculated delta. Additionally, the apparatus can perform the determined latency reducing mechanism to facilitate displaying the frame.
- the apparatus can calculate the delta by determining the compositing period based on a difference between a start time associated with performing compositing of the frame and a stop time associated with completing the compositing of the frame.
- the apparatus can also determine a difference between the compositing period and the frame rate window.
- the apparatus can determine to perform the latency reducing mechanism when the calculated delta is a positive value and satisfies a latency threshold.
- the apparatus can perform the latency reducing mechanism that comprises synchronized scheduling by scheduling a first display-related thread and a second display-related thread of a plurality of display-related threads associated with displaying the frame to a same processing core, and where the second display-related thread is performed after the first display-related thread.
- the processing core may be configured to operate in an active state after the performing of the first display-related thread is complete and before the performing of the second display-related thread.
- operating in the active state after the performing of the first display-related thread is complete and before the performing of the second display-related thread may facilitate reducing a transitioning duration associated with the performing of the second display-related thread, where the transitioning duration may correspond to an interval between when the performing of the second display-related thread is triggered and when the performing of the second display-related thread is started.
- the apparatus may further be configured to determine to perform a frequency increasing mechanism when the calculated delta is a positive value and satisfies a frequency threshold.
- the performing of the frequency increasing mechanism may include estimating a cumulative running duration for performing a plurality of display- related threads associated with displaying the frame at a frequency associated with a first frequency level.
- the performing of the frequency increasing mechanism may also include estimating a duration savings for performing the plurality of display-related threads at a second frequency level that is faster than the first frequency level.
- the performing of the frequency increasing mechanism may include setting one or more processing cores to operate at a frequency associated with the second frequency level when the estimated duration savings is greater than the calculated delta.
- the apparatus may estimate the duration savings based on the estimated cumulative running duration and a ratio of the frequency associated with the first frequency level and the frequency associated with the second frequency level.
- the one or more processing cores scheduled to perform the plurality of display-related threads may be associated with a first tier of processing cores capable of operating at a first set of frequency levels.
- the performing of the frequency increasing mechanism may include determining that the calculated delta is greater than respective estimated duration savings for performing the plurality of display-related threads at each frequency level of the first set of frequency levels.
- the performing of the frequency increasing mechanism may also include scheduling the plurality of display-related threads to a second tier of processing cores capable of operating at a second set of frequency levels based on the determining, where the first tier of processing cores are associated with a lower processing capability than the second tier of processing cores. Additionally, the performing of the frequency increasing mechanism may include selecting a frequency level of the second set of frequency levels for the second tier of processing cores.
- the apparatus may comprise a wireless communication device.
- FIG. 1 is an example display pipeline for displaying a frame, in accordance with one or more techniques of this disclosure.
- FIG. 2 is an example timing diagram depicting active periods for a device operating on a frame in a display pipeline, in accordance with one or more techniques of this disclosure.
- FIG. 3 is a block diagram that illustrates an example device, in accordance with one or more techniques of this disclosure.
- FIG. 4 is another example timing diagram depicting active periods for a device operating on a frame in a display pipeline, in accordance with one or more techniques of this disclosure.
- FIG. 5 illustrates an example flowchart of an example method implemented by the device of FIG. 3, in accordance with one or more techniques of this disclosure.
- FIG. 6 is a block diagram that illustrates an example content generation system, in accordance with one or more techniques of this disclosure.
- example techniques disclosed herein facilitate improving user interface (UI) performance by reducing stuttering or skipped/dropped frames in displaying of frames.
- disclosed techniques employ adaptive scheduling to reduce the delay of performing display-related threads during performing of a display pipeline.
- disclosed techniques employ adaptive scheduling to reduce the duration of performing display-related threads during performing of the display pipeline.
- a thread may include one or more tasks to be processed by a processing core.
- a thread may refer to an instance of one or more tasks that is executed by a processing core.
- a processing core may be operating in an active state or a sleep state.
- a processing core operating in the active state may refer to instances during which the processing core is executing a display-related thread (e.g., performing the one or more tasks associated with the display-related thread) .
- a processing core operating in the sleep state may refer to instances during which the processing core is idle (e.g., is not executing a display-related thread and is not scheduled to perform a task) .
- a processing core may be scheduled to execute a thread but may not yet be executing the thread.
- a processing core operating in the sleep state may be scheduled to execute a thread, but first transitions from the sleep state to the active state before being able to execute the thread.
- the delay incurred by the processing core when switching from the sleep state to the active state may be referred to as an “exit latency. ”
- different display-related threads may be scheduled with different processing cores.
- transitioning each of the processing cores from the sleep state to the active state may incur a cumulative latency. For example, if four display-related threads are scheduled for execution at four different processing cores, each with a 0.600 millisecond (ms) exit latency, then the cumulative latency associated with performing the four display-related threads may be 2.4ms.
- Example techniques disclosed herein facilitate reducing the compositing period (e.g., the duration between when a composition coordinating thread is triggered and when the performing of the composition coordinating thread is complete) associated with a display pipeline using adaptive scheduling.
- disclosed techniques may employ latency reducing mechanisms to reduce the cumulative latency associated with transitioning durations of one or more display-related threads of a display pipeline.
- disclosed techniques may employ frequency increasing mechanisms to reduce running durations of one or more of the display-related threads of the display pipeline. Such techniques may reduce frame drops and/or conserve power and, thus, improve user experience.
- 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.
- 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) ,
- 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.
- one or more techniques may refer to an application, i.e., software, being configured to perform one or more functions.
- 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.
- 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.
- 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.
- components are identified in this disclosure.
- the components may be hardware, software, or a combination thereof.
- the components may be separate components or sub-components of a single component.
- 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.
- 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.
- RAM random access memory
- ROM read-only memory
- EEPROM electrically erasable programmable ROM
- optical disk storage magnetic 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.
- examples disclosed herein provide techniques for adaptive scheduling of display-related threads associated with performing a display pipeline.
- Example techniques may improve user experience associated with a device utilizing a display pipeline, conserve power consumption at the device, and/or reduce the load of a processing unit (e.g., any processing unit configured to perform one or more techniques disclosed herein, such as an application processor, a CPU, a GPU, a DPU, and the like) .
- a processing unit e.g., any processing unit configured to perform one or more techniques disclosed herein, such as an application processor, a CPU, a GPU, a DPU, and the like.
- this disclosure describes techniques for reducing the delay of display-related threads and reducing frame drop in any device that utilizes a display pipeline.
- Other example benefits are described throughout this disclosure.
- 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.
- the term “graphical content” may refer to content produced by one or more processes of a graphics processing pipeline.
- the term “graphical content” may refer to content produced by a processing unit configured to perform graphics processing.
- the term “graphical content” may refer to content produced by a graphics processing unit.
- the term “display content” may refer to content generated by a processing unit configured to perform display processing.
- the term “display content” may refer to content generated by a display processing unit.
- Graphical content may be processed to become display content.
- 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.
- a display processing unit may be configured to perform composition on one or more layers to generate a frame.
- 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.
- a frame may refer to a layer.
- a frame may refer to two or more layers that have already been blended together to form the frame (e.g., the frame includes two or more layers, and the frame that includes two or more layers may subsequently be blended) .
- the term “render” may refer to 3D rendering and/or 2D rendering.
- the graphics processor may utilize OpenGL instructions to render 3D graphics surfaces, or may utilize OpenVG instructions to render 2D graphics surfaces.
- any standards, methods, or techniques for rendering graphics may be utilized by the graphics processor.
- FIG. 1 depicts an example display pipeline 100 to facilitate compositing a frame and for presentment of the composited frame, in accordance with one or more aspects disclosed herein.
- one or more applications 110 such as a game
- executing via an apparatus may generate a compositing instruction to facilitate compositing a frame.
- a first stage of the display pipeline 100 may include an application rendering stage to process an application rendering workload based on the compositing instruction.
- a processing unit or a component (s) of the processing unit
- the application rendering workload may be split between an application processor (e.g., a CPU) and a graphics processor (e.g., a GPU 120) .
- the application processor and the graphics processor e.g., the GPU 120
- the example display pipeline 100 may also include a second stage during which composition on the surfaces into a composited frame may be performed.
- a composition coordinator 140 may receive the surfaces stored in the surface buffers 130 and prepare the surfaces for compositing.
- the composition coordinator 140 may use configurations for each of the surfaces (e.g., a geometry, buffer status, etc. ) to determine which surfaces are ready for processing, take ownership of a buffer before starting compositing, etc.
- An example hardware (HW) composer 150 may use the surfaces prepared for compositing (e.g., by the composition coordinator 140) to perform compositing and generate a composited frame.
- the HW composer 150 may provide the composited frame to a display driver 160 to facilitate the presentment of the composited frame.
- the display driver 160 may process the composited frame into a format for a display 170 to present.
- the example display pipeline 100 may also include a third stage during which presentment of the composited frame may be performed.
- the display 170 may receive the formatted composited frame from the display driver 160 and present the composited frame.
- examples disclosed herein are directed to techniques for improving performance during the second stage of the display pipeline 100 of FIG. 1.
- disclosed techniques facilitate reducing (and/or eliminating) latency associated with processing core (s) that perform tasks related to the composition of surfaces into a composited frame, such as the one or more tasks performed by the composition coordinator 140 and/or the HW composer 150.
- FIG. 2 illustrates an example timing diagram 200 depicting active periods for a device operating on a frame in a display pipeline, such as the example display pipeline 100 of FIG. 1.
- the timing diagram 200 includes a plurality of display-related threads associated with a second stage of a display pipeline to facilitate the compositing and the presentment (or display) of a frame.
- the display pipeline includes a frame presentation starting thread 210, a composition signal processing thread 220, a composition coordinating thread 230, a HW composer thread 240, and a display driver thread 250.
- the performing of the frame presentation starting thread 210, the composition signal processing thread 220, and the composition coordinating thread 230 may be performed by the composition coordinator 140 of FIG. 1.
- the performing of the HW composer thread 240 may be performed by the HW composer 150 of FIG. 1.
- the performing of the display driver thread 250 may be performed by the display driver 160 of FIG. 1.
- the frame presentation starting thread 210 may be associated with monitoring for an output (e.g., a “displaySync” signal) generated by a display (e.g., the display 170 of FIG. 1) that instructs aspects of the display pipeline that a frame is being displayed.
- an application such as the example application 110 of FIG. 1, may wait to receive the displaySync signal to begin generating a surface.
- the composition coordinator 140 may wait to receive the displaySync signal during the frame presentation starting thread 210 to begin coordinating the compositing of surfaces.
- the performing of the frame presentation starting thread 210 may be associated with a duration 214.
- Vsync pulses may facilitate synchronizing certain events to the refresh rate of a display.
- the Vsync pulses may be associated with a periodicity based on the refresh rate of the display. For example, a display with a 60 hertz (Hz) refresh rate may have a Vsync pulse period of 16.67 milliseconds (ms) (e.g., 1/60ms) . That is, a duration between a first Vsync pulse and a second Vsync pulse may be 16.67ms.
- ms milliseconds
- a duration between a first Vsync pulse and a second Vsync pulse may be 16.67ms.
- the executing of the display pipeline for a frame is completed within the Vsync pulse period (sometimes referred to as a “frame rate window” ) , the frame is properly displayed.
- different display refresh rates may be associated with different Vsync pulse periods.
- a display with a 90Hz refresh rate may have a Vsync pulse period of 11.11ms (e.g., 1/90ms) .
- the composition signal processing thread 220 may be triggered by the detection of the displaySync signal during the frame presentation starting thread 210.
- the composition signal processing thread 220 may be associated with performing one or more tasks associated with compositing-related events.
- the compositing-related events may include determining a frame rate window of the display 170.
- the compositing-related events may include converting and/or modulating the displaySync signal into a format for processing by the composition coordinator 140.
- the performing of the composition signal processing thread 220 may be associated with a duration 224.
- the one or more tasks associated with the composition coordinating thread 230 include a first set of tasks and a second set of tasks.
- the first set of tasks may be associated with the preparing of the one or more surfaces on which compositing is to be performed.
- the preparing of the one or more surfaces may include preparing the surfaces based on geometry information and preparing a common format to send to the HW composer 150 for performing the compositing.
- the performing of the first set of tasks may be triggered at the completion of the composition signal processing thread 220.
- the performing of the first set of tasks of the composition coordinating thread 230 may be associated with a duration 234.
- the second set of tasks may be associated with the completing of the compositing of the frame.
- the completing of the compositing of the frame may include buffer management tasks, such as releasing a surface buffer and/or re-assigning a surface buffer to another owner.
- the performing of the second set of tasks may be triggered at the completion of the HW composer thread 240 and after the display driver thread 250 is scheduled. As shown in FIG. 2, the performing for the second set of tasks of the composition coordinating thread 230 may be associated with a duration 236.
- the HW composer thread 240 may be triggered by the completion of the first set of tasks of the composition coordinating thread 230.
- the HW composer thread 240 may be associated with performing one or more tasks associated with the compositing to generate the composited frame.
- the HW composer thread 240 may include one or more tasks, such as determining whether the HW composer 150 of FIG. 1 is capable of performing the compositing, sending a confirmation or negative acknowledgement to the composition coordinator 140 regarding the compositing, translating the surfaces into a format to begin performing compositing, and/or performing the compositing of the different surfaces.
- the performing for the HW composer thread 240 may be associated with a duration 244.
- the display driver thread 250 may be triggered by the completion of the HW composer thread 240.
- the display driver thread 250 may be associated with performing one or more tasks associated with the displaying of the composited frame.
- the display driver thread 250 may include one or more tasks that, when executed, prepare the display 170 for presentment of a frame.
- the performing for the display driver thread 250 may be associated with a duration 254.
- each of the display-related threads 210, 220, 230, 240, 250 may be performed by a different processing core of a processing unit. However, in other examples, one or more of the display-related threads 210, 220, 230, 240, 250 may be performed by a same processing core.
- the respective processing core when a processing core is not scheduled to perform a thread (e.g., a display-related thread) , the respective processing core may be configured to operate in a sleep state to conserve power (e.g., may operate in a low power mode) .
- the processing unit transitions from the sleep state to the awake state prior to performing the scheduled thread.
- the delay incurred by the processing core when switching from the sleep state to the active state may be referred to as an “exit latency. ”
- the sleep state may include different degrees of sleep. For example, a wait for interrupt (WFI) sleep state may suspend operation until a triggering event is detected.
- a power collapse (PC) sleep state may provide a relatively deeper sleep than the WFI steep state and may allow the processing core to power down.
- a PC-Rail sleep state may provide a relatively deeper sleep than the PC sleep state and may allow the processing core to transition to a power rail off state. It may be appreciated that deeper sleep states may provide relatively more power savings, but may be associated with a longer exit latency.
- a processing core transitioning from the WFI sleep state to the active state may incur a 0.100ms exit latency
- a processing core transitioning from the PC sleep state to the active state may incur a 0.600ms exit latency
- a processing core transitioning from the PC-Rail sleep state to the active state may incur a 0.800ms exit latency.
- a processing core when a processing core is described as operating in the sleep state, it may be appreciated that the processing core is operating in the PC sleep state.
- an exit latency associated with transitioning the processing core from a sleep state to an active (or running) state. That is, when a processing core is operating in a sleep state and a thread is scheduled for execution by the processing core, the processing core first transitions from the sleep state to the active state before the processing core is able to execute the schedule thread, which results in an exit latency.
- different display-related threads may be scheduled with different processing cores. In some such examples, transitioning each of the processing cores from the sleep state to the active state may incur a cumulative latency.
- the cumulative latency may be 2.4ms (e.g., 0.600 exit latency associated with each of the four processing cores) .
- the performing of the frame presentation starting thread 210 is associated with a total duration 214 that includes a transitioning duration 214a and a running duration 214b for performing the one or more tasks associated with the frame presentation starting thread 210.
- a total duration 214 that includes a transitioning duration 214a and a running duration 214b for performing the one or more tasks associated with the frame presentation starting thread 210.
- the composition signal processing thread 220 is associated with a total duration 224 including a transitioning duration 224a and a running duration 224b
- the first set of tasks of the composition coordinating thread 230 are associated with a total duration 234 including a transitioning duration 234a and a running duration 234b
- the second set of tasks of the composition coordinating thread 230 are associated with a total duration 236 including a transitioning duration 236a and a running duration 236b
- the HW composer thread 240 is associated with a total duration 244 including a transitioning duration 244a and a running duration 244b
- the display driver thread 250 is associated with a total duration 254 including a transitioning duration 254a and a running duration 254b.
- the performing of each of the display-related threads 210, 220, 230, 240, 250 may also include a sleep duration during which the respective processing core transitions from the active state to the sleep state.
- the example transitioning duration 244a represents the exit latency and corresponds to an amount of time taken by the respective processing core to transition from the sleep state to the active state.
- the transitioning duration 244a may start when the respective processing core is scheduled to perform the HW composer thread 240 and may end when the processing core has transitioned to operating in the active state.
- the transitioning duration 244a may vary based on the sleep state that the processing core is operating at when the respective thread is scheduled.
- the example running duration 244b corresponds to an amount of time taken by the respective processing core to perform the one or more tasks associated with the HW composer thread 240.
- the running duration 244b may vary based on the frequency at which the processing cores of the device are operating.
- the processing cores may be capable of operating at different frequencies of a set of frequency levels, such as 600MHz, 900MHz, 1200MHz, 1400MHz, and 1800MHz.
- a frequency governor may monitor the operating load of the processing cores and adjust the frequency level for the processing cores based on the operating load. For example, when the operating load of the processing cores satisfies an upper threshold (e.g., is greater than or equal to 90%) , the frequency governor may determine to increase the frequency of the processing cores to a higher frequency level (e.g., from the 900MHz frequency level to the 1200MHz frequency level) .
- an upper threshold e.g., is greater than or equal to 90%
- the frequency governor may determine to decrease the frequency of the processing cores to a lower frequency level (e.g., from the 900MHz frequency level to the 600MHz frequency level) .
- the frequency governor may be configured to increase or decrease the frequency of the processing cores based on the result of sampling the operating load (e.g., increase the frequency to a higher frequency level when the operating load satisfies the upper threshold and decrease the frequency to a lower frequency level when the operating load satisfies the lower threshold) .
- the frequency governor may be configured to increase the frequency of the processing cores to a higher frequency level when the operating load satisfies the upper threshold and utilize a decay timer to determine whether to adjust the frequency of the processing cores when the operating load satisfies the lower threshold.
- the frequency governor may sample the operating load and initiate the decay timer in response to determining that the sampled operating load satisfies the lower threshold. The frequency governor may then re-sample the operating load when the decay timer expires and determine to adjust the frequency of the processing cores based on the result of re-sampling the operating load (e.g., decrease the frequency to a lower frequency level when the operating load satisfies the lower threshold and maintain the frequency when the operating load does not satisfy the lower threshold) .
- a frame may be successfully displayed with the display pipeline is completed within the frame rate window (e.g., in less than 16.67ms for a display with a 60Hz refresh rate) , and the frame may be dropped when the display pipeline does not complete within the frame rate window.
- a first time T1 indicates a start time of when frame compositing begins (e.g., when a displaySync signal is detected during the performing of the frame presentation starting thread 210) .
- a second time T2 indicates a stop time of when frame compositing is complete (e.g., when the processing core completes the performing of the second set of tasks associated with the composition coordinating thread 230) .
- a third time T3 represents when a frame is committed to a display driver (e.g., the display driver 160 of FIG. 1) to facilitate the presentment of the composited frame.
- the current frame when the duration between the third time T3 and the first time T1 is less than the frame rate window (e.g., less than 16.67ms) , the current frame may be successfully presented. However, when the duration between the third time T3 and the first time T1 is greater than the frame rate window (e.g., greater than 16.67ms) , the current frame may be dropped.
- the frame rate window e.g., greater than 16.67ms
- the frame when the duration between the second time T2 and the first time T1 (e.g., a “compositing period” ) is less than the frame rate window (e.g., less than 16.67ms) , the frame may be successfully presented. However, when the duration of the compositing period is greater than the frame rate window (e.g., greater than 16.67ms) , start of the composition coordinating thread associated with a subsequent frame may be delayed, which may result in the dropping of the subsequent frame.
- the duration of the compositing period is greater than the frame rate window (e.g., greater than 16.67ms)
- start of the composition coordinating thread associated with a subsequent frame may be delayed, which may result in the dropping of the subsequent frame.
- whether the display pipeline for compositing and displaying a frame may be completed in time to not drop a frame may depend on the total durations associated with the performing of each respective thread. That is, the occurrence of each exit latency may increase the cumulative latency associated with performing the display-related threads 210, 220, 230, 240, 250 of the display pipeline. Similarly, the occurrence of long running durations for performing the one or more tasks associated with each of the display-related threads 210, 220, 230, 240, 250 of the display pipeline may additionally or alternatively increase the likelihood that a frame (e.g., a current frame and/or a subsequent frame) is dropped due to a cumulative duration that is greater than the frame rate window.
- a frame e.g., a current frame and/or a subsequent frame
- removing low power mode for the processing cores may not be acceptable in some instances.
- the respective processing core may also be operating in an active state (even when the processing core is not executing a thread) , resulting in an increase in power consumption associated with the processing core while idle.
- operating at a higher frequency may enable the processing core to reduce the transitioning duration 244b associated with the performing of the one or more tasks associated with the HW composer thread 240, but may also increase power consumption associated with the processing core due to operating at the higher frequency.
- example techniques disclosed herein facilitate reducing the compositing period (e.g., the duration between the second time T2 and the first time T1) associated with the display pipeline using adaptive scheduling.
- disclosed techniques may employ latency reducing mechanisms to reduce the cumulative latency associated with the transitioning durations of one or more of the display-related threads 210, 220, 230, 240, 250 of the display pipeline.
- disclosed techniques may employ frequency increasing mechanisms to reduce the running durations of one or more of the display-related threads 210, 220, 230, 240, 250 of the display pipeline.
- FIG. 3 is a block diagram illustrating components of an example device 300, in accordance with aspects of this disclosure.
- the device 300 may comprise a wireless communication device.
- the device 300 includes an application processor 302, a memory 370, a graphics processor 380, and a display 390.
- the application processor 302, the memory 370, the graphics processor 380, and the display 390 may be in communication via one or more buses that may be implemented using any combination of bus structures and/or bus protocols.
- the application processor 302 may include one or more processors that are configured to execute a composition coordinator 310, a thread scheduler 320, a frequency governor 330, and a plurality of processing cores 340. In some examples, the application processor 302 may be configured to execute instructions that cause the application processor 302 to perform one or more of the example techniques disclosed herein.
- the memory 370 may store one or more commands and/or composited frames. In some examples, the memory 370 may also store instructions that, when executed, cause the application processor 302, the graphics processor 380, and/or the display 390 to perform one or more of the example techniques disclosed herein.
- the graphics processor 380 may include one or more processors that are configured to render and/or composite a frame.
- the graphics processor 380 may be configured to execute one or more compositing commands to render a frame.
- the graphics processor 380 may be configured to execute instructions that cause the graphics processor 380 to perform one or more of the example techniques disclosed herein.
- the display 390 may include a display panel, a display client, and/or a screen to facilitate presentment of a composited frame.
- the display 390 may be configured to execute instructions that cause the display 390 to perform one or more example techniques disclosed herein.
- the composition coordinator 310 may be configured to receive a compositing instruction and determine the one or more display-related threads to perform to facilitate executing the compositing instruction.
- the composition coordinator 310 may receive a compositing instruction associated with a surface and determine to perform the frame presentation starting thread 210, the composition signal processing thread 220, the composition coordinating thread 230, the HW composer thread 240, and/or the display driver thread 250 to facilitate the executing of the compositing instruction to present the frame (e.g., via the display 390) .
- a composition coordinator (sometimes referred to as a “compositing engine, ” “composition engine, ” “compositing hardware, ” or “composition hardware” ) refers to an analogue or digital circuit that programs display hardware to display composited frame data or animation data to a display (e.g., the display 390) .
- the composition coordinator may include an input for the composited data and an output for the data and/or instructions to the display hardware (e.g., the display 390) .
- the composition coordinator may reside in hardware or may be implemented in software running on the application processor 302.
- a “Surface Flinger” (sometimes referred to as a “Surface Flinger component” or a “Surface Flinger engine” ) can refer to the composition coordinator as software running at a user-space level in a CPU (e.g., the application processor 302) in the ANDROID TM operating system.
- the Surface Flinger may additionally or alternatively reside at a kernel level of a CPU (e.g., the application processor 302) .
- composition functionality and/or programming of the display hardware may be distributed between two or more of hardware components, software components, and/or firmware components.
- the thread scheduler 320 may be configured to control how threads are executed by the processing cores 340.
- the thread scheduler 320 may be configured to receive thread information (e.g., from the composition coordinator 310) indicative of one or more tasks to be performed, determine a thread configuration for processing the one or more tasks, and cause the processing core (s) 340 to execute one or more threads based on the thread configuration.
- the thread scheduler 320 may distribute the one or more threads across the processing cores 340 based on availability of respective ones of the processing cores 340 to perform the threads.
- the thread scheduler 320 may be configured to distribute different threads to different processing cores.
- the thread scheduler 320 may distribute (or schedule) the frame presentation starting thread 210 to a first processing core of the processing cores 340 (e.g., a processor core 340 (1) ) , may distribute the composition signal processing thread 220 to a second processing core of the processing cores 340 (e.g., a processor core 340 (2) ) , may distribute the composition coordinating thread 230 to a third processing core of the processing cores 340 (e.g., a processing core 340 (3) ) , may distribute the HW composer thread 240 to a fourth processing core of the processing cores 340 (e.g., a processing core 340 (4) ) , and may distribute the display driver thread 250 to a fifth processing core of the processing cores 340 (e.g., a processing core 340 (5) ) .
- a first processing core of the processing cores 340 e.g., a processor core 340 (1)
- the composition signal processing thread 220 e.g., a processor core 340
- the frequency governor 330 may be configured to control the frequency at which the processing cores 340 are operating. In some examples, the frequency governor 330 may monitor the operating load of the processing cores 340 and adjust the frequency level for the processing cores 340 based on the operating load. For example, when the operating load of the processing cores 340 satisfies an upper threshold (e.g., is greater than or equal to 90%) , the frequency governor 330 may determine to increase the frequency of the processing cores 340 to a higher frequency level (e.g., from a 900MHz frequency level to a 1200MHz frequency level) .
- an upper threshold e.g., is greater than or equal to 90%
- the frequency governor 330 may determine to decrease the frequency of the processing cores 340 to a lower frequency level (e.g., from a 900MHz frequency level to a 600MHz frequency level) .
- the processing cores 340 are configured to execute one or more threads, such as the display-related threads 210, 220, 230, 240, 250 of the display pipeline of FIG. 2.
- the processing cores 340 may include one or more processing cores that may each be a programmable processing core or a fixed-function processing core.
- a programmable processing core may include a programmable processor that is configured to execute one or more threads that are downloaded onto the programmable processing core.
- a fixed-function processing core may include hardware that is hard-wired to perform certain functions.
- the fixed-function processing cores may additionally or alternatively include freely programmable thread-controlled pipelines that enable the fixed-function processing core to perform some configurable functions.
- the fixed-function processing cores may be configurable to perform different functions (e.g., via one or more control signals)
- the fixed-function hardware may not include a program memory that is capable of receiving user-compiled programs (e.g., from the application processor 302) .
- the processing cores 340 include first tier processing cores 340a and second tier processing cores 340b.
- the processing cores of the first tier processing cores 340a may be associated with a relatively lower processing capacity than the processing cores of the second tier processing cores 340b.
- the processing cores of the first tier processing cores 340a may also be associated with relatively lower power consumption than the processing cores of the second tier processing cores 340b.
- the processing cores of the first tier processing cores 340a and the second tier processing cores 340b may be configured to operate at different frequency levels.
- the first tier processing cores 340a may be configured to operate at one of a first set of frequency levels and the second tier processing cores 340b may be configured to operate at one of a second set of frequency levels.
- the first set of frequency levels may include five different frequency levels (e.g., 600MHz, 900MHz, 1200MHz, 1400MHz, and 1800MHz) and the second set of frequency levels may include four different frequency levels (e.g., 800MHz, 100MHz, 1600MHz, and 2400MHz) .
- other examples may include additional or alternative frequency levels for each set of frequency levels.
- the processing cores 340 may include any suitable quantity and/or distribution of tiers.
- the processing cores 340 may include one tier of processing cores, may include two tiers of processing cores, may include three tiers of processing cores, etc.
- the quantity of processing cores included in each tier may be evenly distributed and/or may vary based on the tier.
- the quantity of first tier processing cores 340a may be the same as the quantity of second tier processing cores 340b, may be greater than the quantity of second tier processing cores 340b, or may be less than the quantity of second tier processing cores 340b.
- additional or alternative examples may include other quantities of frequency levels associated with the first tier processing cores 340a and the second tier processing cores 340b.
- the graphics processor 380 may be configured to perform one or more graphics processor compositing tasks.
- the graphics processor 380 may be configured to execute compositing commands stored in the memory 370 and composite a frame.
- one or more aspects of the graphics processor compositing tasks may be implemented via a graphics processing pipeline.
- the graphics processor 380 may store the output of the graphics processor compositing tasks at the memory 370.
- the display 390 may be configured to perform one or more display tasks.
- the display 390 may be configured to display a frame.
- the display 390 may be configured to receive information from the composition coordinator 310 that identifies a frame buffer (and/or a location of the composited frame buffer corresponding to the composited frame) .
- the display 390 may be configured to monitor for an indication that the compositing of the frame is complete and that the composited frame is available at the identified composited frame buffer for presentment.
- the display 390 may monitor for an indication that the performing of the one or more tasks associated with the display driver thread 250 of FIG. 2 is completed.
- the display 390 may be configured to display the corresponding frame. For example, the display 390 may access the frame at a composited frame buffer of the memory 370 for presentment.
- the display 390 may generate a Vsync pulse.
- the Vsync pulse may indicate, for example, that the buffer corresponding to the frame is available.
- a frame may be associated with a corresponding buffer.
- the performing of the one or more tasks associated with the composition signal processing thread 220 may include designating a composited frame buffer for storing the composited frame.
- the graphics processor 380 and/or the performing of the one or more tasks associated with the HW composer thread 240 may store the composited frame in the designated composited frame buffer.
- the composition coordinator 310 may provide information to the display 390 that identifies the designated composited frame buffer of the memory 370.
- the display 390 may monitor for an indication that the designated composited frame buffer is available for presentment. In some such examples, generating the Vsync pulse after the presentment of the frame enables the composition coordinator 310 to determine that the designated composited frame buffer may be designated for storing a subsequent frame.
- the generating of the Vsync pulse may be a periodic occurrence, may be an a-periodic occurrence, may be a one-time occurrence, and/or may be an event-based occurrence.
- the occurrences of the Vsync pulses may be associated with a periodicity based on the refresh rate of the display 390.
- a display with a 60 Hz refresh rate may have a Vsync pulse period (or frame rate window) of 16.67ms (e.g., 1/60ms) . That is, a duration between a first Vsync pulse and a second Vsync pulse may be 16.67ms.
- the composition coordinator 310 may receive a compositing instruction and generate information associated with performing one or more tasks related to display-related threads for executing the compositing instruction.
- the thread scheduler 320 may be configured to receive the information associated with the one or more tasks, determine thread configurations for processing the one or more tasks, and distribute threads based on the thread configurations to the processing cores 340.
- the thread scheduler 320 may be configured to distribute the display-related threads 210, 220, 230, 240, 250 across different ones of the processing cores 340.
- the thread scheduler 320 may be configured to distribute the display-related threads 210, 220, 230, 240, 250 to the first tier processing cores 340a.
- the frequency governor 330 may be configured to monitor the operating load of the processing cores 340 and determine a frequency level at which the processing cores 340 are to operate at based on the operating load. For example, the frequency governor 330 may increase the frequency level or decrease the frequency level when the operating load satisfies an upper threshold (e.g., is greater than or equal to 90%) or satisfies a lower threshold (e.g., is less than 90%) , respectively.
- an upper threshold e.g., is greater than or equal to 90%
- a lower threshold e.g., is less than 90%
- the processing core may transition to a sleep state (e.g., operate in a low power mode) to conserve power.
- a sleep state e.g., operate in a low power mode
- the processing core first transitions from the sleep state to the active state before being capable of performing the one or more tasks associated with the scheduled thread.
- the interval between when a processing core operating in the sleep state is scheduled to perform a thread and when the processing core transitions to the active state may be referred to as the exit latency.
- the interval between when the frame presentation starting thread 210 is scheduled to be performed (e.g., at the first time T1) and when the performing of the one or more tasks associated with the composition coordinating thread 230 are completed (e.g., at the second time T2) may be referred to as the compositing period.
- the compositing period may be the cumulative duration associated with executing each of the display-related threads 210, 220, 230, 240, 250.
- the duration associated with executing each of the display-related threads may include a transitioning duration (e.g., the transitioning duration 244a associated with transitioning the processing core scheduled to perform the HW composer thread 240 from the sleep state to the active state) and a running duration (e.g., the running duration 244b corresponding to the executing of the one or more tasks associated with the HW composer thread 240) .
- a transitioning duration e.g., the transitioning duration 244a associated with transitioning the processing core scheduled to perform the HW composer thread 240 from the sleep state to the active state
- a running duration e.g., the running duration 244b corresponding to the executing of the one or more tasks associated with the HW composer thread 240
- the successful displaying of a frame may be performed by reducing the transitioning duration associated with one or more of the display-related threads 210, 220, 230, 240, 250 and/or by reducing the running duration associated with one or more of the display-related threads 210, 220, 230, 240, 250.
- Example techniques disclosed herein facilitate reducing the interval between when compositing of a frame begins (e.g., at the first time T1) and when the compositing of the frame is complete (e.g., at the second time T2) .
- disclosed techniques may employ adaptive scheduling to reduce the delay of performing display-related threads during performing of the display pipeline.
- disclosed techniques may facilitate reducing (or eliminating) one or more transitioning durations associated with the performing of a display-related thread, thereby enabling the display-related thread to begin after a reduced (or no) exit latency.
- disclosed techniques may employ adaptive scheduling to reduce the duration of performing display-related threads during performing of the display pipeline.
- disclosed techniques may facilitate increasing the frequency at which the processing cores are performing the display-related threads based on the running durations associated with the display-related threads and not only based on the operating load of the processing cores.
- the example composition coordinator 310 of FIG. 3 includes an example adaptive scheduler 350.
- the adaptive scheduler 350 may be configured to facilitate reducing the delay of performing display-related threads during performing of the display pipeline.
- the example adaptive scheduler 350 may also be configured to facilitate reducing the running duration of performing display-related threads during performing of the display pipeline.
- the example of FIG. 3 illustrates the composition coordinator 310 including the adaptive scheduler 350, in additional or alternative examples, the adaptive scheduler 350 may be separate from the composition coordinator 310 and/or separate from the application processor 302.
- the adaptive scheduler 350 may be configured to calculate a delta representing a difference in the compositing period and the frame rate window. For example, the adaptive scheduler 350 may apply Equation 1 (below) to determine the delta.
- the term “ (T2 –T1) ” represents the compositing period and is based on a difference between the stop time for performing compositing for a frame (e.g., the second time T2) and the start time for performing compositing for the frame (e.g., the first time T1) .
- the term “1000/fps” represents the frame rate window (e.g., the Vsync pulse period) and is a ratio of 1000ms and the frames per second (fps) (or display refresh rate) for the display 390.
- the adaptive scheduler 350 may be configured to record a timestamp associated with the start of frame compositing of a frame N.
- the adaptive scheduler 350 may also be configured to a record a timestamp associated with the completion of frame compositing of the frame N.
- the adaptive scheduler 350 may then calculate the difference between the recorded completion timestamp (e.g., the second time T2) and the recorded start timestamp (e.g., the first time T1) for the frame N to sample the compositing period of the performing of the display-related threads 210, 220, 230, 240, 250 for the frame N.
- the compositing period when the calculated delta is zero or a negative value (e.g., less than 0ms) , then the compositing period is less than the frame rate window and frames may be successfully displayed. However, when the calculated delta is a positive value (e.g., greater than 0ms) , then the compositing period is greater than the frame rate window and frame drops may occur.
- the adaptive scheduler 350 may modify the performing of at least one display-related thread associated with the compositing of a frame.
- the adaptive scheduler 350 may be configured to employ two thresholds to determine how to modify the performing of at least one display-related thread.
- the adaptive scheduler 350 may be configured to employ transitioning duration reducing techniques disclosed herein when the calculated delta satisfies a latency threshold and the adaptive scheduler 350 may be configured to employ running duration reducing techniques disclosed herein when the calculated delta satisfies a frequency threshold.
- the calculated delta may satisfy the latency threshold when the delta value is greater than 0ms and less than 1ms. In some examples, the calculated delta may satisfy the frequency threshold when the delta value is greater than 1ms and less than 2ms. However, it may be appreciated that other examples may include additional or alternative delta values for satisfying the latency threshold and/or the frequency threshold.
- the adaptive scheduler 350 may determine that the difference in the compositing period and the frame rate window is relatively small and may attempt to reduce the duration of the compositing period by reducing the delay of performing display-related threads during compositing.
- the adaptive scheduler 350 may be configured to reduce (or eliminate) one or more transitioning durations 214a, 224a, 234a, 236a, 244a, 254a associated with the performing of the display-related threads 210, 220, 230, 240, 250, respectively.
- the thread scheduler 320 may be configured to schedule different display-related threads to different processing cores 340.
- the processing core 340 may transition to a sleep state to conserve power.
- the processing core 340 may first transition from the sleep state to the active state and then perform the one or more tasks associated with the respective display-related thread.
- the adaptive scheduler 350 may enable synchronized scheduling of real-time threads.
- real-time threads are threads that may be critical and, thus, may be expected to execute relatively quickly (e.g., within 1ms of being scheduled) .
- the display pipeline e.g., the display pipeline 100 of FIG. 1
- the display-related threads 210, 220, 230, 240, 250 may each be classified as real-time threads.
- one or more of the display-related threads 210, 220, 230, 240, 250 may be synchronized.
- two or more of the display-related threads 210, 220, 230, 240, 250 may be scheduled to the same processing core for performing.
- the adaptive scheduler 350 may signal to the thread scheduler 320 that synchronized scheduling is enabled.
- the thread scheduler 320 may then schedule two or more of the display-related threads 210, 220, 230, 240, 250 to the same processing core 340.
- the thread scheduler 320 may schedule the performing of the composition coordinating thread 230 and the HW composer thread 240 to the same processing core 340 (e.g., the processing core 340 (3) ) .
- the respective processing core 340 (3) may not transition to the sleep state between the performing of the composition coordinating thread 230 and the HW composer thread 240.
- FIG. 4 illustrates an example timing diagram 400 depicting active periods for a device operating on a frame in a display pipeline, in accordance with one or more techniques of this disclosure.
- the example timing diagram 400 is similar to the timing diagram 200 of FIG. 2 and includes display-related threads 210, 220, 230, 240, 250 associated with the second state of the display pipeline (e.g., the display pipeline 100 of FIG. 1) to facilitate compositing a frame and for the presentment of the composited frame.
- the performing of the frame presentation starting thread 4 is associated with a duration 414 (e.g., comprising a transitioning duration 414a and a running duration 414b)
- the performing of the composition signal processing thread 220 is associated with a duration 424 (e.g., comprising a transitioning duration 424a and a running duration 424b)
- the performing of the composition coordinating thread 230 includes a first set of tasks associating with a duration 434 (e.g., comprising a transitioning duration 434a and a running duration 434b)
- the performing of the HW composer thread 240 is associated with a duration 444
- the performing of the display driver thread 250 is associated with a duration 454 (e.g., comprising a transitioning duration 454a and a running duration 454b) .
- the adaptive scheduler 350 of FIG. 3 may enable synchronized scheduling, which may enable the thread scheduler 320 to schedule the performing of the composition coordinating thread 230 and the HW composer thread 240 to the same processing core 340.
- the thread scheduler 320 may schedule the performing of the frame presentation starting thread 210 to a first processing core 340 (1) , may schedule the performing of the composition signal processing thread 220 to a second processing core 340 (2) , may schedule the performing of the composition coordinating thread 230 to a third processing core 340 (3) , may schedule the performing of the HW composer thread 240 to the third processing core 340 (3) , and may schedule the performing of the display driver thread 250 to a fourth processing core 340 (4) .
- the performing of the HW composer thread 240 may be triggered at the completion of the first set of tasks associated with the composition coordinating thread 230 and the performing of the HW composer thread 240 may not include a transitioning duration as the respective processing core (e.g., the third processing core 340 (3) ) may not be operating in a sleep state when triggered.
- the performing of the second set of tasks associated with the composition coordinating thread 230 may be triggered at the completion of the performing of the HW composer thread 240 and the performing of the second set of tasks may not include a transitioning duration as the respective processing core (e.g., the third processing core 340 (3) ) may not be operating in the sleep state when triggered.
- the duration 444 associated with the performing of the HW composer thread 240 does not include a transitioning duration (e.g., the duration 444 comprises only a running duration 444b) and the duration 436 associated with the performing of the second set of tasks of the composition coordinating thread 230 also does not include a transitioning duration (e.g., the duration 436 comprises only a running duration 436b) .
- the timing diagram 400 eliminates (or reduces) the transitioning duration 244a associated with the performing of the HW composer thread 240 and also eliminates (or reduces) the transitioning duration 236a associated with the performing of the second set of tasks of the composition coordinating thread 230.
- the enabling of the synchronized scheduling enables reducing the compositing period by 1.2ms (e.g., 0.6ms associated with the transitioning duration 244a and 0.6ms associated with the transitioning duration 236a) , which is greater than the calculated delta and, thus, the compositing period may be less than the frame rate window and a frame may be successfully displayed.
- the adaptive scheduler 350 first determined that the duration of the compositing period is greater than 0ms and less than 1ms (e.g., satisfies the latency threshold) and then, by reducing the compositing period by two transitioning durations (e.g., 1.2ms) , the adaptive scheduler 350 enabled the duration of the compositing period to be less than the frame rate window.
- the adaptive scheduler 350 may determine that the difference in the compositing period and the frame rate window may not be reduced (e.g., to a negative value) by reducing (or eliminating) transitioning durations and may, instead, attempt to reduce the running duration of performing display-related threads during compositing.
- the adaptive scheduler 350 may be configured to reduce the running duration of performing one or more of the display-related threads 210, 220, 230, 240, 250 by increasing the frequency at which one or more processing cores are performing the one or more of the display-related threads 210, 220, 230, 240, 250.
- the frequency governor 330 of FIG. 3 may be configured to set the frequency at which the processing cores 340 are operating based on the operating load of the processing cores 340.
- an upper threshold e.g., is greater than or equal to 90%
- the frequency governor 330 may increase the frequency of the processing cores 340 to a faster frequency level
- a lower threshold e.g., is less than 90%
- the frequency governor 330 may decrease the frequency of the processing cores 340 to a lower frequency level.
- the adaptive scheduler 350 may determine to increase the frequency at which the processing cores 340 are operating based on the running durations of the display-related threads 210, 220, 230, 240, 250 and not based on the operating load of the processing cores 340.
- the frequency at which the processing cores 340 are operating is increased from a first frequency level to a second frequency level that is faster than the first frequency level, the running durations for performing the display-related threads 210, 220, 230, 240, 250 may be reduced.
- the cumulative running duration for performing the display-related threads 210, 220, 230, 240, 250 at 600MHz is 4ms
- the cumulative running duration for performing the display-related threads 210, 220, 230, 240, 250 at 1200MHz may be 2ms, resulting in an estimated savings of 2ms.
- the adaptive scheduler 350 may determine the second frequency level based on duration savings estimated at operating at the second frequency level. For example, the adaptive scheduler 350 may apply equation 2 (below) to estimate the savings in duration when changing frequency from a first frequency level to a second frequency level.
- the variable “Running n ” represents the cumulative running duration at the first frequency level (e.g., the current frequency level) .
- the variable “Frequency n ” represents the first frequency level and the variable “Frequency n+1 ” represents the second frequency level.
- the first tier processing cores 340a may be configured to operate in one of a first set of frequency levels (e.g., 600MHz, 900MHz, 1200MHz, 1400MHz, and 1800MHz) .
- the adaptive scheduler 350 may be configured to estimate a duration savings for operating at the different available frequency levels of the processing cores 340 and then select the second frequency level as the lowest frequency level that provides an estimated savings that reduces the duration of the composing period to be less than the frame rate window.
- the adaptive scheduler 350 may be configured to select the lowest frequency level that is greater than the current frequency level that also provides an estimated savings of at least 2ms.
- the adaptive scheduler 350 may determine whether operating at 900MHz provides an estimated savings of at least 2ms. If the adaptive scheduler 350 determines that operating at 900MHz does not provide an estimated savings of at least 2ms, the adaptive scheduler 350 may determine whether operating at 1200MHz provides an estimated savings of at least 2ms. In some examples, the adaptive scheduler 350 may continue traversing the frequency levels until an estimated savings of at least 2ms is identified.
- the adaptive scheduler 350 may then signal the second frequency level to the frequency governor 330.
- the example frequency governor 330 may then change the frequency at which the processing cores 340 are operating from the first frequency level to the second frequency level.
- the adaptive scheduler 350 may be unable to identify a second frequency level that provides an estimated savings of at least 2ms.
- the thread scheduler 320 may be configured to schedule the performing of the display-related threads 210, 220, 230, 240, 250 to the first tier processing cores 340a, which may be associated with a lower processing capacity than the second tier processing cores 340b, but may also be associated with lower power consumption than the second tier processing cores 340b.
- the first tier processing cores 340a and the second tier processing cores 340b may also be associated with different frequency levels.
- the first tier processing cores 340a may be associated with a first set of frequency levels and the second tier processing cores 340b may be associated with a second set of frequency levels.
- the first set of frequency levels may include five frequency levels (e.g., 600MHz, 900MHz, 1200MHz, 1400MHz, and 1800MHz) and the second set of frequency levels may include four frequency levels (e.g., 800MHz, 1000MHz, 1600MHz, and 2400MHz) .
- the adaptive scheduler 350 may instruct the thread scheduler 320 to schedule the display-related threads 210, 220, 230, 240, 250 to the second tier processing cores 340b.
- the adaptive scheduler 350 may also determine the frequency level of the frequency levels associated with the second tier processing cores 340b that may provide an estimated savings of at least 2ms.
- the adaptive scheduler 350 may then signal to the determined frequency level to the frequency governor 330 to cause the frequency governor 330 to change the frequency at which the processing cores 340 are operating.
- the disclosed techniques enable the frequency governor 330 to change the frequency at which the processing cores 340 are operating from a first frequency level to a second frequency level based on estimated savings of operating at the second frequency level, rather than on an operating load while operating at the first frequency level.
- the adaptive scheduler 350 may be configured to instruct the thread scheduler 320 to schedule the display-related threads 210, 220, 230, 240, 250 to the second tier processing cores 340b.
- the adaptive scheduler 350 may also be configured to determine the frequency level at which the second tier processing cores 340b may operate. The adaptive scheduler 350 may then signal the determined frequency level to the frequency governor 330 so that the frequency governor 330 may change the frequency at which the second tier processing cores 340b are operating accordingly.
- the adaptive scheduler 350 may determine that scheduling the display-related threads 210, 220, 230, 240, 250 to be performed by the second tier processing cores 340b at the highest frequency level associated with the second tier processing cores 340b may not provide an estimated savings that reduces the duration of the compositing period to less than the frame rate window. In some such examples, the adaptive scheduler 350 may be configured to enable the corresponding frame to be dropped.
- FIG. 5 illustrates an example flowchart 500 of an example method in accordance with one or more techniques of this disclosure.
- the method may be performed by an apparatus, such as the example device 300 of FIG. 3, a CPU, a GPU, a DPU, and/or a component of the device 300, such as the example application processor 302, the example composition coordinator 310, the example thread scheduler 320, the example frequency governor 330, the example processing cores 340, and/or the example adaptive scheduler 350.
- the apparatus may calculate a delta based on a compositing period and a frame rate window, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4.
- the adaptive scheduler 350 may be configured to apply Equation 1 (reproduced below) to calculate the delta.
- the apparatus may determine whether the calculated delta satisfies a latency threshold, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4.
- the adaptive scheduler 350 may be configured to determine whether the calculated delta is greater than 0ms and less than 1ms.
- the apparatus may enable synchronized scheduling for real-time threads, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4.
- the adaptive scheduler 350 may be configured to instruct the thread scheduler 320 to enable scheduling the performing of the composition coordinating thread 230 and the HW composer thread 240 to a same processing core (e.g., the third processing core 340 (3) ) .
- the apparatus may determine whether the calculated delta satisfies a frequency threshold, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4.
- the adaptive scheduler 350 may be configured to determine whether the calculated delta is greater than or equal to 1ms and less than 2ms.
- control proceeds to 518 to schedule threads to higher capacity processing cores, such as the second tier processing cores 340b, as described above in connection with the examples in FIGs. 1, 2, 3, and/or 4.
- the apparatus may estimate a savings at a faster frequency level, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4.
- the adaptive scheduler 350 may be configured to apply equation 2 (reproduced below) to estimate the durations savings by performing the display-related threads 210, 220, 230, 240, 250 at a faster frequency level.
- the apparatus may determine whether the estimated savings is greater than or equal to the calculated delta, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4.
- the adaptive scheduler 350 may be configured to determine whether the estimated savings is greater than or equal to the delta value calculated at 502.
- the apparatus may set the new frequency level for the processing cores, as described in connection with the examples of FIGs. 1, 2, 3. and/or 4.
- the adaptive scheduler 350 may be configured to signal the new frequency level to the frequency governor 330 to cause the frequency governor 330 to change the frequency at which the processing cores 340 are operating from a current (or first) frequency level to the new (or second) frequency level.
- the apparatus may determine whether another frequency level is available to process, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4.
- the adaptive scheduler 350 may be configured to determine whether there is a faster frequency that the processing cores 340 may operate at to reduce the cumulative running duration associated with performing the display-related threads 210, 220, 230, 240, 250 of the display pipeline.
- control returns to 510 to estimate the savings at the next frequency level, as described above in connection with examples of FIGs. 1, 2, 3, and/or 4.
- the apparatus may schedule threads to higher capacity processing cores, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4.
- the adaptive scheduler 350 may be configured to instruct the thread scheduler 320 to schedule the display-related threads 210, 220, 230, 240, 250 of the display pipeline to the second tier processing cores 340b of the processing cores 340 that are associated with the relatively higher processing capacity than the first tier processing cores 340a.
- the apparatus may determine the frequency level for the higher capacity processing cores, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4.
- the adaptive scheduler 350 may be configured to signal to the frequency governor 330 a frequency level at which the second tier processing cores 340b may operate to cause the frequency governor 330 to change the frequency level associated with the second tier processing cores 340b, accordingly.
- the adaptive scheduler 350 may be configured to apply Equation 2 (above) to determine the estimated savings at different frequency levels and select the frequency level that results in an estimated savings that is greater than the calculated delta.
- FIG. 6 is a block diagram that illustrates an example content generation system 600 configured to implement one or more techniques of this disclosure.
- the content generation system 600 includes a device 604.
- the device 604 may include one or more components or circuits for performing various functions described herein.
- One or more aspects of the device 604 may be implemented by the example device 300 of FIG. 3.
- one or more components of the device 604 may be components of an SOC.
- the device 604 may include one or more components configured to perform one or more techniques of this disclosure.
- the device 604 may include a processing unit 620 and a memory 624.
- the device 604 can include a number of additional or alternative components, e.g., a communication interface 626, a transceiver 632, a receiver 628, a transmitter 630, and a display client 631.
- the processing unit 620 may include an internal memory 621.
- the processing unit 620 may be configured to perform graphics processing, such as in a graphics processing pipeline 607.
- the processing unit 620 may include a display processor to perform one or more display processing techniques on one or more frames generated by the processing unit 620 before presentment of the generated frame (s) by the display client 631.
- the display processor may be configured to perform display processing.
- the display processor may be configured to perform one or more display processing techniques on one or more frames generated by the processing unit 620.
- the display processor may output image data to the display client 631 according to an interface protocol, such as, for example, the MIPI DSI (Mobile Industry Processor Interface, Display Serial Interface) .
- MIPI DSI Mobile Industry Processor Interface, Display Serial Interface
- the display client 631 may be configured to display or otherwise present frames processed by the processing unit 620 (and/or the display processor) .
- the display client 631 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.
- LCD liquid crystal display
- OLED organic light emitting diode
- projection display device an augmented reality display device
- a virtual reality display device a virtual reality display device
- a head-mounted display or any other type of display device.
- One or more aspects of the display client 631 may be implemented by the display 170 of FIG. 1 and/or the display 390 of FIG. 3.
- Reference to the display client 631 may refer to one or more displays.
- the display client 631 may include a single display or multiple displays.
- the display client 631 may include a first display and a second display.
- the results of the graphics processing may not be displayed on the device, e.g., the first and second displays 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 display client 631 may be configured in accordance with MIPI DSI standards.
- the MIPI DSI standard supports a video mode and a command mode.
- the processing unit 620 and/or the display processor
- the processing unit 620 may write the graphical content of a frame to a buffer.
- the processing unit 620 may not continuously refresh the graphical content of the display client 631. Instead, the processing unit 620 (and/or the display processor) may use a vertical synchronization (Vsync) pulse to coordinate rendering and consuming of graphical content at the buffer. For example, when a Vsync pulse is generated, the processing unit 620 (and/or the display processor) may output new graphical content to the buffer. Thus, the generating of the Vsync pulse may indicate when current graphical content at the buffer has been composited.
- Vsync vertical synchronization
- Memory external to the processing unit 620 may be accessible to the processing unit 620.
- the processing unit 620 may be configured to read from and/or write to external memory, such as the memory 624.
- the processing unit 620 may be communicatively coupled to the memory 624 over a bus.
- the processing unit 620 and the memory 624 may be communicatively coupled to each other over the bus or a different connection.
- the device 604 may include a content encoder/decoder configured to receive graphical and/or display content from any source, such as the memory 624 and/or the communication interface 626.
- the memory 624 may be configured to store received encoded content or decoded content.
- the content encoder/decoder may be configured to receive encoded content or decoded content (e.g., from the memory 624 and/or the communication interface 626) in the form of encoded pixel data.
- the content encoder/decoder may be configured to encode or decode any content.
- the internal memory 621 and/or the memory 624 may include one or more volatile or non-volatile memories or storage devices.
- the internal memory 621 and/or the memory 624 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.
- EPROM erasable programmable ROM
- EEPROM electrically erasable programmable ROM
- flash memory a magnetic data media or an optical storage media, or any other type of memory.
- One or more aspects of the internal memory 621 and/or the memory 624 may be implemented by the memory 370 of FIG. 3.
- the internal memory 621 and/or the memory 624 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 the internal memory 621 and/or the memory 624 is non-movable or that its contents are static. As one example, the memory 624 may be removed from the device 604 and moved to another device. As another example, the memory 624 may not be removable from the device 604.
- the processing unit 620 include a central processing unit (CPU) , an application processor, a graphics processing unit (GPU) , a graphics processor, a general purpose GPU (GPGPU) , a display processing unit (DPU) , a display processor, and/or any other processing unit that may be configured to perform display or graphics processing.
- CPU central processing unit
- GPU graphics processing unit
- GPU graphics processor
- GPU general purpose GPU
- DPU display processing unit
- DPU display processing unit
- display processor a display processor, and/or any other processing unit that may be configured to perform display or graphics processing.
- One or more aspects of the processing unit 620 may be implemented by the application processor 302 and/or the graphics processor 380 of FIG. 3.
- the processing unit 620 may be integrated into a motherboard of the device 604. In some examples, the processing unit 620 may be present on a graphics card that is installed in a port in a motherboard of the device 604, or may be otherwise incorporated within a peripheral device configured to interoperate with the device 604.
- the processing unit 620 may include one or more processors, such as one or more microprocessors, CPUs, application processors, GPUs, graphics processors, DSPs, display processors, image signal processors (ISPs) , 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.
- processors such as one or more microprocessors, CPUs, application processors, GPUs, graphics processors, DSPs, display processors, image signal processors (ISPs) , 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
- the processing unit 620 may store instructions for the software in a suitable, non-transitory computer-readable storage medium, e.g., internal memory 621, 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.
- the content generation system 600 can include a communication interface 626.
- the communication interface 626 may include a receiver 628 and a transmitter 630.
- the receiver 628 may be configured to perform any receiving function described herein with respect to the device 604. Additionally, the receiver 628 may be configured to receive information (e.g., eye or head position information, rendering commands, or location information) from another device.
- the transmitter 630 may be configured to perform any transmitting function described herein with respect to the device 604. For example, the transmitter 630 may be configured to transmit information to another device, which may include a request for content.
- the receiver 628 and the transmitter 630 may be combined into a transceiver 632. In such examples, the transceiver 632 may be configured to perform any receiving function and/or transmitting function described herein with respect to the device 604.
- the graphical content from the processing unit 620 for display via the display client 631 may not be static and may be changing. Accordingly, the processing unit 620 (and/or the display processor) may periodically refresh the graphical content displayed via the display client 631. For example, the processing unit 620 (and/or the display processor) may periodically retrieve graphical content from the memory 624, where the graphical content may have been updated by the execution of an application (and/or the processing unit 620) that outputs the graphical content to the memory 624.
- the processing unit 620 may be configured to operate functions related to a display pipeline.
- the processing unit 620 (and/or the application processor) may perform one or more adaptive scheduling techniques disclosed herein to facilitate reducing frame drops.
- the processing unit 620 may include a determination component 698 configured to calculate a delta based on a compositing period associated with compositing a frame and a frame rate window associated with a display.
- the determination component 698 may also be configured to determine to perform a latency reducing mechanism that comprises synchronized scheduling based on the calculated delta.
- the determination component 698 may be configured to perform the determined latency reducing mechanism to facilitate displaying the frame.
- the determination component 698 may be configured to calculate the delta by determining the compositing period based on a difference between a start time associated with performing compositing of the frame and a stop time associated with completing the compositing of the frame.
- the determination component 698 may also be configured to determine a difference between the compositing period and the frame rate window.
- the determination component 698 may be configured to determine to perform the latency reducing mechanism when the calculated delta is a positive value and satisfies a latency threshold. In some examples, the determination component 698 may be configured to perform the latency reducing mechanism that comprises synchronized scheduling by scheduling a first display-related thread and a second display-related thread of a plurality of display-related threads associated with displaying the frame to a same processing core, and where the second display-related thread is performed after the first display-related thread. In some examples, the processing core may be configured to operate in an active state after the performing of the first display-related thread is complete and before the performing of the second display-related thread.
- operating in the active state after the performing of the first display-related thread is complete and before the performing of the second display-related thread may facilitate reducing a transitioning duration associated with the performing of the second display-related thread, where the transitioning duration may correspond to an interval between when the performing of the second display-related thread is triggered and when the performing of the second display-related thread is started.
- the determination component 698 may further be configured to determine to perform a frequency increasing mechanism when the calculated delta is a positive value and satisfies a frequency threshold. In some examples, the determination component 698 may be configured to perform the frequency increasing mechanism by estimating a cumulative running duration for performing a plurality of display-related threads associated with displaying the frame at a frequency associated with a first frequency level. The performing of the frequency increasing mechanism may also include the determination component 698 configured to estimate a duration savings for performing the plurality of display-related threads at a second frequency level that is faster than the first frequency level.
- the determination component 698 may be configured to perform the frequency increasing mechanism by setting one or more processing cores to operate at a frequency associated with the second frequency level when the estimated duration savings is greater than the calculated delta. In some examples, the determination component 698 may be configured to estimate the duration savings based on the estimated cumulative running duration and a ratio of the frequency associated with the first frequency level and the frequency associated with the second frequency level. In some examples, the one or more processing cores scheduled to perform the plurality of display-related threads may be associated with a first tier of processing cores capable of operating at a first set of frequency levels.
- the determination component 698 may be configured to perform the frequency increasing mechanism by determining that the calculated delta is greater than respective estimated duration savings for performing the plurality of display-related threads at each frequency level of the first set of frequency levels.
- the performing of the frequency increasing mechanism may also include the determination component 698 being configured to schedule the plurality of display-related threads to a second tier of processing cores capable of operating at a second set of frequency levels based on the determining, where the first tier of processing cores are associated with a lower processing capability than the second tier of processing cores.
- the determination component 698 may be configured to perform the frequency increasing mechanism by selecting a frequency level of the second set of frequency levels for the second tier of processing cores.
- a device such as the device 604, may refer to any device, apparatus, or system configured to perform one or more techniques described herein.
- 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
- PDA personal digital
- the apparatus may be a processing unit, an application processor, a CPU, a display processor, a display processing unit (DPU) , a GPU, a graphics processor, a video processor, or some other processor that can perform display or graphics processing.
- the apparatus may be the processing unit 620 within the device 604, or may be some other hardware within the device 604, or another device.
- one or more aspects of the apparatus may be implemented by the device 300 of FIG. 3.
- the apparatus may include means for calculating a delta based on a compositing period associated with compositing a frame and a frame rate window associated with a display.
- the apparatus may also include means for determining to perform a latency reducing mechanism that comprises synchronized scheduling based on the calculated delta.
- the apparatus may also include means for performing the determined latency reducing mechanism to facilitate displaying the frame.
- the apparatus may also include means for determining the compositing period based on a difference between a start time associated with performing compositing of the frame and a stop time associated with completing the compositing of the frame.
- the apparatus may also include means for determining a difference between the compositing period and the frame rate window.
- the apparatus may also include means for determining to perform the latency reducing mechanism when the calculated delta is a positive value and satisfies a latency threshold.
- the apparatus may also include means for scheduling a first display-related thread and a second display-related thread of a plurality of display-related threads associated with displaying the frame to a same processing core, and where the second display-related thread is performed after the first display-related thread.
- the apparatus may also include means for determining to perform a frequency increasing mechanism when the calculated delta is a positive value and satisfies a frequency threshold.
- the apparatus may also include means for estimating a cumulative running duration for performing a plurality of display-related threads associated with displaying the frame at a frequency associated with a first frequency level.
- the apparatus may also include means for estimating a duration savings for performing the plurality of display-related threads at a second frequency level that is faster than the first frequency level.
- the apparatus may also include means for setting one or more processing cores to operate at a frequency associated with the second frequency level when the estimated duration savings is greater than the calculated delta.
- the apparatus may also include means for determining that the calculated delta is greater than respective estimated duration savings for performing the plurality of display-related threads at each frequency level of the first set of frequency levels.
- the apparatus may also include means for scheduling the plurality of display-related threads to a second tier of processing cores capable of operating at a second set of frequency levels based on the determining, where the first tier of processing cores are associated with a lower processing capability than the second tier of processing cores.
- the apparatus may also include means for selecting a frequency level of the second set of frequency levels for the second tier of processing cores.
- the described display and/or graphics processing techniques can be used by an application processor, a CPU, a DPU, a GPU, or a video processor or some other processor that can perform display and/or graphics processing to implement the reducing of frame drops during compositing via adaptive scheduling techniques and/or reduce the load of a processing unit (e.g., any processing unit configured to perform one or more techniques disclosed herein, such as a CPU, a GPU, a DPU, and the like) .
- a processing unit e.g., any processing unit configured to perform one or more techniques disclosed herein, such as a CPU, a GPU, a DPU, and the like.
- examples disclosed herein provide techniques for reducing frame drops during compositing by employing one or more adaptive scheduling techniques.
- 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.
- the functions described herein may be implemented in hardware, software, firmware, or any combination thereof.
- 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.
- 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 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.
- DSPs digital signal processors
- ASICs application specific integrated circuits
- ALUs arithmetic logic units
- FPGAs field programmable logic arrays
- 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.
- IC integrated circuit
- 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.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Graphics (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The present disclosure relates to methods and apparatus for display or graphics processing. For example, disclosed techniques facilitate reducing frame drops during compositing. Aspects of the present disclosure can calculate a delta based on a compositing period associated with compositing a frame and a frame rate window associated with a display. Aspects of the present disclosure can also determine to perform a latency reducing mechanism that comprises synchronized scheduling based on the calculated delta. Additionally, aspects of the present disclosure can perform the determined latency reducing mechanism to facilitate displaying the frame.
Description
The present disclosure relates generally to processing systems and, more particularly, to one or more techniques for display 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. An application processor or 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 user’s experience on a computing device can be affected by how smoothly the user interface (UI) animation runs on the device for any particular application. In some examples, an application may generate a frame compositing instruction to facilitate compositing a frame for display. However, there may be a frame latency associated with when the frame compositing instruction is generated and when the corresponding composited frame is presented. Accordingly, there has developed an increased need for reducing frame latency for presenting graphical content on displays.
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 an application processor, a CPU, a graphics processor, a graphics processing unit (GPU) , a display processor, a display processing unit (DPU) , or a video processor. The apparatus can calculate a delta based on a compositing period associated with compositing a frame and a frame rate window associated with a display. The apparatus can also determine to perform a latency reducing mechanism that comprises synchronized scheduling based on the calculated delta. Additionally, the apparatus can perform the determined latency reducing mechanism to facilitate displaying the frame.
In some examples, the apparatus can calculate the delta by determining the compositing period based on a difference between a start time associated with performing compositing of the frame and a stop time associated with completing the compositing of the frame. The apparatus can also determine a difference between the compositing period and the frame rate window.
In some examples, the apparatus can determine to perform the latency reducing mechanism when the calculated delta is a positive value and satisfies a latency threshold. In some examples, the apparatus can perform the latency reducing mechanism that comprises synchronized scheduling by scheduling a first display-related thread and a second display-related thread of a plurality of display-related threads associated with displaying the frame to a same processing core, and where the second display-related thread is performed after the first display-related thread. In some examples, the processing core may be configured to operate in an active state after the performing of the first display-related thread is complete and before the performing of the second display-related thread. In some examples, operating in the active state after the performing of the first display-related thread is complete and before the performing of the second display-related thread may facilitate reducing a transitioning duration associated with the performing of the second display-related thread, where the transitioning duration may correspond to an interval between when the performing of the second display-related thread is triggered and when the performing of the second display-related thread is started.
In some examples, the apparatus may further be configured to determine to perform a frequency increasing mechanism when the calculated delta is a positive value and satisfies a frequency threshold. In some examples, the performing of the frequency increasing mechanism may include estimating a cumulative running duration for performing a plurality of display- related threads associated with displaying the frame at a frequency associated with a first frequency level. The performing of the frequency increasing mechanism may also include estimating a duration savings for performing the plurality of display-related threads at a second frequency level that is faster than the first frequency level. Additionally, the performing of the frequency increasing mechanism may include setting one or more processing cores to operate at a frequency associated with the second frequency level when the estimated duration savings is greater than the calculated delta. In some examples, the apparatus may estimate the duration savings based on the estimated cumulative running duration and a ratio of the frequency associated with the first frequency level and the frequency associated with the second frequency level. In some examples, the one or more processing cores scheduled to perform the plurality of display-related threads may be associated with a first tier of processing cores capable of operating at a first set of frequency levels. In some examples, the performing of the frequency increasing mechanism may include determining that the calculated delta is greater than respective estimated duration savings for performing the plurality of display-related threads at each frequency level of the first set of frequency levels. The performing of the frequency increasing mechanism may also include scheduling the plurality of display-related threads to a second tier of processing cores capable of operating at a second set of frequency levels based on the determining, where the first tier of processing cores are associated with a lower processing capability than the second tier of processing cores. Additionally, the performing of the frequency increasing mechanism may include selecting a frequency level of the second set of frequency levels for the second tier of processing cores.
In some examples, the apparatus may comprise a wireless communication device.
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 an example display pipeline for displaying a frame, in accordance with one or more techniques of this disclosure.
FIG. 2 is an example timing diagram depicting active periods for a device operating on a frame in a display pipeline, in accordance with one or more techniques of this disclosure.
FIG. 3 is a block diagram that illustrates an example device, in accordance with one or more techniques of this disclosure.
FIG. 4 is another example timing diagram depicting active periods for a device operating on a frame in a display pipeline, in accordance with one or more techniques of this disclosure.
FIG. 5 illustrates an example flowchart of an example method implemented by the device of FIG. 3, in accordance with one or more techniques of this disclosure.
FIG. 6 is a block diagram that illustrates an example content generation system, in accordance with one or more techniques of this disclosure.
In general, example techniques disclosed herein facilitate improving user interface (UI) performance by reducing stuttering or skipped/dropped frames in displaying of frames. In some examples, disclosed techniques employ adaptive scheduling to reduce the delay of performing display-related threads during performing of a display pipeline. In some examples, disclosed techniques employ adaptive scheduling to reduce the duration of performing display-related threads during performing of the display pipeline. A thread may include one or more tasks to be processed by a processing core. In some examples, a thread may refer to an instance of one or more tasks that is executed by a processing core.
In general, a processing core may be operating in an active state or a sleep state. A processing core operating in the active state may refer to instances during which the processing core is executing a display-related thread (e.g., performing the one or more tasks associated with the display-related thread) . A processing core operating in the sleep state may refer to instances during which the processing core is idle (e.g., is not executing a display-related thread and is not scheduled to perform a task) . In some examples, a processing core may be scheduled to execute a thread but may not yet be executing the thread. For example, a processing core operating in the sleep state may be scheduled to execute a thread, but first transitions from the sleep state to the active state before being able to execute the thread. In some such examples, the delay incurred by the processing core when switching from the sleep state to the active state may be referred to as an “exit latency. ”
In some examples, different display-related threads may be scheduled with different processing cores. In some such examples, transitioning each of the processing cores from the sleep state to the active state may incur a cumulative latency. For example, if four display-related threads are scheduled for execution at four different processing cores, each with a 0.600 millisecond (ms) exit latency, then the cumulative latency associated with performing the four display-related threads may be 2.4ms.
Example techniques disclosed herein facilitate reducing the compositing period (e.g., the duration between when a composition coordinating thread is triggered and when the performing of the composition coordinating thread is complete) associated with a display pipeline using adaptive scheduling. For example, disclosed techniques may employ latency reducing mechanisms to reduce the cumulative latency associated with transitioning durations of one or more display-related threads of a display pipeline. In some examples, disclosed techniques may employ frequency increasing mechanisms to reduce running durations of one or more of the display-related threads of the display pipeline. Such techniques may reduce frame drops and/or conserve power and, thus, improve user experience.
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, examples disclosed herein provide techniques for adaptive scheduling of display-related threads associated with performing a display pipeline. Example techniques may improve user experience associated with a device utilizing a display pipeline, conserve power consumption at the device, and/or reduce the load of a processing unit (e.g., any processing unit configured to perform one or more techniques disclosed herein, such as an application processor, a CPU, a GPU, a DPU, and the like) . For example, this disclosure describes techniques for reducing the delay of display-related threads and reducing frame drop in any device that utilizes a display pipeline. 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 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 content produced by a processing unit configured to perform graphics processing. In some examples, as used herein, the term “graphical content” may refer to 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 display 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 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 (e.g., the frame includes two or more layers, and the frame that includes two or more layers may subsequently be blended) .
As used herein, the term “render” (and variants thereof) may refer to 3D rendering and/or 2D rendering. For example, the graphics processor may utilize OpenGL instructions to render 3D graphics surfaces, or may utilize OpenVG instructions to render 2D graphics surfaces. However, in additional or alternative examples, any standards, methods, or techniques for rendering graphics may be utilized by the graphics processor.
FIG. 1 depicts an example display pipeline 100 to facilitate compositing a frame and for presentment of the composited frame, in accordance with one or more aspects disclosed herein. For example, one or more applications 110 (such as a game) executing via an apparatus may generate a compositing instruction to facilitate compositing a frame. In some such examples, a first stage of the display pipeline 100 may include an application rendering stage to process an application rendering workload based on the compositing instruction. For example, a processing unit (or a component (s) of the processing unit) may be configured to generate a surface based on the compositing instruction. In some examples, the application rendering workload may be split between an application processor (e.g., a CPU) and a graphics processor (e.g., a GPU 120) . The application processor and the graphics processor (e.g., the GPU 120) may store the surface in a surface buffer 130.
The example display pipeline 100 may also include a second stage during which composition on the surfaces into a composited frame may be performed. For example, a composition coordinator 140 may receive the surfaces stored in the surface buffers 130 and prepare the surfaces for compositing. For example, the composition coordinator 140 may use configurations for each of the surfaces (e.g., a geometry, buffer status, etc. ) to determine which surfaces are ready for processing, take ownership of a buffer before starting compositing, etc. An example hardware (HW) composer 150 may use the surfaces prepared for compositing (e.g., by the composition coordinator 140) to perform compositing and generate a composited frame. The HW composer 150 may provide the composited frame to a display driver 160 to facilitate the presentment of the composited frame. The display driver 160 may process the composited frame into a format for a display 170 to present.
The example display pipeline 100 may also include a third stage during which presentment of the composited frame may be performed. For example, the display 170 may receive the formatted composited frame from the display driver 160 and present the composited frame.
As described below in connection with FIGs. 2 to 6, examples disclosed herein are directed to techniques for improving performance during the second stage of the display pipeline 100 of FIG. 1. For example, disclosed techniques facilitate reducing (and/or eliminating) latency associated with processing core (s) that perform tasks related to the composition of surfaces into a composited frame, such as the one or more tasks performed by the composition coordinator 140 and/or the HW composer 150.
FIG. 2 illustrates an example timing diagram 200 depicting active periods for a device operating on a frame in a display pipeline, such as the example display pipeline 100 of FIG. 1. In the illustrated example, the timing diagram 200 includes a plurality of display-related threads associated with a second stage of a display pipeline to facilitate the compositing and the presentment (or display) of a frame.
In the illustrated example, the display pipeline includes a frame presentation starting thread 210, a composition signal processing thread 220, a composition coordinating thread 230, a HW composer thread 240, and a display driver thread 250. In some examples, the performing of the frame presentation starting thread 210, the composition signal processing thread 220, and the composition coordinating thread 230 may be performed by the composition coordinator 140 of FIG. 1. In some examples, the performing of the HW composer thread 240 may be performed by the HW composer 150 of FIG. 1. In some examples, the performing of the display driver thread 250 may be performed by the display driver 160 of FIG. 1.
The frame presentation starting thread 210 may be associated with monitoring for an output (e.g., a “displaySync” signal) generated by a display (e.g., the display 170 of FIG. 1) that instructs aspects of the display pipeline that a frame is being displayed. In some examples, an application, such as the example application 110 of FIG. 1, may wait to receive the displaySync signal to begin generating a surface. In some examples, the composition coordinator 140 may wait to receive the displaySync signal during the frame presentation starting thread 210 to begin coordinating the compositing of surfaces. In the illustrated example, the performing of the frame presentation starting thread 210 may be associated with a duration 214.
Vsync pulses may facilitate synchronizing certain events to the refresh rate of a display. In some examples, the Vsync pulses may be associated with a periodicity based on the refresh rate of the display. For example, a display with a 60 hertz (Hz) refresh rate may have a Vsync pulse period of 16.67 milliseconds (ms) (e.g., 1/60ms) . That is, a duration between a first Vsync pulse and a second Vsync pulse may be 16.67ms. In some examples, when the executing of the display pipeline for a frame is completed within the Vsync pulse period (sometimes referred to as a “frame rate window” ) , the frame is properly displayed. However, when the executing of the display pipeline takes longer than the Vsync pulse period, then the corresponding frame may be dropped. In some examples, different display refresh rates (e.g., 90Hz, 120Hz, etc. ) may be associated with different Vsync pulse periods. For example, a display with a 90Hz refresh rate may have a Vsync pulse period of 11.11ms (e.g., 1/90ms) .
The composition signal processing thread 220 may be triggered by the detection of the displaySync signal during the frame presentation starting thread 210. In some examples, the composition signal processing thread 220 may be associated with performing one or more tasks associated with compositing-related events. For example, the compositing-related events may include determining a frame rate window of the display 170. In some examples, the compositing-related events may include converting and/or modulating the displaySync signal into a format for processing by the composition coordinator 140. The performing of the composition signal processing thread 220 may be associated with a duration 224.
In the illustrated example, the one or more tasks associated with the composition coordinating thread 230 include a first set of tasks and a second set of tasks. In some examples, the first set of tasks may be associated with the preparing of the one or more surfaces on which compositing is to be performed. In some examples, the preparing of the one or more surfaces may include preparing the surfaces based on geometry information and preparing a common format to send to the HW composer 150 for performing the compositing. The performing of the first set of tasks may be triggered at the completion of the composition signal processing thread 220. The performing of the first set of tasks of the composition coordinating thread 230 may be associated with a duration 234.
In some examples, the second set of tasks may be associated with the completing of the compositing of the frame. In some examples, the completing of the compositing of the frame may include buffer management tasks, such as releasing a surface buffer and/or re-assigning a surface buffer to another owner. The performing of the second set of tasks may be triggered at the completion of the HW composer thread 240 and after the display driver thread 250 is scheduled. As shown in FIG. 2, the performing for the second set of tasks of the composition coordinating thread 230 may be associated with a duration 236.
The HW composer thread 240 may be triggered by the completion of the first set of tasks of the composition coordinating thread 230. In some examples, the HW composer thread 240 may be associated with performing one or more tasks associated with the compositing to generate the composited frame. For example, the HW composer thread 240 may include one or more tasks, such as determining whether the HW composer 150 of FIG. 1 is capable of performing the compositing, sending a confirmation or negative acknowledgement to the composition coordinator 140 regarding the compositing, translating the surfaces into a format to begin performing compositing, and/or performing the compositing of the different surfaces. As shown in FIG. 2, the performing for the HW composer thread 240 may be associated with a duration 244.
The display driver thread 250 may be triggered by the completion of the HW composer thread 240. In some examples, the display driver thread 250 may be associated with performing one or more tasks associated with the displaying of the composited frame. For example, the display driver thread 250 may include one or more tasks that, when executed, prepare the display 170 for presentment of a frame. As shown in FIG. 2, the performing for the display driver thread 250 may be associated with a duration 254.
In some examples, each of the display-related threads 210, 220, 230, 240, 250 may be performed by a different processing core of a processing unit. However, in other examples, one or more of the display-related threads 210, 220, 230, 240, 250 may be performed by a same processing core.
In some examples, when a processing core is not scheduled to perform a thread (e.g., a display-related thread) , the respective processing core may be configured to operate in a sleep state to conserve power (e.g., may operate in a low power mode) . When the respective processing core is scheduled to perform a thread, the processing unit transitions from the sleep state to the awake state prior to performing the scheduled thread. In some such examples, the delay incurred by the processing core when switching from the sleep state to the active state may be referred to as an “exit latency. ”
In some examples, the sleep state may include different degrees of sleep. For example, a wait for interrupt (WFI) sleep state may suspend operation until a triggering event is detected. A power collapse (PC) sleep state may provide a relatively deeper sleep than the WFI steep state and may allow the processing core to power down. A PC-Rail sleep state may provide a relatively deeper sleep than the PC sleep state and may allow the processing core to transition to a power rail off state. It may be appreciated that deeper sleep states may provide relatively more power savings, but may be associated with a longer exit latency. For example, a processing core transitioning from the WFI sleep state to the active state may incur a 0.100ms exit latency, a processing core transitioning from the PC sleep state to the active state may incur a 0.600ms exit latency, and a processing core transitioning from the PC-Rail sleep state to the active state may incur a 0.800ms exit latency. As used herein, when a processing core is described as operating in the sleep state, it may be appreciated that the processing core is operating in the PC sleep state.
As described above, there may be an exit latency associated with transitioning the processing core from a sleep state to an active (or running) state. That is, when a processing core is operating in a sleep state and a thread is scheduled for execution by the processing core, the processing core first transitions from the sleep state to the active state before the processing core is able to execute the schedule thread, which results in an exit latency. Furthermore, in some examples, different display-related threads may be scheduled with different processing cores. In some such examples, transitioning each of the processing cores from the sleep state to the active state may incur a cumulative latency. For example, if the frame presentation starting thread 210, the composition signal processing thread 220, the composition coordinating thread 230, and the HW composer thread 240 are each scheduled for execution at different processing cores, then the cumulative latency may be 2.4ms (e.g., 0.600 exit latency associated with each of the four processing cores) .
In the illustrated example of FIG. 2, the performing of the frame presentation starting thread 210 is associated with a total duration 214 that includes a transitioning duration 214a and a running duration 214b for performing the one or more tasks associated with the frame presentation starting thread 210. Similarly, in the illustrated example of FIG. 2, the composition signal processing thread 220 is associated with a total duration 224 including a transitioning duration 224a and a running duration 224b, the first set of tasks of the composition coordinating thread 230 are associated with a total duration 234 including a transitioning duration 234a and a running duration 234b, the second set of tasks of the composition coordinating thread 230 are associated with a total duration 236 including a transitioning duration 236a and a running duration 236b, the HW composer thread 240 is associated with a total duration 244 including a transitioning duration 244a and a running duration 244b, and the display driver thread 250 is associated with a total duration 254 including a transitioning duration 254a and a running duration 254b. Although not shown in FIG. 2, the performing of each of the display-related threads 210, 220, 230, 240, 250 may also include a sleep duration during which the respective processing core transitions from the active state to the sleep state.
With respect to the HW composer thread 240 having the total duration 244, the example transitioning duration 244a represents the exit latency and corresponds to an amount of time taken by the respective processing core to transition from the sleep state to the active state. The transitioning duration 244a may start when the respective processing core is scheduled to perform the HW composer thread 240 and may end when the processing core has transitioned to operating in the active state. As noted above, the transitioning duration 244a may vary based on the sleep state that the processing core is operating at when the respective thread is scheduled.
The example running duration 244b corresponds to an amount of time taken by the respective processing core to perform the one or more tasks associated with the HW composer thread 240. In some examples, the running duration 244b may vary based on the frequency at which the processing cores of the device are operating. For example, the processing cores may be capable of operating at different frequencies of a set of frequency levels, such as 600MHz, 900MHz, 1200MHz, 1400MHz, and 1800MHz.
In some examples, a frequency governor may monitor the operating load of the processing cores and adjust the frequency level for the processing cores based on the operating load. For example, when the operating load of the processing cores satisfies an upper threshold (e.g., is greater than or equal to 90%) , the frequency governor may determine to increase the frequency of the processing cores to a higher frequency level (e.g., from the 900MHz frequency level to the 1200MHz frequency level) . When the frequency governor determines that the operating load of the processing cores satisfies a lower threshold (e.g., is less than 90%) , the frequency governor may determine to decrease the frequency of the processing cores to a lower frequency level (e.g., from the 900MHz frequency level to the 600MHz frequency level) .
It may be appreciated that in some examples, the frequency governor may be configured to increase or decrease the frequency of the processing cores based on the result of sampling the operating load (e.g., increase the frequency to a higher frequency level when the operating load satisfies the upper threshold and decrease the frequency to a lower frequency level when the operating load satisfies the lower threshold) . In some examples, the frequency governor may be configured to increase the frequency of the processing cores to a higher frequency level when the operating load satisfies the upper threshold and utilize a decay timer to determine whether to adjust the frequency of the processing cores when the operating load satisfies the lower threshold. For example, the frequency governor may sample the operating load and initiate the decay timer in response to determining that the sampled operating load satisfies the lower threshold. The frequency governor may then re-sample the operating load when the decay timer expires and determine to adjust the frequency of the processing cores based on the result of re-sampling the operating load (e.g., decrease the frequency to a lower frequency level when the operating load satisfies the lower threshold and maintain the frequency when the operating load does not satisfy the lower threshold) .
As described above, a frame may be successfully displayed with the display pipeline is completed within the frame rate window (e.g., in less than 16.67ms for a display with a 60Hz refresh rate) , and the frame may be dropped when the display pipeline does not complete within the frame rate window. In the illustrated example of FIG. 2, a first time T1 indicates a start time of when frame compositing begins (e.g., when a displaySync signal is detected during the performing of the frame presentation starting thread 210) . A second time T2 indicates a stop time of when frame compositing is complete (e.g., when the processing core completes the performing of the second set of tasks associated with the composition coordinating thread 230) . A third time T3 represents when a frame is committed to a display driver (e.g., the display driver 160 of FIG. 1) to facilitate the presentment of the composited frame.
In the illustrated example of FIG. 2, when the duration between the third time T3 and the first time T1 is less than the frame rate window (e.g., less than 16.67ms) , the current frame may be successfully presented. However, when the duration between the third time T3 and the first time T1 is greater than the frame rate window (e.g., greater than 16.67ms) , the current frame may be dropped.
In the illustrated example of FIG. 2, when the duration between the second time T2 and the first time T1 (e.g., a “compositing period” ) is less than the frame rate window (e.g., less than 16.67ms) , the frame may be successfully presented. However, when the duration of the compositing period is greater than the frame rate window (e.g., greater than 16.67ms) , start of the composition coordinating thread associated with a subsequent frame may be delayed, which may result in the dropping of the subsequent frame.
As shown in FIG. 2, whether the display pipeline for compositing and displaying a frame may be completed in time to not drop a frame may depend on the total durations associated with the performing of each respective thread. That is, the occurrence of each exit latency may increase the cumulative latency associated with performing the display-related threads 210, 220, 230, 240, 250 of the display pipeline. Similarly, the occurrence of long running durations for performing the one or more tasks associated with each of the display-related threads 210, 220, 230, 240, 250 of the display pipeline may additionally or alternatively increase the likelihood that a frame (e.g., a current frame and/or a subsequent frame) is dropped due to a cumulative duration that is greater than the frame rate window.
However, removing low power mode for the processing cores (e.g., removing sleep states) and/or increasing frequency at which the processing cores are operating may not be acceptable in some instances. For example, while removing low power mode may reduce (or eliminate) the transitioning duration 244a associated with the performing of the HW composer thread 240, the respective processing core may also be operating in an active state (even when the processing core is not executing a thread) , resulting in an increase in power consumption associated with the processing core while idle. Additionally, operating at a higher frequency may enable the processing core to reduce the transitioning duration 244b associated with the performing of the one or more tasks associated with the HW composer thread 240, but may also increase power consumption associated with the processing core due to operating at the higher frequency.
Accordingly, example techniques disclosed herein facilitate reducing the compositing period (e.g., the duration between the second time T2 and the first time T1) associated with the display pipeline using adaptive scheduling. For example, disclosed techniques may employ latency reducing mechanisms to reduce the cumulative latency associated with the transitioning durations of one or more of the display-related threads 210, 220, 230, 240, 250 of the display pipeline. In some examples, disclosed techniques may employ frequency increasing mechanisms to reduce the running durations of one or more of the display-related threads 210, 220, 230, 240, 250 of the display pipeline.
FIG. 3 is a block diagram illustrating components of an example device 300, in accordance with aspects of this disclosure. In some examples, the device 300 may comprise a wireless communication device. In the illustrated example of FIG. 3, the device 300 includes an application processor 302, a memory 370, a graphics processor 380, and a display 390. In some examples, the application processor 302, the memory 370, the graphics processor 380, and the display 390 may be in communication via one or more buses that may be implemented using any combination of bus structures and/or bus protocols.
In the illustrated example of FIG. 3, the application processor 302 may include one or more processors that are configured to execute a composition coordinator 310, a thread scheduler 320, a frequency governor 330, and a plurality of processing cores 340. In some examples, the application processor 302 may be configured to execute instructions that cause the application processor 302 to perform one or more of the example techniques disclosed herein.
In the illustrated example of FIG. 3, the memory 370 may store one or more commands and/or composited frames. In some examples, the memory 370 may also store instructions that, when executed, cause the application processor 302, the graphics processor 380, and/or the display 390 to perform one or more of the example techniques disclosed herein.
In the illustrated example of FIG. 3, the graphics processor 380 may include one or more processors that are configured to render and/or composite a frame. For example, the graphics processor 380 may be configured to execute one or more compositing commands to render a frame. In some examples, the graphics processor 380 may be configured to execute instructions that cause the graphics processor 380 to perform one or more of the example techniques disclosed herein.
In the illustrated example of FIG. 3, the display 390 may include a display panel, a display client, and/or a screen to facilitate presentment of a composited frame. In some examples, the display 390 may be configured to execute instructions that cause the display 390 to perform one or more example techniques disclosed herein.
In the illustrated example of FIG. 3, the composition coordinator 310 may be configured to receive a compositing instruction and determine the one or more display-related threads to perform to facilitate executing the compositing instruction. For example, the composition coordinator 310 may receive a compositing instruction associated with a surface and determine to perform the frame presentation starting thread 210, the composition signal processing thread 220, the composition coordinating thread 230, the HW composer thread 240, and/or the display driver thread 250 to facilitate the executing of the compositing instruction to present the frame (e.g., via the display 390) .
In some examples, a composition coordinator (sometimes referred to as a “compositing engine, ” “composition engine, ” “compositing hardware, ” or “composition hardware” ) refers to an analogue or digital circuit that programs display hardware to display composited frame data or animation data to a display (e.g., the display 390) . The composition coordinator may include an input for the composited data and an output for the data and/or instructions to the display hardware (e.g., the display 390) . In some examples, the composition coordinator may reside in hardware or may be implemented in software running on the application processor 302.
In some examples, a “Surface Flinger” (SF) (sometimes referred to as a “Surface Flinger component” or a “Surface Flinger engine” ) can refer to the composition coordinator as software running at a user-space level in a CPU (e.g., the application processor 302) in the ANDROID
TM operating system. The Surface Flinger may additionally or alternatively reside at a kernel level of a CPU (e.g., the application processor 302) .
In some examples, composition functionality and/or programming of the display hardware (e.g., the display 390) may be distributed between two or more of hardware components, software components, and/or firmware components.
In the illustrated example of FIG. 3, the thread scheduler 320 may be configured to control how threads are executed by the processing cores 340. For example, the thread scheduler 320 may be configured to receive thread information (e.g., from the composition coordinator 310) indicative of one or more tasks to be performed, determine a thread configuration for processing the one or more tasks, and cause the processing core (s) 340 to execute one or more threads based on the thread configuration. In some examples, the thread scheduler 320 may distribute the one or more threads across the processing cores 340 based on availability of respective ones of the processing cores 340 to perform the threads. In some examples, the thread scheduler 320 may be configured to distribute different threads to different processing cores. For example, the thread scheduler 320 may distribute (or schedule) the frame presentation starting thread 210 to a first processing core of the processing cores 340 (e.g., a processor core 340 (1) ) , may distribute the composition signal processing thread 220 to a second processing core of the processing cores 340 (e.g., a processor core 340 (2) ) , may distribute the composition coordinating thread 230 to a third processing core of the processing cores 340 (e.g., a processing core 340 (3) ) , may distribute the HW composer thread 240 to a fourth processing core of the processing cores 340 (e.g., a processing core 340 (4) ) , and may distribute the display driver thread 250 to a fifth processing core of the processing cores 340 (e.g., a processing core 340 (5) ) .
In the illustrated example of FIG. 3, the frequency governor 330 may be configured to control the frequency at which the processing cores 340 are operating. In some examples, the frequency governor 330 may monitor the operating load of the processing cores 340 and adjust the frequency level for the processing cores 340 based on the operating load. For example, when the operating load of the processing cores 340 satisfies an upper threshold (e.g., is greater than or equal to 90%) , the frequency governor 330 may determine to increase the frequency of the processing cores 340 to a higher frequency level (e.g., from a 900MHz frequency level to a 1200MHz frequency level) . When the frequency governor 330 determines that the operating load of the processing cores 340 satisfies a lower threshold (e.g., is less than 90%) , the frequency governor 330 may determine to decrease the frequency of the processing cores 340 to a lower frequency level (e.g., from a 900MHz frequency level to a 600MHz frequency level) .
In the illustrated example of FIG. 3, the processing cores 340 are configured to execute one or more threads, such as the display-related threads 210, 220, 230, 240, 250 of the display pipeline of FIG. 2. The processing cores 340 may include one or more processing cores that may each be a programmable processing core or a fixed-function processing core. A programmable processing core may include a programmable processor that is configured to execute one or more threads that are downloaded onto the programmable processing core. A fixed-function processing core may include hardware that is hard-wired to perform certain functions. In some examples, the fixed-function processing cores may additionally or alternatively include freely programmable thread-controlled pipelines that enable the fixed-function processing core to perform some configurable functions. Although the fixed-function processing cores may be configurable to perform different functions (e.g., via one or more control signals) , the fixed-function hardware may not include a program memory that is capable of receiving user-compiled programs (e.g., from the application processor 302) .
In the illustrated example of FIG. 3, the processing cores 340 include first tier processing cores 340a and second tier processing cores 340b. In the illustrated example, the processing cores of the first tier processing cores 340a may be associated with a relatively lower processing capacity than the processing cores of the second tier processing cores 340b. The processing cores of the first tier processing cores 340a may also be associated with relatively lower power consumption than the processing cores of the second tier processing cores 340b.
Additionally, the processing cores of the first tier processing cores 340a and the second tier processing cores 340b may be configured to operate at different frequency levels. For example, the first tier processing cores 340a may be configured to operate at one of a first set of frequency levels and the second tier processing cores 340b may be configured to operate at one of a second set of frequency levels. In some examples, the first set of frequency levels may include five different frequency levels (e.g., 600MHz, 900MHz, 1200MHz, 1400MHz, and 1800MHz) and the second set of frequency levels may include four different frequency levels (e.g., 800MHz, 100MHz, 1600MHz, and 2400MHz) . However, it may be appreciated that other examples may include additional or alternative frequency levels for each set of frequency levels.
Although the above description provides examples including two tiers of processing cores, in some examples, the processing cores 340 may include any suitable quantity and/or distribution of tiers. For example, the processing cores 340 may include one tier of processing cores, may include two tiers of processing cores, may include three tiers of processing cores, etc. In some examples, the quantity of processing cores included in each tier may be evenly distributed and/or may vary based on the tier. For example, the quantity of first tier processing cores 340a may be the same as the quantity of second tier processing cores 340b, may be greater than the quantity of second tier processing cores 340b, or may be less than the quantity of second tier processing cores 340b. Furthermore, additional or alternative examples may include other quantities of frequency levels associated with the first tier processing cores 340a and the second tier processing cores 340b.
In the illustrated example of FIG. 3, the graphics processor 380 may be configured to perform one or more graphics processor compositing tasks. For example, the graphics processor 380 may be configured to execute compositing commands stored in the memory 370 and composite a frame. In some examples, one or more aspects of the graphics processor compositing tasks may be implemented via a graphics processing pipeline. In the illustrated example, the graphics processor 380 may store the output of the graphics processor compositing tasks at the memory 370.
In the illustrated example of FIG. 3, the display 390 may be configured to perform one or more display tasks. For example, the display 390 may be configured to display a frame. In some examples, the display 390 may be configured to receive information from the composition coordinator 310 that identifies a frame buffer (and/or a location of the composited frame buffer corresponding to the composited frame) . In some such examples, the display 390 may be configured to monitor for an indication that the compositing of the frame is complete and that the composited frame is available at the identified composited frame buffer for presentment. For example, the display 390 may monitor for an indication that the performing of the one or more tasks associated with the display driver thread 250 of FIG. 2 is completed. In some examples, after receiving the indication that the performing of the one or more tasks associated with the display driver thread 250 is completed, the display 390 may be configured to display the corresponding frame. For example, the display 390 may access the frame at a composited frame buffer of the memory 370 for presentment.
In some examples, after the presentment of the frame, the display 390 may generate a Vsync pulse. In some examples, the Vsync pulse may indicate, for example, that the buffer corresponding to the frame is available. For example, when executing the display pipeline, a frame may be associated with a corresponding buffer. For example, the performing of the one or more tasks associated with the composition signal processing thread 220 may include designating a composited frame buffer for storing the composited frame. The graphics processor 380 and/or the performing of the one or more tasks associated with the HW composer thread 240 may store the composited frame in the designated composited frame buffer. The composition coordinator 310 may provide information to the display 390 that identifies the designated composited frame buffer of the memory 370. When performing the display tasks, the display 390 may monitor for an indication that the designated composited frame buffer is available for presentment. In some such examples, generating the Vsync pulse after the presentment of the frame enables the composition coordinator 310 to determine that the designated composited frame buffer may be designated for storing a subsequent frame.
The generating of the Vsync pulse may be a periodic occurrence, may be an a-periodic occurrence, may be a one-time occurrence, and/or may be an event-based occurrence. For example, the occurrences of the Vsync pulses may be associated with a periodicity based on the refresh rate of the display 390. For example, a display with a 60 Hz refresh rate may have a Vsync pulse period (or frame rate window) of 16.67ms (e.g., 1/60ms) . That is, a duration between a first Vsync pulse and a second Vsync pulse may be 16.67ms.
In operation, the composition coordinator 310 may receive a compositing instruction and generate information associated with performing one or more tasks related to display-related threads for executing the compositing instruction. The thread scheduler 320 may be configured to receive the information associated with the one or more tasks, determine thread configurations for processing the one or more tasks, and distribute threads based on the thread configurations to the processing cores 340. For example, the thread scheduler 320 may be configured to distribute the display-related threads 210, 220, 230, 240, 250 across different ones of the processing cores 340. In the illustrated example, the thread scheduler 320 may be configured to distribute the display-related threads 210, 220, 230, 240, 250 to the first tier processing cores 340a.
The frequency governor 330 may be configured to monitor the operating load of the processing cores 340 and determine a frequency level at which the processing cores 340 are to operate at based on the operating load. For example, the frequency governor 330 may increase the frequency level or decrease the frequency level when the operating load satisfies an upper threshold (e.g., is greater than or equal to 90%) or satisfies a lower threshold (e.g., is less than 90%) , respectively.
As described above, when a processing core is not scheduled to perform a thread, the processing core may transition to a sleep state (e.g., operate in a low power mode) to conserve power. However, as described above, in some examples, when a processing core operating in a sleep state is scheduled to perform a thread, the processing core first transitions from the sleep state to the active state before being capable of performing the one or more tasks associated with the scheduled thread. The interval between when a processing core operating in the sleep state is scheduled to perform a thread and when the processing core transitions to the active state may be referred to as the exit latency.
As described above, the interval between when the frame presentation starting thread 210 is scheduled to be performed (e.g., at the first time T1) and when the performing of the one or more tasks associated with the composition coordinating thread 230 are completed (e.g., at the second time T2) may be referred to as the compositing period. The compositing period may be the cumulative duration associated with executing each of the display-related threads 210, 220, 230, 240, 250. As described above, the duration associated with executing each of the display-related threads may include a transitioning duration (e.g., the transitioning duration 244a associated with transitioning the processing core scheduled to perform the HW composer thread 240 from the sleep state to the active state) and a running duration (e.g., the running duration 244b corresponding to the executing of the one or more tasks associated with the HW composer thread 240) .
Thus, it should be appreciated that the successful displaying of a frame (e.g., the frame is not dropped) may be performed by reducing the transitioning duration associated with one or more of the display-related threads 210, 220, 230, 240, 250 and/or by reducing the running duration associated with one or more of the display-related threads 210, 220, 230, 240, 250.
However, as described above, it may be appreciated that removing the ability for processing cores to operate in a sleep state and/or increasing the frequency level for the processing cores may result in increased power consumption, which may also decrease the user experience for a user interacting with the device.
Example techniques disclosed herein facilitate reducing the interval between when compositing of a frame begins (e.g., at the first time T1) and when the compositing of the frame is complete (e.g., at the second time T2) . For example, disclosed techniques may employ adaptive scheduling to reduce the delay of performing display-related threads during performing of the display pipeline. In particular, disclosed techniques may facilitate reducing (or eliminating) one or more transitioning durations associated with the performing of a display-related thread, thereby enabling the display-related thread to begin after a reduced (or no) exit latency. In some examples, disclosed techniques may employ adaptive scheduling to reduce the duration of performing display-related threads during performing of the display pipeline. In particular, disclosed techniques may facilitate increasing the frequency at which the processing cores are performing the display-related threads based on the running durations associated with the display-related threads and not only based on the operating load of the processing cores.
To facilitate the reducing of the compositing period, the example composition coordinator 310 of FIG. 3 includes an example adaptive scheduler 350. The adaptive scheduler 350 may be configured to facilitate reducing the delay of performing display-related threads during performing of the display pipeline. The example adaptive scheduler 350 may also be configured to facilitate reducing the running duration of performing display-related threads during performing of the display pipeline. Although the example of FIG. 3 illustrates the composition coordinator 310 including the adaptive scheduler 350, in additional or alternative examples, the adaptive scheduler 350 may be separate from the composition coordinator 310 and/or separate from the application processor 302.
In some examples, the adaptive scheduler 350 may be configured to calculate a delta representing a difference in the compositing period and the frame rate window. For example, the adaptive scheduler 350 may apply Equation 1 (below) to determine the delta.
Equation 1: delta= (T2-T1) -1000/fps
In Equation 1, the term “ (T2 –T1) ” represents the compositing period and is based on a difference between the stop time for performing compositing for a frame (e.g., the second time T2) and the start time for performing compositing for the frame (e.g., the first time T1) . The term “1000/fps” represents the frame rate window (e.g., the Vsync pulse period) and is a ratio of 1000ms and the frames per second (fps) (or display refresh rate) for the display 390.
In the illustrated example, to determine the compositing period, the adaptive scheduler 350 may be configured to record a timestamp associated with the start of frame compositing of a frame N. The adaptive scheduler 350 may also be configured to a record a timestamp associated with the completion of frame compositing of the frame N. The adaptive scheduler 350 may then calculate the difference between the recorded completion timestamp (e.g., the second time T2) and the recorded start timestamp (e.g., the first time T1) for the frame N to sample the compositing period of the performing of the display-related threads 210, 220, 230, 240, 250 for the frame N.
In the illustrated example, when the calculated delta is zero or a negative value (e.g., less than 0ms) , then the compositing period is less than the frame rate window and frames may be successfully displayed. However, when the calculated delta is a positive value (e.g., greater than 0ms) , then the compositing period is greater than the frame rate window and frame drops may occur.
In some examples, when the delta value indicates that a frame may be dropped (e.g., the calculated delta is a positive value) , the adaptive scheduler 350 may modify the performing of at least one display-related thread associated with the compositing of a frame. In some examples, the adaptive scheduler 350 may be configured to employ two thresholds to determine how to modify the performing of at least one display-related thread. For example, the adaptive scheduler 350 may be configured to employ transitioning duration reducing techniques disclosed herein when the calculated delta satisfies a latency threshold and the adaptive scheduler 350 may be configured to employ running duration reducing techniques disclosed herein when the calculated delta satisfies a frequency threshold. In some examples, the calculated delta may satisfy the latency threshold when the delta value is greater than 0ms and less than 1ms. In some examples, the calculated delta may satisfy the frequency threshold when the delta value is greater than 1ms and less than 2ms. However, it may be appreciated that other examples may include additional or alternative delta values for satisfying the latency threshold and/or the frequency threshold.
In some examples, when the calculated delta satisfies the latency threshold, the adaptive scheduler 350 may determine that the difference in the compositing period and the frame rate window is relatively small and may attempt to reduce the duration of the compositing period by reducing the delay of performing display-related threads during compositing. For example, the adaptive scheduler 350 may be configured to reduce (or eliminate) one or more transitioning durations 214a, 224a, 234a, 236a, 244a, 254a associated with the performing of the display-related threads 210, 220, 230, 240, 250, respectively.
As described above, in some examples, the thread scheduler 320 may be configured to schedule different display-related threads to different processing cores 340. As a result, when a processing core 340 is not scheduled to perform a display-related thread, the processing core 340 may transition to a sleep state to conserve power. However, when the processing core 340 is scheduled to perform a display-related thread, the processing core 340 may first transition from the sleep state to the active state and then perform the one or more tasks associated with the respective display-related thread.
In the illustrated example, when the adaptive scheduler 350 determines that the calculated delta satisfies the latency threshold (e.g., the delta value is greater than 0ms and less than 1ms) , the adaptive scheduler 350 may enable synchronized scheduling of real-time threads. As used herein, real-time threads are threads that may be critical and, thus, may be expected to execute relatively quickly (e.g., within 1ms of being scheduled) . For the display pipeline (e.g., the display pipeline 100 of FIG. 1) , the display-related threads 210, 220, 230, 240, 250 may each be classified as real-time threads. Thus, when synchronized scheduling is enabled for real-time threads, one or more of the display-related threads 210, 220, 230, 240, 250 may be synchronized.
In the illustrated example, when synchronized scheduling is enabled, two or more of the display-related threads 210, 220, 230, 240, 250 may be scheduled to the same processing core for performing. For example, the adaptive scheduler 350 may signal to the thread scheduler 320 that synchronized scheduling is enabled. The thread scheduler 320 may then schedule two or more of the display-related threads 210, 220, 230, 240, 250 to the same processing core 340. For example, the thread scheduler 320 may schedule the performing of the composition coordinating thread 230 and the HW composer thread 240 to the same processing core 340 (e.g., the processing core 340 (3) ) . By scheduling the composition coordinating thread 230 and the HW composer thread 240 to the same processing core 340 (e.g., the processing core 340 (3) ) , the respective processing core 340 (3) may not transition to the sleep state between the performing of the composition coordinating thread 230 and the HW composer thread 240.
FIG. 4 illustrates an example timing diagram 400 depicting active periods for a device operating on a frame in a display pipeline, in accordance with one or more techniques of this disclosure. The example timing diagram 400 is similar to the timing diagram 200 of FIG. 2 and includes display-related threads 210, 220, 230, 240, 250 associated with the second state of the display pipeline (e.g., the display pipeline 100 of FIG. 1) to facilitate compositing a frame and for the presentment of the composited frame.
Similar to the timing diagram 200 of FIG. 2, the performing of the frame presentation starting thread 4 is associated with a duration 414 (e.g., comprising a transitioning duration 414a and a running duration 414b) , the performing of the composition signal processing thread 220 is associated with a duration 424 (e.g., comprising a transitioning duration 424a and a running duration 424b) , the performing of the composition coordinating thread 230 includes a first set of tasks associating with a duration 434 (e.g., comprising a transitioning duration 434a and a running duration 434b) , the performing of the HW composer thread 240 is associated with a duration 444, and the performing of the display driver thread 250 is associated with a duration 454 (e.g., comprising a transitioning duration 454a and a running duration 454b) . As described above, the adaptive scheduler 350 of FIG. 3 may enable synchronized scheduling, which may enable the thread scheduler 320 to schedule the performing of the composition coordinating thread 230 and the HW composer thread 240 to the same processing core 340. As shown in FIG. 4, the thread scheduler 320 may schedule the performing of the frame presentation starting thread 210 to a first processing core 340 (1) , may schedule the performing of the composition signal processing thread 220 to a second processing core 340 (2) , may schedule the performing of the composition coordinating thread 230 to a third processing core 340 (3) , may schedule the performing of the HW composer thread 240 to the third processing core 340 (3) , and may schedule the performing of the display driver thread 250 to a fourth processing core 340 (4) .
As a result, the performing of the HW composer thread 240 may be triggered at the completion of the first set of tasks associated with the composition coordinating thread 230 and the performing of the HW composer thread 240 may not include a transitioning duration as the respective processing core (e.g., the third processing core 340 (3) ) may not be operating in a sleep state when triggered. Similarly, the performing of the second set of tasks associated with the composition coordinating thread 230 may be triggered at the completion of the performing of the HW composer thread 240 and the performing of the second set of tasks may not include a transitioning duration as the respective processing core (e.g., the third processing core 340 (3) ) may not be operating in the sleep state when triggered.
In the illustrated example of FIG. 4, the duration 444 associated with the performing of the HW composer thread 240 does not include a transitioning duration (e.g., the duration 444 comprises only a running duration 444b) and the duration 436 associated with the performing of the second set of tasks of the composition coordinating thread 230 also does not include a transitioning duration (e.g., the duration 436 comprises only a running duration 436b) . Comparing the timing diagram 400 of FIG. 4 to the timing diagram 200 of FIG. 2, the timing diagram 400 eliminates (or reduces) the transitioning duration 244a associated with the performing of the HW composer thread 240 and also eliminates (or reduces) the transitioning duration 236a associated with the performing of the second set of tasks of the composition coordinating thread 230. As a result, in the illustrated example of FIG. 4, the enabling of the synchronized scheduling enables reducing the compositing period by 1.2ms (e.g., 0.6ms associated with the transitioning duration 244a and 0.6ms associated with the transitioning duration 236a) , which is greater than the calculated delta and, thus, the compositing period may be less than the frame rate window and a frame may be successfully displayed. That is, to enable the synchronized scheduling, the adaptive scheduler 350 first determined that the duration of the compositing period is greater than 0ms and less than 1ms (e.g., satisfies the latency threshold) and then, by reducing the compositing period by two transitioning durations (e.g., 1.2ms) , the adaptive scheduler 350 enabled the duration of the compositing period to be less than the frame rate window.
In some examples, when the calculated delta satisfies the frequency threshold, the adaptive scheduler 350 may determine that the difference in the compositing period and the frame rate window may not be reduced (e.g., to a negative value) by reducing (or eliminating) transitioning durations and may, instead, attempt to reduce the running duration of performing display-related threads during compositing. For example, the adaptive scheduler 350 may be configured to reduce the running duration of performing one or more of the display-related threads 210, 220, 230, 240, 250 by increasing the frequency at which one or more processing cores are performing the one or more of the display-related threads 210, 220, 230, 240, 250.
As described above, in some examples, the frequency governor 330 of FIG. 3 may be configured to set the frequency at which the processing cores 340 are operating based on the operating load of the processing cores 340. As a result, when the frequency governor 330 determines that the operating load satisfies an upper threshold (e.g., is greater than or equal to 90%) , the frequency governor 330 may increase the frequency of the processing cores 340 to a faster frequency level and when the frequency governor 330 determines that the operating load satisfies a lower threshold (e.g., is less than 90%) , the frequency governor 330 may decrease the frequency of the processing cores 340 to a lower frequency level.
In the illustrated example, when the adaptive scheduler 350 determines that the calculated delta satisfies the frequency threshold (e.g., the delta value is greater than 1ms and less than 2ms) , the adaptive scheduler 350 may determine to increase the frequency at which the processing cores 340 are operating based on the running durations of the display-related threads 210, 220, 230, 240, 250 and not based on the operating load of the processing cores 340. Thus, when the frequency at which the processing cores 340 are operating is increased from a first frequency level to a second frequency level that is faster than the first frequency level, the running durations for performing the display-related threads 210, 220, 230, 240, 250 may be reduced. For example, referring to the example timing diagram 200 of FIG. 2, if the cumulative running duration for performing the display-related threads 210, 220, 230, 240, 250 at 600MHz is 4ms, then the cumulative running duration for performing the display-related threads 210, 220, 230, 240, 250 at 1200MHz may be 2ms, resulting in an estimated savings of 2ms.
In the illustrated example, when the adaptive scheduler 350 determines to increase the frequency at which the processing cores 340 are operating from a first frequency level to a second frequency level, the adaptive scheduler 350 may determine the second frequency level based on duration savings estimated at operating at the second frequency level. For example, the adaptive scheduler 350 may apply equation 2 (below) to estimate the savings in duration when changing frequency from a first frequency level to a second frequency level.
Equation 2: Savings=Running
n- (Frequency
n/Frequency
n+1) *Running
n
In Equation 2, the variable “Running
n” represents the cumulative running duration at the first frequency level (e.g., the current frequency level) . The variable “Frequency
n” represents the first frequency level and the variable “Frequency
n+1” represents the second frequency level. By applying Equation 2 to the cumulative running duration and frequency levels in the above example, the adaptive scheduler 350 may estimate the duration savings as 2ms by changing the current frequency level from 600MHz to 1200MHz (e.g., 4ms – (600MHz /1200MHz) *4ms = 2ms) .
However, as described above, operating at faster frequency levels may consume more power and, thus, it may be beneficial to determine the second frequency level when different frequency levels are available. As described above, the first tier processing cores 340a may be configured to operate in one of a first set of frequency levels (e.g., 600MHz, 900MHz, 1200MHz, 1400MHz, and 1800MHz) . To facilitate reducing the cumulative running duration and conserving power consumption, the adaptive scheduler 350 may be configured to estimate a duration savings for operating at the different available frequency levels of the processing cores 340 and then select the second frequency level as the lowest frequency level that provides an estimated savings that reduces the duration of the composing period to be less than the frame rate window. For example, the adaptive scheduler 350 may be configured to select the lowest frequency level that is greater than the current frequency level that also provides an estimated savings of at least 2ms.
For example, with respect to the first tier processing cores 340a at a current frequency level of 600MHz, the adaptive scheduler 350 may determine whether operating at 900MHz provides an estimated savings of at least 2ms. If the adaptive scheduler 350 determines that operating at 900MHz does not provide an estimated savings of at least 2ms, the adaptive scheduler 350 may determine whether operating at 1200MHz provides an estimated savings of at least 2ms. In some examples, the adaptive scheduler 350 may continue traversing the frequency levels until an estimated savings of at least 2ms is identified.
After the adaptive scheduler 350 identifies a second frequency level that provides an estimated savings of at least 2ms, the adaptive scheduler 350 may then signal the second frequency level to the frequency governor 330. The example frequency governor 330 may then change the frequency at which the processing cores 340 are operating from the first frequency level to the second frequency level.
However, in some examples, the adaptive scheduler 350 may be unable to identify a second frequency level that provides an estimated savings of at least 2ms. As described above, the thread scheduler 320 may be configured to schedule the performing of the display-related threads 210, 220, 230, 240, 250 to the first tier processing cores 340a, which may be associated with a lower processing capacity than the second tier processing cores 340b, but may also be associated with lower power consumption than the second tier processing cores 340b. In the illustrated example, the first tier processing cores 340a and the second tier processing cores 340b may also be associated with different frequency levels. For example, the first tier processing cores 340a may be associated with a first set of frequency levels and the second tier processing cores 340b may be associated with a second set of frequency levels. In some examples, the first set of frequency levels may include five frequency levels (e.g., 600MHz, 900MHz, 1200MHz, 1400MHz, and 1800MHz) and the second set of frequency levels may include four frequency levels (e.g., 800MHz, 1000MHz, 1600MHz, and 2400MHz) .
In the illustrated example, when the adaptive scheduler 350 determines that the frequency levels associated with the first tier processing cores 340a are unable to provide an estimated savings of at least 2ms, the adaptive scheduler 350 may instruct the thread scheduler 320 to schedule the display-related threads 210, 220, 230, 240, 250 to the second tier processing cores 340b. The adaptive scheduler 350 may also determine the frequency level of the frequency levels associated with the second tier processing cores 340b that may provide an estimated savings of at least 2ms. The adaptive scheduler 350 may then signal to the determined frequency level to the frequency governor 330 to cause the frequency governor 330 to change the frequency at which the processing cores 340 are operating. The disclosed techniques enable the frequency governor 330 to change the frequency at which the processing cores 340 are operating from a first frequency level to a second frequency level based on estimated savings of operating at the second frequency level, rather than on an operating load while operating at the first frequency level.
In some examples, when the adaptive scheduler 350 determines that the calculated delta is greater than zero, does not satisfy the latency threshold, and also does not satisfy the frequency threshold (e.g., the delta value is greater than 2ms) , the adaptive scheduler 350 may be configured to instruct the thread scheduler 320 to schedule the display-related threads 210, 220, 230, 240, 250 to the second tier processing cores 340b. The adaptive scheduler 350 may also be configured to determine the frequency level at which the second tier processing cores 340b may operate. The adaptive scheduler 350 may then signal the determined frequency level to the frequency governor 330 so that the frequency governor 330 may change the frequency at which the second tier processing cores 340b are operating accordingly.
In some examples, the adaptive scheduler 350 may determine that scheduling the display-related threads 210, 220, 230, 240, 250 to be performed by the second tier processing cores 340b at the highest frequency level associated with the second tier processing cores 340b may not provide an estimated savings that reduces the duration of the compositing period to less than the frame rate window. In some such examples, the adaptive scheduler 350 may be configured to enable the corresponding frame to be dropped.
FIG. 5 illustrates an example flowchart 500 of an example method in accordance with one or more techniques of this disclosure. The method may be performed by an apparatus, such as the example device 300 of FIG. 3, a CPU, a GPU, a DPU, and/or a component of the device 300, such as the example application processor 302, the example composition coordinator 310, the example thread scheduler 320, the example frequency governor 330, the example processing cores 340, and/or the example adaptive scheduler 350.
At 502, the apparatus may calculate a delta based on a compositing period and a frame rate window, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4. For example, the adaptive scheduler 350 may be configured to apply Equation 1 (reproduced below) to calculate the delta.
Equation 1: dalta= (T2-T1) -1000/fps
At 504, the apparatus may determine whether the calculated delta satisfies a latency threshold, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4. For example, the adaptive scheduler 350 may be configured to determine whether the calculated delta is greater than 0ms and less than 1ms.
If, at 504, the apparatus determines that the calculated delta satisfies the latency threshold (e.g., the calculated delta value is greater than 0ms and less than 1ms) , then, at 506, the apparatus may enable synchronized scheduling for real-time threads, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4. For example, the adaptive scheduler 350 may be configured to instruct the thread scheduler 320 to enable scheduling the performing of the composition coordinating thread 230 and the HW composer thread 240 to a same processing core (e.g., the third processing core 340 (3) ) .
If, at 504, the apparatus determines that the calculated delta does not satisfy the latency threshold (e.g., the calculated delta is greater than or equal to 1ms) , then, at 508, the apparatus may determine whether the calculated delta satisfies a frequency threshold, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4. For example, the adaptive scheduler 350 may be configured to determine whether the calculated delta is greater than or equal to 1ms and less than 2ms.
If, at 508, the apparatus determines that the calculated delta does not satisfy the frequency threshold (e.g., the calculated delta value is greater than or equal to 2ms) , then control proceeds to 518 to schedule threads to higher capacity processing cores, such as the second tier processing cores 340b, as described above in connection with the examples in FIGs. 1, 2, 3, and/or 4.
If, at 508, the apparatus determines that the calculated delta satisfies the frequency threshold (e.g., the calculated delta value is greater than or equal to 1ms and less than 2ms) , then, at 510, the apparatus may estimate a savings at a faster frequency level, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4. For example, the adaptive scheduler 350 may be configured to apply equation 2 (reproduced below) to estimate the durations savings by performing the display-related threads 210, 220, 230, 240, 250 at a faster frequency level.
Equation 2: Savings=Running
n- (Frequency
n/Frequency
n+1) *Running
n
At 512, the apparatus may determine whether the estimated savings is greater than or equal to the calculated delta, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4. For example, the adaptive scheduler 350 may be configured to determine whether the estimated savings is greater than or equal to the delta value calculated at 502.
If, at 512, the apparatus determines that the estimated savings is greater than or equal to the calculated delta, then, at 514, the apparatus may set the new frequency level for the processing cores, as described in connection with the examples of FIGs. 1, 2, 3. and/or 4. For example, the adaptive scheduler 350 may be configured to signal the new frequency level to the frequency governor 330 to cause the frequency governor 330 to change the frequency at which the processing cores 340 are operating from a current (or first) frequency level to the new (or second) frequency level.
If, at 512, the apparatus determines that the estimated savings is not greater than or equal to the calculated delta (e.g., the estimated savings at the faster frequency level is less than the calculated delta) , then, at 516, the apparatus may determine whether another frequency level is available to process, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4. For example, the adaptive scheduler 350 may be configured to determine whether there is a faster frequency that the processing cores 340 may operate at to reduce the cumulative running duration associated with performing the display-related threads 210, 220, 230, 240, 250 of the display pipeline.
If, at 516, the apparatus determines that there is another frequency level to process, then control returns to 510 to estimate the savings at the next frequency level, as described above in connection with examples of FIGs. 1, 2, 3, and/or 4.
If, at 516, the apparatus determines that there is not another frequency level to process or, if, at 508, the apparatus determines that the calculated delta does not satisfy the frequency threshold (e.g., the calculated delta value is greater than or equal to 2ms) , then, at 518, the apparatus may schedule threads to higher capacity processing cores, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4. For example, the adaptive scheduler 350 may be configured to instruct the thread scheduler 320 to schedule the display-related threads 210, 220, 230, 240, 250 of the display pipeline to the second tier processing cores 340b of the processing cores 340 that are associated with the relatively higher processing capacity than the first tier processing cores 340a.
At 520, the apparatus may determine the frequency level for the higher capacity processing cores, as described in connection with the examples of FIGs. 1, 2, 3, and/or 4. For example, the adaptive scheduler 350 may be configured to signal to the frequency governor 330 a frequency level at which the second tier processing cores 340b may operate to cause the frequency governor 330 to change the frequency level associated with the second tier processing cores 340b, accordingly. In some examples, the adaptive scheduler 350 may be configured to apply Equation 2 (above) to determine the estimated savings at different frequency levels and select the frequency level that results in an estimated savings that is greater than the calculated delta.
FIG. 6 is a block diagram that illustrates an example content generation system 600 configured to implement one or more techniques of this disclosure. The content generation system 600 includes a device 604. The device 604 may include one or more components or circuits for performing various functions described herein. One or more aspects of the device 604 may be implemented by the example device 300 of FIG. 3. In some examples, one or more components of the device 604 may be components of an SOC. The device 604 may include one or more components configured to perform one or more techniques of this disclosure. In the example shown, the device 604 may include a processing unit 620 and a memory 624. In some examples, the device 604 can include a number of additional or alternative components, e.g., a communication interface 626, a transceiver 632, a receiver 628, a transmitter 630, and a display client 631.
The processing unit 620 may include an internal memory 621. The processing unit 620 may be configured to perform graphics processing, such as in a graphics processing pipeline 607. In some examples, the processing unit 620 may include a display processor to perform one or more display processing techniques on one or more frames generated by the processing unit 620 before presentment of the generated frame (s) by the display client 631. The display processor may be configured to perform display processing. For example, the display processor may be configured to perform one or more display processing techniques on one or more frames generated by the processing unit 620. The display processor may output image data to the display client 631 according to an interface protocol, such as, for example, the MIPI DSI (Mobile Industry Processor Interface, Display Serial Interface) .
The display client 631 may be configured to display or otherwise present frames processed by the processing unit 620 (and/or the display processor) . In some examples, the display client 631 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. One or more aspects of the display client 631 may be implemented by the display 170 of FIG. 1 and/or the display 390 of FIG. 3.
Reference to the display client 631 may refer to one or more displays. For example, the display client 631 may include a single display or multiple displays. The display client 631 may include a first display and a second display. In further examples, the results of the graphics processing may not be displayed on the device, e.g., the first and second displays 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.
Furthermore, as disclosed above, the display client 631 may be configured in accordance with MIPI DSI standards. The MIPI DSI standard supports a video mode and a command mode. In examples where the display client 631 is operating in video mode, the processing unit 620 (and/or the display processor) may continuously refresh the graphical content of the display client 631. For example, the entire graphical content may be refreshed per refresh cycle (e.g., line-by-line) .
In examples where the display client 631 is operating in command mode, the processing unit 620 (and/or the display processor) may write the graphical content of a frame to a buffer. In some such examples, the processing unit 620 (and/or the display processor) may not continuously refresh the graphical content of the display client 631. Instead, the processing unit 620 (and/or the display processor) may use a vertical synchronization (Vsync) pulse to coordinate rendering and consuming of graphical content at the buffer. For example, when a Vsync pulse is generated, the processing unit 620 (and/or the display processor) may output new graphical content to the buffer. Thus, the generating of the Vsync pulse may indicate when current graphical content at the buffer has been composited.
Memory external to the processing unit 620, such as memory 624, may be accessible to the processing unit 620. For example, the processing unit 620 may be configured to read from and/or write to external memory, such as the memory 624. The processing unit 620 may be communicatively coupled to the memory 624 over a bus. In some examples, the processing unit 620 and the memory 624 may be communicatively coupled to each other over the bus or a different connection.
In some examples, the device 604 may include a content encoder/decoder configured to receive graphical and/or display content from any source, such as the memory 624 and/or the communication interface 626. The memory 624 may be configured to store received encoded content or decoded content. In some examples, the content encoder/decoder may be configured to receive encoded content or decoded content (e.g., from the memory 624 and/or the communication interface 626) in the form of encoded pixel data. In some examples, the content encoder/decoder may be configured to encode or decode any content.
The internal memory 621 and/or the memory 624 may include one or more volatile or non-volatile memories or storage devices. In some examples, the internal memory 621 and/or the memory 624 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. One or more aspects of the internal memory 621 and/or the memory 624 may be implemented by the memory 370 of FIG. 3.
The internal memory 621 and/or the memory 624 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 the internal memory 621 and/or the memory 624 is non-movable or that its contents are static. As one example, the memory 624 may be removed from the device 604 and moved to another device. As another example, the memory 624 may not be removable from the device 604.
The processing unit 620 include a central processing unit (CPU) , an application processor, a graphics processing unit (GPU) , a graphics processor, a general purpose GPU (GPGPU) , a display processing unit (DPU) , a display processor, and/or any other processing unit that may be configured to perform display or graphics processing. One or more aspects of the processing unit 620 may be implemented by the application processor 302 and/or the graphics processor 380 of FIG. 3.
In some examples, the processing unit 620 may be integrated into a motherboard of the device 604. In some examples, the processing unit 620 may be present on a graphics card that is installed in a port in a motherboard of the device 604, or may be otherwise incorporated within a peripheral device configured to interoperate with the device 604. The processing unit 620 may include one or more processors, such as one or more microprocessors, CPUs, application processors, GPUs, graphics processors, DSPs, display processors, image signal processors (ISPs) , 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 620 may store instructions for the software in a suitable, non-transitory computer-readable storage medium, e.g., internal memory 621, 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 600 can include a communication interface 626. The communication interface 626 may include a receiver 628 and a transmitter 630. The receiver 628 may be configured to perform any receiving function described herein with respect to the device 604. Additionally, the receiver 628 may be configured to receive information (e.g., eye or head position information, rendering commands, or location information) from another device. The transmitter 630 may be configured to perform any transmitting function described herein with respect to the device 604. For example, the transmitter 630 may be configured to transmit information to another device, which may include a request for content. The receiver 628 and the transmitter 630 may be combined into a transceiver 632. In such examples, the transceiver 632 may be configured to perform any receiving function and/or transmitting function described herein with respect to the device 604.
In some examples, the graphical content from the processing unit 620 for display via the display client 631 may not be static and may be changing. Accordingly, the processing unit 620 (and/or the display processor) may periodically refresh the graphical content displayed via the display client 631. For example, the processing unit 620 (and/or the display processor) may periodically retrieve graphical content from the memory 624, where the graphical content may have been updated by the execution of an application (and/or the processing unit 620) that outputs the graphical content to the memory 624.
Referring again to FIG. 6, in some aspects, the processing unit 620 (and/or the application processor) may be configured to operate functions related to a display pipeline. In some examples, the processing unit 620 (and/or the application processor) may perform one or more adaptive scheduling techniques disclosed herein to facilitate reducing frame drops. For example, the processing unit 620 may include a determination component 698 configured to calculate a delta based on a compositing period associated with compositing a frame and a frame rate window associated with a display. The determination component 698 may also be configured to determine to perform a latency reducing mechanism that comprises synchronized scheduling based on the calculated delta. Additionally, the determination component 698 may be configured to perform the determined latency reducing mechanism to facilitate displaying the frame.
In some examples, the determination component 698 may be configured to calculate the delta by determining the compositing period based on a difference between a start time associated with performing compositing of the frame and a stop time associated with completing the compositing of the frame. The determination component 698 may also be configured to determine a difference between the compositing period and the frame rate window.
In some examples, the determination component 698 may be configured to determine to perform the latency reducing mechanism when the calculated delta is a positive value and satisfies a latency threshold. In some examples, the determination component 698 may be configured to perform the latency reducing mechanism that comprises synchronized scheduling by scheduling a first display-related thread and a second display-related thread of a plurality of display-related threads associated with displaying the frame to a same processing core, and where the second display-related thread is performed after the first display-related thread. In some examples, the processing core may be configured to operate in an active state after the performing of the first display-related thread is complete and before the performing of the second display-related thread. In some examples, operating in the active state after the performing of the first display-related thread is complete and before the performing of the second display-related thread may facilitate reducing a transitioning duration associated with the performing of the second display-related thread, where the transitioning duration may correspond to an interval between when the performing of the second display-related thread is triggered and when the performing of the second display-related thread is started.
In some examples, the determination component 698 may further be configured to determine to perform a frequency increasing mechanism when the calculated delta is a positive value and satisfies a frequency threshold. In some examples, the determination component 698 may be configured to perform the frequency increasing mechanism by estimating a cumulative running duration for performing a plurality of display-related threads associated with displaying the frame at a frequency associated with a first frequency level. The performing of the frequency increasing mechanism may also include the determination component 698 configured to estimate a duration savings for performing the plurality of display-related threads at a second frequency level that is faster than the first frequency level. Additionally, the determination component 698 may be configured to perform the frequency increasing mechanism by setting one or more processing cores to operate at a frequency associated with the second frequency level when the estimated duration savings is greater than the calculated delta. In some examples, the determination component 698 may be configured to estimate the duration savings based on the estimated cumulative running duration and a ratio of the frequency associated with the first frequency level and the frequency associated with the second frequency level. In some examples, the one or more processing cores scheduled to perform the plurality of display-related threads may be associated with a first tier of processing cores capable of operating at a first set of frequency levels. In some examples, the determination component 698 may be configured to perform the frequency increasing mechanism by determining that the calculated delta is greater than respective estimated duration savings for performing the plurality of display-related threads at each frequency level of the first set of frequency levels. The performing of the frequency increasing mechanism may also include the determination component 698 being configured to schedule the plurality of display-related threads to a second tier of processing cores capable of operating at a second set of frequency levels based on the determining, where the first tier of processing cores are associated with a lower processing capability than the second tier of processing cores. Additionally, the determination component 698 may be configured to perform the frequency increasing mechanism by selecting a frequency level of the second set of frequency levels for the second tier of processing cores.
As described herein, a device, such as the device 604, 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 CPU) , but, in further embodiments, can be performed using other components (e.g., an application processor or a GPU) , consistent with disclosed embodiments.
In one configuration, a method or apparatus for display or graphics processing is provided. The apparatus may be a processing unit, an application processor, a CPU, a display processor, a display processing unit (DPU) , a GPU, a graphics processor, a video processor, or some other processor that can perform display or graphics processing. In some examples, the apparatus may be the processing unit 620 within the device 604, or may be some other hardware within the device 604, or another device. For example, one or more aspects of the apparatus may be implemented by the device 300 of FIG. 3. The apparatus may include means for calculating a delta based on a compositing period associated with compositing a frame and a frame rate window associated with a display. The apparatus may also include means for determining to perform a latency reducing mechanism that comprises synchronized scheduling based on the calculated delta. The apparatus may also include means for performing the determined latency reducing mechanism to facilitate displaying the frame. The apparatus may also include means for determining the compositing period based on a difference between a start time associated with performing compositing of the frame and a stop time associated with completing the compositing of the frame. The apparatus may also include means for determining a difference between the compositing period and the frame rate window. The apparatus may also include means for determining to perform the latency reducing mechanism when the calculated delta is a positive value and satisfies a latency threshold. The apparatus may also include means for scheduling a first display-related thread and a second display-related thread of a plurality of display-related threads associated with displaying the frame to a same processing core, and where the second display-related thread is performed after the first display-related thread. The apparatus may also include means for determining to perform a frequency increasing mechanism when the calculated delta is a positive value and satisfies a frequency threshold. The apparatus may also include means for estimating a cumulative running duration for performing a plurality of display-related threads associated with displaying the frame at a frequency associated with a first frequency level. The apparatus may also include means for estimating a duration savings for performing the plurality of display-related threads at a second frequency level that is faster than the first frequency level. The apparatus may also include means for setting one or more processing cores to operate at a frequency associated with the second frequency level when the estimated duration savings is greater than the calculated delta. The apparatus may also include means for determining that the calculated delta is greater than respective estimated duration savings for performing the plurality of display-related threads at each frequency level of the first set of frequency levels. The apparatus may also include means for scheduling the plurality of display-related threads to a second tier of processing cores capable of operating at a second set of frequency levels based on the determining, where the first tier of processing cores are associated with a lower processing capability than the second tier of processing cores. The apparatus may also include means for selecting a frequency level of the second set of frequency levels for the second tier of processing cores.
The subject matter described herein can be implemented to realize one or more benefits or advantages. For instance, the described display and/or graphics processing techniques can be used by an application processor, a CPU, a DPU, a GPU, or a video processor or some other processor that can perform display and/or graphics processing to implement the reducing of frame drops during compositing via adaptive scheduling techniques and/or reduce the load of a processing unit (e.g., any processing unit configured to perform one or more techniques disclosed herein, such as a CPU, a GPU, a DPU, and the like) . In general, examples disclosed herein provide techniques for reducing frame drops during compositing by employing one or more adaptive scheduling techniques.
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 (21)
- A method for performing display processing, comprising:calculating a delta based on a compositing period associated with compositing a frame and a frame rate window associated with a display;determining to perform a latency reducing mechanism that comprises synchronized scheduling based on the calculated delta; andperforming the determined latency reducing mechanism to facilitate displaying the frame.
- The method of claim 1, wherein calculating the delta comprises:determining the compositing period based on a difference between a start time associated with performing compositing of the frame and a stop time associated with completing the compositing of the frame; anddetermining a difference between the compositing period and the frame rate window.
- The method of claim 1, further comprising determining to perform the latency reducing mechanism when the calculated delta is a positive value and satisfies a latency threshold.
- The method of claim 3, wherein performing the latency reducing mechanism that comprises synchronized scheduling includes scheduling a first display-related thread and a second display-related thread of a plurality of display-related threads associated with displaying the frame to a same processing core, and wherein the second display-related thread is performed after the first display-related thread.
- The method of claim 4, wherein the processing core is configured to operate in an active state after the performing of the first display-related thread is complete and before the performing of the second display-related thread.
- The method of claim 5, wherein operating in the active state after the performing of the first display-related thread is complete and before the performing of the second display-related thread facilitates reducing a transitioning duration associated with the performing of the second display-related thread, wherein the transitioning duration corresponds to an interval between when the performing of the second display-related thread is triggered and when the performing of the second display-related thread is started.
- The method of claim 1, further comprising determining to perform a frequency increasing mechanism when the calculated delta is a positive value and satisfies a frequency threshold.
- The method of claim 7, wherein performing the frequency increasing mechanism comprises:estimating a cumulative running duration for performing a plurality of display-related threads associated with displaying the frame at a frequency associated with a first frequency level;estimating a duration savings for performing the plurality of display-related threads at a second frequency level that is faster than the first frequency level; andsetting one or more processing cores to operate at a frequency associated with the second frequency level when the estimated duration savings is greater than the calculated delta.
- The method of claim 8, wherein estimating the duration savings is based on the estimated cumulative running duration and a ratio of the frequency associated with the first frequency level and the frequency associated with the second frequency level.
- The method of claim 8, wherein the one or more processing cores scheduled to perform the plurality of display-related threads are associated with a first tier of processing cores capable of operating at a first set of frequency levels, and wherein the performing of the frequency increasing mechanism further comprises:determining that the calculated delta is greater than respective estimated duration savings for performing the plurality of display-related threads at each frequency level of the first set of frequency levels;scheduling the plurality of display-related threads to a second tier of processing cores capable of operating at a second set of frequency levels based on the determining, wherein the first tier of processing cores are associated with a lower processing capability than the second tier of processing cores; andselecting a frequency level of the second set of frequency levels for the second tier of processing cores.
- An apparatus for performing display processing, comprising:a memory; andat least one processor coupled to the memory and configured to:calculate a delta based on a compositing period associated with compositing a frame and a frame rate window associated with a display;determine to perform a latency reducing mechanism that comprises synchronized scheduling based on the calculated delta; andperform the determined latency reducing mechanism to facilitate displaying the frame.
- The apparatus of claim 11, wherein the at least one processor is configured to calculate the delta by:determining the compositing period based on a difference between a start time associated with performing compositing of the frame and a stop time associated with completing the compositing of the frame; anddetermining a difference between the compositing period and the frame rate window.
- The apparatus of claim 11, wherein the at least one processor is configured to determine to perform the latency reducing mechanism when the calculated delta is a positive value and satisfies a latency threshold.
- The apparatus of claim 13, wherein the at least one processor is configured to perform the latency reducing mechanism that comprises synchronized scheduling by scheduling a first display-related thread and a second display-related thread of a plurality of display-related threads associated with displaying the frame to a same processing core, and wherein the second display-related thread is performed after the first display-related thread.
- The apparatus of claim 14, wherein the processing core is configured to operate in an active state after the performing of the first display-related thread is complete and before the performing of the second display-related thread.
- The apparatus of claim 11, wherein the at least one processor is further configured to determine to perform a frequency increasing mechanism when the calculated delta is a positive value and satisfies a frequency threshold.
- The apparatus of claim 16, wherein the at least one processor is configured to perform the frequency increasing mechanism by:estimating a cumulative running duration for performing a plurality of display-related threads associated with displaying the frame at a frequency associated with a first frequency level;estimating a duration savings for performing the plurality of display-related threads at a second frequency level that is faster than the first frequency level; andsetting one or more processing cores to operate at a frequency associated with the second frequency level when the estimated duration savings is greater than the calculated delta.
- The apparatus of claim 17, wherein the at least one processor is configured to estimate the duration savings based on the estimated cumulative running duration and a ratio of the frequency associated with the first frequency level and the frequency associated with the second frequency level.
- The apparatus of claim 17, wherein the one or more processing cores scheduled to perform the plurality of display-related threads are associated with a first tier of processing cores capable of operating at a first set of frequency levels, and wherein the at least one processor is configured to perform the frequency increasing mechanism by:determining that the calculated delta is greater than respective estimated duration savings for performing the plurality of display-related threads at each frequency level of the first set of frequency levels;scheduling the plurality of display-related threads to a second tier of processing cores capable of operating at a second set of frequency levels based on the determining, wherein the first tier of processing cores are associated with a lower processing capability than the second tier of processing cores; andselecting a frequency level of the second set of frequency levels for the second tier of processing cores.
- The apparatus of claim 11, wherein the apparatus comprises a wireless communication device.
- A non-transitory computer-readable medium storing computer executable code for display processing, comprising code to:calculate a delta based on a compositing period associated with compositing a frame and a frame rate window associated with a display;determine to perform a latency reducing mechanism that comprises synchronized scheduling based on the calculated delta; andperform the determined latency reducing mechanism to facilitate displaying the frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/095393 WO2021248370A1 (en) | 2020-06-10 | 2020-06-10 | Methods and apparatus for reducing frame drop via adaptive scheduling |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/095393 WO2021248370A1 (en) | 2020-06-10 | 2020-06-10 | Methods and apparatus for reducing frame drop via adaptive scheduling |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021248370A1 true WO2021248370A1 (en) | 2021-12-16 |
Family
ID=78846701
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/095393 WO2021248370A1 (en) | 2020-06-10 | 2020-06-10 | Methods and apparatus for reducing frame drop via adaptive scheduling |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2021248370A1 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160247484A1 (en) * | 2013-11-06 | 2016-08-25 | Huawei Device Co., Ltd. | Method for Generating Display Frame and Terminal Device |
WO2017030735A1 (en) * | 2015-08-20 | 2017-02-23 | Qualcomm Incorporated | Refresh rate matching with predictive time-shift compensation |
CN106936995A (en) * | 2017-03-10 | 2017-07-07 | 广东欧珀移动通信有限公司 | A kind of control method of mobile terminal frame per second, device and mobile terminal |
CN110503708A (en) * | 2019-07-03 | 2019-11-26 | 华为技术有限公司 | A kind of image processing method and electronic equipment based on vertical synchronizing signal |
CN110609645A (en) * | 2019-06-25 | 2019-12-24 | 华为技术有限公司 | Control method based on vertical synchronization signal and electronic equipment |
-
2020
- 2020-06-10 WO PCT/CN2020/095393 patent/WO2021248370A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160247484A1 (en) * | 2013-11-06 | 2016-08-25 | Huawei Device Co., Ltd. | Method for Generating Display Frame and Terminal Device |
WO2017030735A1 (en) * | 2015-08-20 | 2017-02-23 | Qualcomm Incorporated | Refresh rate matching with predictive time-shift compensation |
CN106936995A (en) * | 2017-03-10 | 2017-07-07 | 广东欧珀移动通信有限公司 | A kind of control method of mobile terminal frame per second, device and mobile terminal |
CN110609645A (en) * | 2019-06-25 | 2019-12-24 | 华为技术有限公司 | Control method based on vertical synchronization signal and electronic equipment |
CN110503708A (en) * | 2019-07-03 | 2019-11-26 | 华为技术有限公司 | A kind of image processing method and electronic equipment based on vertical synchronizing signal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7397478B2 (en) | Various apparatuses and methods for switching between buffers using a video frame buffer flip queue | |
US20170053620A1 (en) | Refresh rate matching with predictive time-shift compensation | |
US20230073736A1 (en) | Reduced display processing unit transfer time to compensate for delayed graphics processing unit render time | |
WO2021000220A1 (en) | Methods and apparatus for dynamic jank reduction | |
US20240242690A1 (en) | Software vsync filtering | |
WO2021151228A1 (en) | Methods and apparatus for adaptive frame headroom | |
US20230335049A1 (en) | Display panel fps switching | |
US20230074876A1 (en) | Delaying dsi clock change based on frame update to provide smoother user interface experience | |
WO2021248370A1 (en) | Methods and apparatus for reducing frame drop via adaptive scheduling | |
US20220013087A1 (en) | Methods and apparatus for display processor enhancement | |
US20210358079A1 (en) | Methods and apparatus for adaptive rendering | |
US11847995B2 (en) | Video data processing based on sampling rate | |
WO2021056364A1 (en) | Methods and apparatus to facilitate frame per second rate switching via touch event signals | |
WO2021096883A1 (en) | Methods and apparatus for adaptive display frame scheduling | |
US11990082B2 (en) | Adaptively configuring image data transfer time | |
WO2021000226A1 (en) | Methods and apparatus for optimizing frame response | |
WO2021142780A1 (en) | Methods and apparatus for reducing frame latency | |
WO2021034831A1 (en) | Methods and apparatus for refreshing multiple displays | |
WO2023230744A1 (en) | Display driver thread run-time scheduling | |
WO2021196175A1 (en) | Methods and apparatus for clock frequency adjustment based on frame latency | |
WO2021232328A1 (en) | Methods and apparatus for tickless pre-rendering | |
US20240169953A1 (en) | Display processing unit (dpu) pixel rate based on display region of interest (roi) geometry | |
US12045910B2 (en) | Technique to optimize power and performance of XR workload | |
WO2023136984A1 (en) | Dpu driven adaptive sync for command mode panels | |
WO2021042331A1 (en) | Methods and apparatus for graphics and display pipeline management |
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: 20940339 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: 20940339 Country of ref document: EP Kind code of ref document: A1 |