WO2023160194A1 - 控制屏幕刷新率动态变化的方法及电子设备 - Google Patents

控制屏幕刷新率动态变化的方法及电子设备 Download PDF

Info

Publication number
WO2023160194A1
WO2023160194A1 PCT/CN2022/141110 CN2022141110W WO2023160194A1 WO 2023160194 A1 WO2023160194 A1 WO 2023160194A1 CN 2022141110 W CN2022141110 W CN 2022141110W WO 2023160194 A1 WO2023160194 A1 WO 2023160194A1
Authority
WO
WIPO (PCT)
Prior art keywords
refresh rate
screen
display
ddic
period
Prior art date
Application number
PCT/CN2022/141110
Other languages
English (en)
French (fr)
Inventor
张凯
周健
李时进
蔡立峰
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Priority to US18/275,305 priority Critical patent/US20240185775A1/en
Priority to EP22919271.1A priority patent/EP4266302A1/en
Publication of WO2023160194A1 publication Critical patent/WO2023160194A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/22Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
    • G09G3/30Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
    • G09G3/32Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]
    • G09G3/3208Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED] organic, e.g. using organic light-emitting diodes [OLED]
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/2092Details of a display terminals using a flat panel, the details relating to the control arrangement of the display terminal and to the interfaces thereto
    • G09G3/2096Details of the interface to the display terminal specific for a flat panel
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/18Timing circuits for raster scan displays
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/36Control 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/39Control of the bit-mapped memory
    • G09G5/393Arrangements for updating the contents of the bit-mapped memory
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2320/00Control of display operating conditions
    • G09G2320/10Special adaptations of display systems for operation with variable images
    • G09G2320/103Detection of image changes, e.g. determination of an index representative of the image change
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2330/00Aspects of power supply; Aspects of display protection and defect management
    • G09G2330/02Details of power systems and of start or stop of display operation
    • G09G2330/021Power management, e.g. power saving
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2330/00Aspects of power supply; Aspects of display protection and defect management
    • G09G2330/02Details of power systems and of start or stop of display operation
    • G09G2330/021Power management, e.g. power saving
    • G09G2330/023Power management, e.g. power saving using energy recovery or conservation
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/04Changes in size, position or resolution of an image
    • G09G2340/0407Resolution change, inclusive of the use of different resolutions for different screen areas
    • G09G2340/0435Change or adaptation of the frame rate of the video stream

Definitions

  • the present application relates to the field of display technology, in particular to a method for controlling dynamic changes in screen refresh rate and electronic equipment.
  • the electronic device senses a dynamic display scene, it can switch the current screen refresh rate to a higher screen refresh rate to meet the high frame rate display requirement of the dynamic display scene. At this time, if the delay when switching the screen refresh rate is long, dislocation and tearing of the screen will occur at this time, and the user will also feel that the screen is stuck.
  • the present application provides a method and electronic equipment for controlling the dynamic change of the screen refresh rate, which solves the phenomenon of tearing of the screen and the problem of screen tearing due to the long delay when the screen refresh rate is switched when the screen refresh rate dynamically changes in the prior art. Carton's problem.
  • the present application provides a method for controlling the dynamic change of the screen refresh rate, which is applied to an electronic device, and the electronic device includes a display driver integrated chip DDIC, and the method includes:
  • a screen refresh rate switching instruction is generated, the screen refresh rate switching instruction is used to instruct the display screen to switch from the current first screen refresh rate to a second screen refresh rate, and the second screen refresh rate is The screen refresh rate corresponding to the first scene category;
  • the image display period is switched from the first Vsync period to the second Vsync period, the first Vsync period corresponds to the first screen refresh rate, and the second Vsync The period corresponds to the second screen refresh rate.
  • the refresh rate can be issued immediately (for example, through the newly added refresh rate setting interface) within the current i-th frame period switch command.
  • DDIC After DDIC receives the refresh rate switching command, it drives the display (such as OLED) to switch the screen refresh rate, and then DDIC returns a new TE signal. After receiving the new TE signal, SurfaceFlinger enables the screen refresh rate corresponding to the switched screen. New Vsync period.
  • the embodiment of the present application can increase the switching speed of the screen refresh rate by adding a new channel. For example, each switching of the screen refresh rate can be guaranteed to be completed within 1 frame, reducing the delay and avoiding the picture freeze phenomenon to a certain extent.
  • the electronic device further includes a refresh rate setting interface; the method further includes: within the current frame period, issuing the screen refresh rate switching instruction by calling the refresh rate setting interface .
  • the method further includes: the DDIC controls the display screen to perform refresh display at the second screen refresh rate according to the screen refresh rate switching instruction.
  • the method further includes: the DDIC generates a TE signal, and the TE signal is used to indicate that the image sending and display cycle has been switched to the second Vsync period.
  • the electronic device further includes a SurfaceFlinger; after the DDIC generates the TE signal, the method further includes: the DDIC reports the TE signal to the SurfaceFlinger.
  • the switching the image sending and display period from the first Vsync period to the second Vsync period includes: the SurfaceFlinger switching the image sending and display period from the first Vsync period to the second Vsync period Vsync period.
  • the SurfaceFlinger switches the image sending and display period from the first Vsync period to the second Vsync period, including: the SurfaceFlinger switches the image sending and display period from the first Vsync period to the second Vsync period according to the TE signal A Vsync period is switched to the second Vsync period.
  • the method further includes: the SurfaceFlinger sends and displays the image according to the second Vsync period.
  • the method before generating the screen refresh rate switching instruction according to the scene recognition result, the method further includes: the SurfaceFlinger sending and displaying images according to the first Vsync cycle.
  • the electronic device further includes a display driver and a hardware synthesizer HWC; wherein the DDIC reports the TE signal to the SurfaceFlinger, including: the DDIC reports the TE signal to the display driver TE signal; the driver display reports the TE signal to the HWC; the HWC reports the TE signal to the SurfaceFlinger.
  • the electronic device further includes a refresh rate decision module; in the current frame period, sending the screen refresh rate switching instruction to the DDIC by calling the refresh rate setting interface includes : The refresh rate decision module calls the refresh rate setting interface within the current frame period, and sends the screen refresh rate switching instruction to the DDIC.
  • the refresh rate decision module calls the refresh rate setting interface within the current frame period, and sends the screen refresh rate switching instruction to the DDIC, including: the refresh rate decision During the current frame period, the module sends the screen refresh rate switching instruction to the display driver by calling the refresh rate setting interface; the display driver sends the screen refresh rate switching instruction to the DDIC.
  • the generating the screen refresh rate switching instruction according to the scene recognition result includes: the refresh rate decision module generating the screen refresh rate switching instruction according to the scene recognition result.
  • the generating the screen refresh rate switching instruction according to the scene recognition result includes: when the scene recognition result indicates that the current scene changes to a static display scene, generating the screen refresh rate switching instruction, wherein The second screen refresh rate after switching is lower than the current first screen refresh rate; or, when the scene recognition result indicates that the current scene changes to a dynamic display scene, generate the screen refresh rate switching instruction, wherein the switched first screen refresh rate The refresh rate of the second screen is higher than the current refresh rate of the first screen.
  • the method further includes: determining the second Vsync period according to the second screen refresh rate.
  • the above-mentioned determination of the second Vsync period according to the second screen refresh rate includes: when the second screen refresh rate is R Hz, determining that the second Vsync period is 1000 /R milliseconds.
  • the refresh rate of the second screen is any one of the following: 1 Hz, 10 Hz, 30 Hz, 40 Hz, 60 Hz, 90 Hz, and 120 Hz.
  • the display screen is an organic light emitting diode (OLED) display screen.
  • OLED organic light emitting diode
  • the present application provides an apparatus for controlling a dynamic change of a screen refresh rate, and the apparatus includes a unit for performing the method in the first aspect above.
  • the device may correspond to executing the method described in the first aspect above.
  • the units in the device please refer to the description in the first aspect above, and details are not repeated here for brevity.
  • Hardware or software includes one or more modules or units corresponding to the functions described above. For example, a processing module or unit, a display module or unit, etc.
  • the present application provides an electronic device, the electronic device includes a processor, the processor is coupled with a memory, the memory is used to store computer programs or instructions, and the processor is used to execute the computer programs or instructions stored in the memory, so that the first The methods in the aspect are executed.
  • the processor is used to execute the computer programs or instructions stored in the memory, so that the apparatus performs the method in the first aspect.
  • the processor is a display driver integrated chip DDIC
  • the DDIC is applied to the display screen
  • the DDIC is used to execute the computer programs or instructions stored in the memory, so as to execute the method in the first aspect.
  • the present application provides a computer-readable storage medium on which is stored a computer program (also referred to as an instruction or code) for implementing the method in the first aspect.
  • a computer program also referred to as an instruction or code
  • the computer when the computer program is executed by a computer, the computer can execute the method in the first aspect.
  • the present application provides a chip, including a processor.
  • the processor is used to read and execute the computer program stored in the memory, so as to execute the method in the first aspect and any possible implementation manners thereof.
  • the chip further includes a memory, and the memory is connected to the processor through a circuit or wires.
  • the present application provides a chip system, including a processor.
  • the processor is used to read and execute the computer program stored in the memory, so as to execute the method in the first aspect and any possible implementation manners thereof.
  • the chip system further includes a memory, and the memory is connected to the processor through a circuit or wires.
  • the present application provides a computer program product
  • the computer program product includes a computer program (also referred to as an instruction or code), and when the computer program is executed by an electronic device, the electronic device implements the computer program described in the first aspect.
  • FIG. 1 is a schematic flow diagram of sending and displaying images provided by an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of the software architecture of the method for controlling the dynamic change of the screen refresh rate provided by the embodiment of the present application;
  • FIG. 4 is a schematic diagram of the improved software architecture applied to the method for controlling the dynamic change of the screen refresh rate provided by the embodiment of the present application;
  • FIG. 5 is a schematic flowchart of a method for controlling a dynamic change of a screen refresh rate provided by an embodiment of the present application
  • FIG. 6 is a schematic flowchart of an improved method for controlling a dynamic change in screen refresh rate provided by an embodiment of the present application
  • FIG. 7 is a schematic diagram of the effect of the improved method for controlling the dynamic change of the screen refresh rate provided by the embodiment of the present application compared with the Android native flow method.
  • UI user interface
  • the term "user interface (UI)” in the following embodiments of this application is a medium interface for interaction and information exchange between an application program or an operating system and a user, and it realizes the difference between the internal form of information and the form acceptable to the user. conversion between.
  • the user interface is the source code written in a specific computer language such as java and extensible markup language (XML).
  • the source code of the interface is parsed and rendered on the electronic device, and finally presented as content that can be recognized by the user.
  • the commonly used form of user interface is the graphical user interface (graphic user interface, GUI), which refers to the user interface related to computer operation displayed in a graphical way. It may be text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, Widgets, and other visible interface elements displayed on the display screen of the electronic device.
  • Frame rate also known as frame rate
  • the unit is the number of frames per second, denoted as FPS.
  • the frame rate refers to the number of picture frames generated by the graphics card (ie GPU) per second, that is to say, the number of pictures that the graphics card (ie GPU) can render and send for display per second.
  • the frame rate may be 30FPS or 60FPS.
  • the screen refresh rate is the number of times the screen can refresh the screen per second, and the unit is Hertz (Hz).
  • Hz Hertz
  • a 60Hz screen means that a screen can refresh 60 times in 1 second.
  • a 120Hz screen means that a screen can refresh the display 120 times in 1 second, so the higher the refresh rate, the more frames the screen can display.
  • the lower the picture delay the higher the fluency.
  • a scene also called a dynamic display scene
  • the refresh rate and the frame rate of the display are not synchronized, for example, when the number of frames per second is high (such as 90FPS or 120FPS), and in the case of a low refresh rate (such as 30Hz), there will be picture freezing, and even a tearing effect (tearing effect, TE) of dislocation of the screen picture.
  • this situation most often occurs in dynamic display scenes (such as games) with a frame rate of 60 frames per second or higher.
  • VSync Vertical synchronization
  • the frequency conversion display mode of the display screen means that the screen of the electronic device can support the dynamic switching of the refresh rate within a certain range, for example, switching between 1Hz and 120Hz, which supports the refresh rate in the process of each dynamic display scene in the electronic device system Dynamic changes provide basic physical conditions, which can achieve more extreme power saving effects.
  • the image drawing and display process needs to be completed through the cooperation of the software side, display driver integrated circuit (DDIC) and the display screen.
  • DDIC display driver integrated circuit
  • the page is refreshed first through the application program (application, App), and then the drawn layers are synthesized through SurfaceFlinger to obtain image data, and then the image data passes through the HWC and the display driver, and then through the mobile industry processor interface (mobile industry processor interface, MIPI) sends image data to display (write) DDIC.
  • application application, App
  • MIPI mobile industry processor interface
  • the DDIC stores the image data sent by the software side in the buffer, and controls the display (such as OLED or LCD) to complete the refresh rate switching by scanning (reading) the image data in the buffer, and the display performs image processing. Refresh the display.
  • the software side generates image data at high frequency, and accordingly, the display side performs high-frequency image refresh according to the image data, thereby improving the fluency of the screen.
  • the DDIC can output the TE signal according to the Vsync period.
  • the TE signal is used to instruct the software side to send image data.
  • the software side monitors the rising edge of the TE signal or the TE signal high. Level, and when the next frame of image data is ready, it sends the next frame of image data to DDIC.
  • the layer drawing and rendering performed by the App and the layer composition performed by SurfaceFlinger are controlled by the Vsync cycle.
  • the Vsync cycle determines the changes in the screen presented on the screen after the user clicks or slides on the screen. Speed, both App and SurfaceFlinger must perform layer drawing operations after receiving TE signals.
  • a higher screen refresh rate is required in various dynamic display scenarios.
  • the electronic device senses a dynamic display scene, it can switch the current screen refresh rate to a higher screen refresh rate to meet the high frame rate display requirement of the dynamic display scene.
  • the delay when switching the screen refresh rate is long, the screen image will still be dislocated and torn at this time, and the user will also feel that the screen freezes.
  • the embodiments of the present application provide a method for controlling a dynamic change of a screen refresh rate and an electronic device to improve user experience by improving the bottom layer of the mobile phone system.
  • the electronic device provided by the present application will be exemplarily described in conjunction with specific embodiments.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a touch sensor 180K, and an ambient light sensor 180L.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU) wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. For example, the processor 110 is configured to execute the method for detecting ambient light in the embodiment of the present application.
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel may use an organic light-emitting diode (OLED).
  • OLED organic light-emitting diode
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the electronic device 100 may include a refresh rate decision module, and the refresh rate decision module is used to realize the function of dynamically changing the refresh rate.
  • the electronic device can be a portable terminal device equipped with iOS, Android, Microsoft or other operating systems, such as a mobile phone, a tablet computer, a wearable device, etc., or a laptop computer (Laptop) with a touch-sensitive surface or a touch panel, Non-portable terminal devices such as desktop computers with touch-sensitive surfaces or touch panels.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • the embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .
  • FIG. 3 is a software structural block diagram of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are applications, application framework, hardware abstract layer (HAL) and kernel layer (applications) from top to bottom. kernel).
  • the application layer can consist of a series of application packages.
  • the application program may be referred to as an application for short.
  • the application layer may include an e-book application, a video application, a navigation application, a game application, a sliding animation application, etc., which are not limited in this embodiment of the present application.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a refresh rate decision module and a SurfaceFlinger module.
  • the refresh rate decision module can notify the SurfaceFlinger module of the latest refresh rate, send the refresh rate to the display driver through the SurfaceFlinger module, and then send it to the DDIC through the display driver, and then the DDIC controls the display to perform image refresh display at the refresh rate.
  • the application framework layer may further include a situation awareness module, a refresh rate decision module, and the like.
  • the situational awareness module operates permanently or with low power consumption, and has the ability to perceive external facts or environments.
  • the situational awareness module can detect related events and obtain the state of the event from the application program of the application layer or the hardware abstraction layer or the kernel layer through the application programming interface (application programming interface, API), such as detecting Bluetooth connection, network connection, etc.
  • the main function of the context awareness module is to monitor whether a dynamic event occurs, that is, to judge whether the current application scene is a dynamic display scene according to the click operation or sliding operation triggered by the user, and the context awareness module notifies the business logic processing module of the occurrence Animate the scene.
  • the business logic processing module (such as: calculation engine) has business logic processing capability and can be used to determine the screen refresh rate suitable for the dynamic display scene according to the type of the dynamic display scene. Furthermore, the business logic processing module switches the current screen refresh rate to a screen refresh rate suitable for the dynamic display scene, so as to realize dynamic change of screen resolution.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application program layer and the application program framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least the display driver.
  • the involved hardware may include a display driver integrated circuit (DDIC) and a display screen (such as OLED or LCD).
  • the display driver is used to drive the DDIC to complete the processing and realization of the display.
  • the hardware abstraction layer can include a hardware composition module (hwcomposer, HWC).
  • HWC has the function or ability to use hardware to complete image data combination and display.
  • the specific image display can be completed by multiple classes such as SurfaceFlinger, HWC, and display (panel). .
  • HWC is a HAL layer module that performs window/layer (layer) synthesis and display in the Android system. Its implementation is device-specific and is usually completed by the display device manufacturer (OEM) to provide hardware support for the SurfaceFlinger service.
  • OEM display device manufacturer
  • SurfaceFlinger provides all soft layer information to HWC, and asks HWC how to handle it. Further, the HWC decides whether to use the hardware layer compositor or the GPU composite according to the hardware performance; for example, the HWC will mark the compositing method for each layer, whether it is composited by GPU or by HWC. On the one hand, SurfaceFlinger processes the soft layers that need to be synthesized by GPU, and submits the results to HWC for display; on the other hand, the soft layers that need to be synthesized by the hardware layer synthesizer are processed by HWC itself.
  • SurfaceFlinger can use 3D graphics processing libraries (such as OpenGL ES) to composite layers, which requires and consumes GPU resources.
  • 3D graphics processing libraries such as OpenGL ES
  • Most GPUs are not optimized for layer compositing, and applications cannot use the GPU for their own rendering when SurfaceFlinger composites layers through the GPU.
  • HWC performs layer composition through hardware devices, which can reduce the composition pressure of GPU.
  • HWC is more efficient than GPU, for example: when nothing changes on the screen, especially when the overlay has transparent pixels and layer transparent pixel blending is required.
  • HWC can require some or all of the overlay layers to be synthesized by GPU, and then HWC holds the synthesized result buffer (buffer). If SurfaceFlinger requires the same overlay layer list to be synthesized, HWC can directly display the previously synthesized Result Buffer, which helps improve battery life on standby devices.
  • HWC also provides VSync events for managing rendering and layer composition timing.
  • the switching process of the screen refresh rate includes the following steps: the refresh rate decision module first notifies SurfaceFlinger of the refresh rate switching command, and then sends the refresh rate switching command through SurfaceFlinger to the HWC and then to the display driver , the display driver notifies the DDIC to switch to the target refresh rate after receiving the refresh rate switching command, the DDIC drives the display (such as OLED or LCD) to complete the refresh rate switching, and then the DDIC returns a new TE signal to the display driver, and the display driver reports the new TE signal, then SurfaceFlinger receives the new TE signal, and notifies the APP to switch to the new refresh rate, so that both the App and SurfaceFlinger must perform the layer drawing operation after receiving the TE signal.
  • the refresh rate decision module first notifies SurfaceFlinger of the refresh rate switching command, and then sends the refresh rate switching command through SurfaceFlinger to the HWC and then to the display driver
  • the display driver notifies the DDIC to switch to the target refresh rate after receiving the refresh rate switching command
  • the DDIC drives the display (such as
  • FIG. 4 is a block diagram of an improved software structure of the electronic device 100 provided by the embodiment of the present application, and shows a schematic diagram of the improved system-level interaction of the embodiment of the present application.
  • the improved solution can increase the dynamic change rate of the screen refresh rate, and avoid the tearing effect in the above dynamic display scene.
  • the solution of the present application adds a new path on the basis of the software architecture shown in FIG. 3 , and uses the display refresh rate setting interface (displaySetFps) in the added path to realize the issuance of the refresh rate switching command.
  • the refresh rate decision module may directly send the refresh rate switching instruction to the display driver through the displaySetFps module.
  • the refresh rate switching command in Figure 4 no longer sends the refresh rate switching command through SurfaceFlinger.
  • the refresh rate switching command is issued to the display driver (or HWC) immediately within the current i-th frame period. Then, the display driver notifies the DDIC to switch to the target refresh rate after receiving the refresh rate switching instruction in the i-th frame period, and the DDIC drives the display screen (such as OLED or LCD) to complete the refresh rate switching. After the refresh rate of the DDIC at the bottom of the hardware is successfully switched, the frame rate of the upper SurfaceFlinger needs to be switched along with it.
  • the DDIC can report the TE signal to the upper layer to instruct the upper layer to switch to a new frame rate, that is, send the display image according to the new Vsync cycle.
  • the DDIC returns a new TE signal (corresponding to the second Vsync period, eg 11 ms) to the display driver; then the display driver reports the new TE signal.
  • SurfaceFlinger sets the Vsync period to the second Vsync period after receiving a new TE signal. In this way, SurfaceFlinger can subsequently issue refresh rate switching instructions according to the second Vsync cycle.
  • the embodiment of the present application can increase the switching speed of the screen refresh rate by adding a new channel, quickly complete the switching of the screen refresh rate, reduce the delay, and avoid the picture freeze phenomenon to a certain extent.
  • each switch of the screen refresh rate can be guaranteed to be completed within 1 frame, for example, it takes 8ms.
  • the dynamic display scenarios supported by the electronic device system may include: dynamic display of the screen when the application starts, dynamic display of the screen when the application exits, dynamic display of the screen when returning to the upper menu, and/or The screen animation is displayed when swiping on the application list.
  • the dynamic display scene may also include any other possible screen dynamic display scenes, which may be determined according to actual usage requirements, and are not limited in this embodiment of the present application.
  • the dynamic change range of the refresh rate may include the following refresh rate gears: 120 Hz, 90 Hz, 60 Hz, 40 Hz, 30 Hz, 10 Hz, and 1 Hz.
  • 120Hz means that the display screen refreshes 120 times per second.
  • the time required for each refresh is about 8 milliseconds (ms).
  • the display duration (also referred to as frame length) of each frame may be about 8ms.
  • 90Hz means that the display screen refreshes 90 times per second.
  • the time required for each refresh is about 11ms.
  • the frame length of each frame may be about 11 ms.
  • 1Hz means that the display screen refreshes once per second.
  • the time required for each refresh is 1 second (s).
  • the frame length of each frame may be about 1s.
  • Fig. 5 shows a schematic diagram of module interaction of the native refresh rate switching process of the Android (Android) system.
  • the modules involved in this process may include a situation awareness module, a refresh rate decision module, surfaceFlinger, a display driver, a DDIC and a display screen. It can be understood that the modules involved here are the main modules for implementing the process, and other modules may be included in actual implementation, which can be determined according to actual usage requirements, and are not limited in this embodiment of the present application.
  • the process may include steps A1 to A14.
  • step A1 when the electronic device receives a user operation (for example, a sliding operation), the context awareness module may recognize that the display scene changes in response to the user operation.
  • a user operation for example, a sliding operation
  • the scene recognition result may include static display scenes and dynamic display scenes.
  • it may also include more detailed scene recognition results, such as static display scenes, partial static display scenes, partial dynamic display scenes, and dynamic display scenes.
  • step A2 the situation awareness module sends the scene recognition result to the refresh rate decision module.
  • Step A3 the refresh rate decision module determines the refresh rate corresponding to the scene recognition result according to the scene recognition result.
  • the current refresh rate is called the first refresh rate
  • the refresh rate corresponding to the scene recognition result is called the second refresh rate
  • the screen refresh rate corresponding to the static display scene is lower than the screen refresh rate corresponding to the dynamic display scene.
  • the screen refresh rate corresponding to the static display scene may be 1 Hz or 10 Hz
  • the screen refresh rate corresponding to the dynamic display scene may be 60 Hz, 90 Hz, or 120 Hz.
  • the screen refresh rate corresponding to the static display scene can be 1Hz or 10Hz
  • the screen refresh rate corresponding to the partial static display scene can be 30Hz or 40Hz
  • the screen refresh rate corresponding to the partial dynamic display scene can be 60Hz
  • the screen refresh rate corresponding to the dynamic display scene The corresponding screen refresh rate can be 90Hz or 120Hz.
  • Step A4 the refresh rate decision module sends a refresh rate switching instruction to SurfaceFlinger, and the refresh rate switching instruction is used to instruct switching from the first refresh rate to the second refresh rate.
  • the refresh rate decision module can call the refresh rate setting interface setActiveMode of SurfaceFlinger after receiving the user's operation on the electronic device (such as a click event).
  • step A5 SurfaceFlinger receives the refresh rate switching instruction within the i-th frame period.
  • the corresponding duration of each frame may be about 8 ms.
  • the Vsync period can be set to 8ms. Therefore, here the period of the i-th frame may be 8ms.
  • step A6 SurfaceFlinger sends a refresh rate switching instruction after the i-th frame ends according to the current first Vsync period.
  • the first Vsync period may be 8ms.
  • the refresh rate switching instruction is used to instruct switching from the current first refresh rate to the second refresh rate.
  • Step A7 after receiving the refresh rate switching command, the display driver sends the refresh rate switching command to the DDIC.
  • the refresh rate switching command issued by SurfaceFlinger reaches the HWC first, and then reaches the display driver.
  • the HWC module is not shown here.
  • step A8 the DDIC switches from the first refresh rate to the second refresh rate according to the refresh rate switching instruction.
  • step A9 the DDIC controls the display screen to perform refresh display at the second refresh rate.
  • the DDIC controls the display to refresh at a refresh rate of 90Hz, that is, refreshes 90 times per second.
  • step A10 the DDIC reports a new TE signal after the (i+1)th frame period ends according to the current first Vsync period.
  • the first Vsync period is 8ms, and the i+1th frame period is also 8ms.
  • DDIC can output TE signal according to the Vsync cycle.
  • the TE signal is used to instruct SurfaceFlinger to send image data (send to display), and SurfaceFlinger monitors the rising edge of the TE signal or the high level of the TE signal. , and when the next frame of image data is ready, send the next frame of image data to DDIC.
  • the layer synthesis performed by SurfaceFlinger is controlled by the Vsync cycle.
  • the Vsync cycle determines the speed of the screen displayed on the screen after the user clicks or slides on the screen. SurfaceFlinger must receive it. Send to display after TE signal.
  • the new TE signal reaches the display driver first, then reaches the HWC, and then reaches SurfaceFlinger.
  • step A11 SurfaceFlinger sets the Vsync period as the second Vsync period, and the second Vsync period corresponds to the second refresh rate.
  • the duration of each frame may be about 11 ms.
  • the second Vsync period can be set to 11 ms.
  • Step A12 SurfaceFlinger issues a refresh rate switching instruction according to the second Vsync period.
  • Step A13 after receiving the refresh rate switching command, the display driver sends the refresh rate switching command to the DDIC.
  • step A14 the DDIC controls the display screen to switch to the i+2th frame for display.
  • FIG. 6 shows a schematic diagram of module interaction of the refresh rate switching process provided by the embodiment of the present application.
  • the modules involved in this process may include a situation awareness module, a refresh rate decision module, SurfaceFlinger, a refresh rate setting interface, a display driver, a DDIC and a display screen.
  • Figure 6 adds a refresh rate setting interface.
  • the modules involved here are the main modules to implement the process, and other modules will be included in the actual implementation, which can be determined according to actual usage requirements, and are not limited by the embodiment of this application.
  • the following describes how to trigger Vsync period update, frame rate switching, and refresh rate switching through the newly added channel after a scene change is detected. As shown in FIG. 6, the process may include steps S1 to S13.
  • step S1 when the electronic device receives a user operation (for example, a sliding operation), the context awareness module may respond to the user operation to recognize that the displayed scene changes.
  • a user operation for example, a sliding operation
  • the scene recognition result may include static display scenes and dynamic display scenes.
  • it may also include more detailed scene recognition results, such as static display scenes, partial static display scenes, partial dynamic display scenes, and dynamic display scenes.
  • Step S2 the scene awareness module sends the scene recognition result to the refresh rate decision module.
  • Step S3 the refresh rate decision module determines the refresh rate corresponding to the scene recognition result according to the scene recognition result.
  • the current refresh rate is called the first refresh rate
  • the refresh rate corresponding to the scene recognition result is called the second refresh rate
  • the screen refresh rate corresponding to the static display scene is lower than the screen refresh rate corresponding to the dynamic display scene.
  • the screen refresh rate corresponding to the static display scene may be 1 Hz or 10 Hz
  • the screen refresh rate corresponding to the dynamic display scene may be 60 Hz, 90 Hz, or 120 Hz.
  • the screen refresh rate corresponding to the static display scene can be 1Hz or 10Hz
  • the screen refresh rate corresponding to the partial static display scene can be 30Hz or 40Hz
  • the screen refresh rate corresponding to the partial dynamic display scene can be 60Hz
  • the screen refresh rate corresponding to the dynamic display scene The corresponding screen refresh rate can be 90Hz or 120Hz.
  • Step S4 the refresh rate decision-making module calls the refresh rate setting interface (displaySetFps), and immediately issues a refresh rate switching instruction within the current i-th frame period, and the refresh rate switching instruction is used to instruct switching from the first refresh rate to the second refresh rate .
  • the refresh rate decision module After receiving the user's operation on the electronic device (such as a click event or a slide event), the refresh rate decision module invokes the newly added refresh rate setting interface to issue a refresh rate switching instruction.
  • Step S5 the refresh rate setting interface receives the refresh rate switching instruction within the i-th frame period, and immediately issues the refresh rate switching instruction within the i-th frame period.
  • the solution of this application issues the refresh rate switching command immediately when it senses that the scene changes and needs to dynamically switch the refresh rate, it does not need to issue the refresh rate switching command after the i-th frame ends according to the current first Vsync period.
  • the current first refresh rate is 120 Hz
  • the corresponding duration of each frame may be about 8 ms.
  • the first Vsync period can be set to 8ms.
  • the corresponding frame rate is 120FPS. Therefore, the i-th frame period may be 8ms.
  • step S6 after receiving the refresh rate switching command, the display driver sends the refresh rate switching command to the DDIC.
  • the refresh rate switching instruction reaches the HWC first, and then reaches the display driver.
  • the HWC module is not shown.
  • step S7 the DDIC switches from the first refresh rate to the second refresh rate according to the refresh rate switching instruction.
  • step S8 the DDIC controls the display screen to refresh and display at the second refresh rate.
  • the second refresh rate may be 90 Hz.
  • step S9 the DDIC reports a new TE signal.
  • the new TE signal corresponds to the second Vsync period.
  • the new TE signal first reaches the display driver, then reaches the HWC, then reaches the refresh rate setting interface, and then reaches SurfaceFlinger.
  • Step S10 SurfaceFlinger sets the Vsync period to the second Vsync period corresponding to the second refresh rate according to the received TE signal.
  • the duration of each frame may be about 11 ms.
  • the second Vsync period can be set to 11 ms, and the corresponding frame rate is 90 FPS. In this way, SurfaceFlinger switches from a frame rate of 120FPS to a frame rate of 90FPS.
  • step S11 SurfaceFlinger sends and displays an image (i+1 frame image) according to the second Vsync period.
  • Step S12 after receiving the i+1th frame of image, the display driver sends the i+1th frame of image to the DDIC.
  • step S13 the DDIC controls the display screen to display the i+1th frame image.
  • the above analyzes the module interaction process during implementation of the method for controlling the dynamic change of the screen refresh rate provided by the embodiment of the present application through FIG. 5 and FIG. 6 .
  • the comparison diagram of the solution of the present application compared with the solution of the related technology is described below from the perspective of frames with reference to FIG. 7 .
  • FIG. 7 shows a schematic diagram of native refresh rate switching of the Android (Android) system.
  • the refresh rate decision module sends a refresh rate switching command to SurfaceFlinger.
  • the refresh rate switching command is used to instruct the screen refresh rate to be changed from 120Hz to Switch to 90Hz.
  • the Vsync period used by SurfaceFlinger at this time is 8ms, that is, SurfaceFlinger will issue refresh rate switching instructions according to the Vsync period of 8ms.
  • the waiting time may be any one of 1ms to 8ms, here we take 8ms as an example
  • the display driver notifies the DDIC to drive the display screen (such as OLED or LCD) to switch the screen refresh rate.
  • the DDIC will also report the TE signal according to the 8ms Vsync period.
  • DDIC returns a new TE signal to the display driver, and the display driver reports a new TE signal to SurfaceFlinger, that is, it needs to wait for about 8ms before reporting a new TE signal.
  • SurfaceFlinger After SurfaceFlinger receives the new TE signal reported by the display driver, it starts a new Vsync cycle (that is, the second Vsync cycle mentioned above) synchronously.
  • the second Vsync cycle corresponds to the second refresh rate of 90Hz, so the second Vsync cycle is 11ms.
  • DDIC can control the display screen to refresh and display images at a refresh rate of 90Hz.
  • FIG. 7 shows a schematic diagram of refresh rate switching after system improvement in the embodiment of the present application.
  • the refresh rate decision module sends a refresh rate switching command to SurfaceFlinger.
  • the refresh rate switching command is used to instruct the screen refresh rate to be changed from 120Hz to Switch to 90Hz.
  • the Vsync period used by SurfaceFlinger at this time is 8ms, that is, SurfaceFlinger will issue refresh rate switching instructions according to the Vsync period of 8ms.
  • the refresh rate switching command can be directly issued to the display driver in the current i-th frame period.
  • the DDIC returns a new TE signal to the display driver, and the display driver reports the new TE signal to SurfaceFlinger.
  • SurfaceFlinger receives the new TE signal reported by the display driver, it starts a new Vsync cycle (that is, the second Vsync cycle mentioned above) synchronously.
  • the second Vsync cycle corresponds to the second refresh rate of 90Hz, so the second Vsync cycle is 11ms.
  • DDIC can control the display screen to refresh and display images at a refresh rate of 90Hz.
  • the refresh rate switching command can be triggered immediately to the HWC and the display driver, so that the refresh rate can be completed within a long time of 1 frame Switching, which can reduce the picture freeze caused by frame loss.
  • the above is an example of switching from 120Hz refresh rate to 90Hz refresh rate. It can be understood that in actual implementation, the solution provided by the embodiment of this application can be adopted according to the actual use situation, and the refresh rate can be realized between 1Hz and 120Hz. Dynamically change the refresh rate.
  • the refresh rate is gradually reduced, for example, the refresh rate is changed from 120Hz—>90Hz—>60Hz—>40Hz—>30Hz—>10Hz—>1Hz.
  • the screen refresh rate can be set to 30Hz without other layers.
  • the screen refresh rate can be set to 60Hz.
  • the electronic device in the embodiment of the present application may be a mobile terminal or a non-mobile terminal.
  • the mobile terminal can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle terminal, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc.
  • the non-mobile terminal may be a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which are not specifically limited in the embodiment of the present application.
  • the execution subject of the method for controlling the dynamic change of the screen refresh rate provided in the embodiment of the present application may be the above-mentioned electronic device, or may be a functional module and/or a functional entity in the electronic device capable of implementing the method for controlling the dynamic change of the screen refresh rate , and the solution of the present application can be realized by means of hardware and/or software, which can be determined according to actual usage requirements, and is not limited by the embodiment of the present application.
  • the method for controlling the dynamic change of the refresh rate of the screen provided by the embodiment of the present application is exemplarily described below by taking an electronic device as an example with reference to the accompanying drawings.
  • the electronic device implementing the method includes hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Professionals may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the protection scope of the present application.
  • the embodiment of the present application may divide the electronic device into functional modules according to the above method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other feasible division methods in actual implementation. In the following, description will be made by taking the division of each functional module corresponding to each function as an example.
  • the present application provides a chip, the chip is coupled with a memory, and the chip is used to read and execute computer programs or instructions stored in the memory, so as to execute the methods in the foregoing embodiments.
  • the present application provides an electronic device, which includes a chip, and the chip is used to read and execute computer programs or instructions stored in a memory, so that the methods in each embodiment are executed.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores program codes, and when the computer program codes run on the computer, the computer executes the above-mentioned Methods in the Examples.
  • the embodiments of the present application further provide a computer program product, the computer program product includes computer program code, and when the computer program code runs on the computer, the computer executes the Methods.
  • the electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer.
  • the hardware layer may include hardware such as a central processing unit (central processing unit, CPU), a memory management unit (memory management unit, MMU), and memory (also called main memory).
  • the operating system of the operating system layer can be any one or more computer operating systems that realize business processing through processes, for example, Linux operating system, Unix operating system, Android operating system, iOS operating system, or windows operating system.
  • the application layer may include applications such as browsers, address books, word processing software, and instant messaging software.
  • the embodiment of the present application does not specifically limit the specific structure of the execution subject of the method provided in the embodiment of the present application, as long as the program that records the code of the method provided in the embodiment of the present application can be executed according to the method provided in the embodiment of the present application Just communicate.
  • the subject of execution of the method provided by the embodiment of the present application may be an electronic device, or a functional module in the electronic device capable of invoking a program and executing the program.
  • Computer-readable media may include, but are not limited to, magnetic storage devices (for example, hard disks, floppy disks, or tapes, etc.), optical disks (for example, compact discs (compact disc, CD), digital versatile discs (digital versatile disc, DVD), etc. ), smart cards and flash memory devices (for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.).
  • magnetic storage devices for example, hard disks, floppy disks, or tapes, etc.
  • optical disks for example, compact discs (compact disc, CD), digital versatile discs (digital versatile disc, DVD), etc.
  • smart cards and flash memory devices for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.
  • Various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine-readable medium” may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
  • processors mentioned in the embodiment of the present application may be a central processing unit (central processing unit, CPU), and may also be other general purpose processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits ( application specific integrated circuit (ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the memory mentioned in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories.
  • the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be random access memory (RAM).
  • RAM can be used as an external cache.
  • RAM may include the following forms: static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM) , double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) and Direct memory bus random access memory (direct rambus RAM, DR RAM).
  • static random access memory static random access memory
  • dynamic RAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM synchronous DRAM
  • double data rate SDRAM double data rate SDRAM
  • DDR SDRAM double data rate SDRAM
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory
  • Direct memory bus random access memory direct rambus RAM, DR RAM
  • the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components
  • the memory storage module may be integrated in the processor.
  • memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the essence of the technical solution of this application, or the part that contributes to the prior art, or the part of the technical solution can be embodied in the form of computer software products, which are stored in a storage
  • the computer software product includes several instructions, which are used to make a computer device (which may be a personal computer, server, or network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium may include, but is not limited to: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)
  • Control Of El Displays (AREA)

Abstract

本申请提供了一种控制屏幕刷新率动态变化的方法及电子设备,涉及显示技术领域。在刷新率动态变化场景中,可以不用等待当前Vsync周期结束,而是在当前第i帧时段内通过新增的刷新率设置接口(displaySetFps)立即下发刷新率切换指令。DDIC在接收到刷新率切换指令之后,驱动显示屏(例如OLED)切换屏幕刷新率,然后DDIC返回新的TE信号,SurfaceFlinger在接收到新的TE信号之后,启用与切换后的屏幕刷新率对应的新Vsync周期。本申请实施例可以通过增加新的通道提升屏幕刷新率的切换速度,例如屏幕刷新率的每一次切换可以保证在1帧之内完成,降低延时,一定程度上避免了画面卡顿现象。

Description

控制屏幕刷新率动态变化的方法及电子设备
本申请要求于2022年2月28日提交国家知识产权局、申请号为202210191454.6、申请名称为“控制屏幕刷新率动态变化的方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及显示技术领域,尤其涉及一种控制屏幕刷新率动态变化的方法及电子设备。
背景技术
随着显示屏技术的不断发展,越来越多能够支持高刷新率显示的显示屏应运而生,在运行高帧率应用程序或在滑动操作过程中,通过将显示屏设置为高刷新率模式能够提高画面的流畅度。
然而,由于人眼对运动的物体比较敏感,因此在各种动态显示场景中需要较高的屏幕刷新率。当电子设备感应到出现动态显示场景时,可以将当前的屏幕刷新率切换到较高的屏幕刷新率,以满足该动态显示场景的高帧率显示需求。此时,如果屏幕刷新率切换时的延时较长,那么此时屏幕画面会发生错位的撕裂现象,用户也会感受到画面卡顿。
发明内容
本申请提供一种控制屏幕刷新率动态变化的方法及电子设备,解决了现有技术中屏幕刷新率动态变化时由于屏幕刷新率切换时的延时较长,导致屏幕画面发生撕裂现象及画面卡顿的问题。
为达到上述目的,本申请采用如下技术方案:
第一方面,本申请提供一种控制屏幕刷新率动态变化的方法,应用于电子设备,所述电子设备包括显示屏显示驱动集成芯片DDIC,所述方法包括:
响应于用户的第一操作,识别当前场景类别变化为第一场景类别,所述第一场景类别为静态显示场景或动态显示场景;
根据场景识别结果,生成屏幕刷新率切换指令,所述屏幕刷新率切换指令用于指示所述显示屏从当前的第一屏幕刷新率切换到第二屏幕刷新率,所述第二屏幕刷新率为所述第一场景类别对应的屏幕刷新率;
在当前帧时段内下发所述屏幕刷新率切换指令到所述DDIC,以指示所述DDIC切换到所述第二屏幕刷新率;
在所述DDIC切换到所述第二屏幕刷新率之后,将图像送显周期从第一Vsync周期切换为第二Vsync周期,所述第一Vsync周期对应第一屏幕刷新率,所述第二Vsync周期对应所述第二屏幕刷新率。
通过本申请提供的方案,在刷新率动态变化场景中,可以不用等待当前Vsync周期结束,而是在当前第i帧时段内立即下发(例如通过新增的刷新率设置接口下发)刷新率切 换指令。DDIC在接收到刷新率切换指令之后,驱动显示屏(例如OLED)切换屏幕刷新率,然后DDIC返回新的TE信号,SurfaceFlinger在接收到新的TE信号之后,启用与切换后的屏幕刷新率对应的新Vsync周期。本申请实施例可以通过增加新的通道提升屏幕刷新率的切换速度,例如屏幕刷新率的每一次切换可以保证在1帧之内完成,降低延时,一定程度上避免了画面卡顿现象。
在一些可能的实现方式中,所述电子设备还包括刷新率设置接口;所述方法还包括:在所述当前帧时段内,通过调用所述刷新率设置接口下发所述屏幕刷新率切换指令。
在一些可能的实现方式中,所述方法还包括:所述DDIC根据所述屏幕刷新率切换指令,控制所述显示屏采用所述第二屏幕刷新率进行刷新显示。
在一些可能的实现方式中,在所述DDIC切换到所述第二屏幕刷新率之后,所述方法还包括:所述DDIC生成TE信号,所述TE信号用于指示图像送显周期已切换为所述第二Vsync周期。
在一些可能的实现方式中,所述电子设备还包括SurfaceFlinger;其中,在所述DDIC生成TE信号之后,所述方法还包括:所述DDIC向所述SurfaceFlinger上报所述TE信号。
在一些可能的实现方式中,所述将图像送显周期从第一Vsync周期切换为第二Vsync周期,包括:所述SurfaceFlinger将图像送显周期从所述第一Vsync周期切换为所述第二Vsync周期。
在一些可能的实现方式中,所述SurfaceFlinger将图像送显周期从第一Vsync周期切换为第二Vsync周期,包括:所述SurfaceFlinger根据所述TE信号,将所述图像送显周期从所述第一Vsync周期切换为所述第二Vsync周期。
在一些可能的实现方式中,在所述将图像送显周期从第一Vsync周期切换为第二Vsync周期之后,所述方法还包括:所述SurfaceFlinger按照所述第二Vsync周期送显图像。
在一些可能的实现方式中,在所述根据场景识别结果,生成屏幕刷新率切换指令之前,所述方法还包括:所述SurfaceFlinger按照所述第一Vsync周期送显图像。
在一些可能的实现方式中,所述电子设备还包括驱动显示和硬件合成器HWC;其中,所述DDIC向所述SurfaceFlinger上报所述TE信号,包括:所述DDIC向所述驱动显示上报所述TE信号;所述驱动显示将所述TE信号上报给所述HWC;所述HWC将所述TE信号上报给所述SurfaceFlinger。
在一些可能的实现方式中,电子设备还包括刷新率决策模块;所述在所述当前帧时段内,通过调用所述刷新率设置接口下发所述屏幕刷新率切换指令到所述DDIC,包括:所述刷新率决策模块在所述当前帧时段内,调用所述刷新率设置接口,将所述屏幕刷新率切换指令发送给所述DDIC。
在一些可能的实现方式中,上述刷新率决策模块在所述当前帧时段内,调用所述刷新率设置接口,将所述屏幕刷新率切换指令发送给所述DDIC,包括:所述刷新率决策模块在所述当前帧时段内,通过调用所述刷新率设置接口,将所述屏幕刷新率切换指令发送给显示驱动;所述显示驱动将所述屏幕刷新率切换指令发送给所述DDIC。
在一些可能的实现方式中,所述根据场景识别结果,生成屏幕刷新率切换指令,包括:所述刷新率决策模块根据所述场景识别结果,生成所述屏幕刷新率切换指令。
在一些可能的实现方式中,所述根据场景识别结果,生成屏幕刷新率切换指令,包括: 当所述场景识别结果表示当前场景变化为静态显示场景时,生成所述屏幕刷新率切换指令,其中切换后的第二屏幕刷新率低于当前的第一屏幕刷新率;或者,当所述场景识别结果表示当前场景变化为动态显示场景时,生成所述屏幕刷新率切换指令,其中切换后的第二屏幕刷新率高于当前的第一屏幕刷新率。
在一些可能的实现方式中,方法还包括:根据所述第二屏幕刷新率,确定所述第二Vsync周期。
在一些可能的实现方式中,上述根据所述第二屏幕刷新率,确定所述第二Vsync周期,包括:当所述第二屏幕刷新率为R赫兹时,确定所述第二Vsync周期为1000/R毫秒。
在一些可能的实现方式中,第二屏幕刷新率为以下中的任一项:1Hz、10Hz、30Hz、40Hz、60Hz、90Hz、120Hz。
在一些可能的实现方式中,显示屏为有机发光二极体OLED显示屏。
第二方面,本申请提供一种控制屏幕刷新率动态变化的装置,该装置包括用于执行上述第一方面中的方法的单元。该装置可对应于执行上述第一方面中描述的方法,该装置中的单元的相关描述请参照上述第一方面的描述,为了简洁,在此不再赘述。
其中,上述第一方面描述的方法可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,处理模块或单元、显示模块或单元等。
第三方面,本申请提供一种电子设备,所述电子设备包括处理器,处理器与存储器耦合,存储器用于存储计算机程序或指令,处理器用于执行存储器存储的计算机程序或指令,使得第一方面中的方法被执行。
例如,处理器用于执行存储器存储的计算机程序或指令,使得该装置执行第一方面中的方法。
可选地,处理器为显示驱动集成芯片DDIC,该DDIC应用于显示屏,该DDIC用于执行所述存储器中存储的计算机程序或指令,以执行第一方面中的方法。
第四方面,本申请提供一种计算机可读存储介质,其上存储有用于实现第一方面中的方法的计算机程序(也可称为指令或代码)。
例如,该计算机程序被计算机执行时,使得该计算机可以执行第一方面中的方法。
第五方面,本申请提供一种芯片,包括处理器。处理器用于读取并执行存储器中存储的计算机程序,以执行第一方面及其任意可能的实现方式中的方法。
可选地,所述芯片还包括存储器,存储器与处理器通过电路或电线连接。
第六方面,本申请提供一种芯片系统,包括处理器。处理器用于读取并执行存储器中存储的计算机程序,以执行第一方面及其任意可能的实现方式中的方法。
可选地,所述芯片系统还包括存储器,存储器与处理器通过电路或电线连接。
第七方面,本申请提供一种计算机程序产品,所述计算机程序产品包括计算机程序(也可称为指令或代码),所述计算机程序被电子设备执行时使得所述电子设备实现第一方面中的方法。
可以理解的是,上述第二方面至第七方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。
附图说明
图1为本申请实施例提供的一种送显图像的流程示意图;
图2为本申请实施例提供的一种电子设备的结构示意图;
图3为本申请实施例提供的控制屏幕刷新率动态变化的方法应用的软件架构示意图;
图4为本申请实施例提供的控制屏幕刷新率动态变化的方法应用的改进后的软件架构示意图;
图5为本申请实施例提供的一种控制屏幕刷新率动态变化的方法的流程示意图;
图6为本申请实施例提供的改进后的一种控制屏幕刷新率动态变化的方法的流程示意图;
图7为本申请实施例提供的改进后的控制屏幕刷新率动态变化的方法与安卓原生流程方法相比的效果示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
当本申请提及术语“第一”或者“第二”等序数词时,除非根据上下文其确实表达顺序之意,否则应当理解为仅仅是起区分之用。术语“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
除非另有说明,本文中“/”一般表示前后关联对象是一种“或”的关系,例如,A/B可以表示A或B。术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请的描述中,“多个”是指两个或两个以上。
本申请以下实施例中的术语“用户界面(user interface,UI)”,是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在电子设备上经过解析,渲染,最终呈现为用户可以识别的内容。用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的文本、图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。
在介绍本申请提供的控制屏幕刷新率动态变化的方法和电子设备的实施例之前,以下对本申请实施例的部分用语进行解释说明,以便于本领域技术人员理解。
1)帧率(frame rate),也称为帧速率,单位为每秒帧个数,记为FPS。帧率指显卡(即GPU)在单位秒钟内所生成的图片帧数,也就是说每秒钟内显卡(即GPU)能够渲染并送显的画面数量。例如,帧率可以为30FPS或者60FPS等。
多帧静止的图像快速连续地显示便形成了动态画面,视频的帧速率越大,画面的连贯性就越好,高帧率可以得到更流畅,更逼真的画面,每秒钟帧数越多,所显示的动作就会 越流畅,从而也使画面质感越好。
2)屏幕刷新率,是屏幕在每秒钟能刷新画面的次数,单位是赫兹(Hz)。例如,60Hz的屏幕意味着一个屏幕在1秒内可以完成60次刷新显示。同样,120Hz的屏幕意味着一个屏幕在1秒内可以完成120次刷新显示,所以刷新率越高,屏幕所能表现出的帧数也就越多。相应地,画面延迟也就越低,流畅度也就越高。
3)在用户通过电子设备玩游戏或者看视频等动态显示场景(也称为动效显示场景)的过程中,当显示器的刷新率和帧率不同步时,例如在每秒钟帧数较多(例如90FPS或120FPS),而刷新率较低(例如30Hz)的情况下,会出现画面卡顿,甚至出现屏幕画面错位的撕裂效应(tearing effect,TE)。例如这种情况最常发生在每秒60帧数或更高帧率的动态显示场景(例如游戏)。
4)垂直同步(记为VSync),用于同步显示器的刷新率和帧率,避免出现屏幕撕裂效应。
5)显示屏变频显示方式,指电子设备的屏幕可以支持刷新率在某一范围内动态切换,例如在1Hz至120Hz之间切换,为电子设备系统中的各个动态显示场景的过程中支持刷新率动态变化提供了基础物理条件,可以实现更加极致的省电效果。
下面结合图1说明传统的图像绘制及显示过程。如图1所示,在Android(安卓)系统中,图像绘制及显示过程需要经过软件侧、显示驱动集成芯片(display driver integrated circuit,DDIC)以及显示屏协同完成。软件侧首先通过应用程序(application,App)进行页面刷新,然后通过SurfaceFlinger对绘制得到的图层进行图层合成,得到图像数据,然后图像数据经过HWC和显示驱动,进而通过移动行业处理器接口(mobile industry processor interface,MIPI)将图像数据送显(写入)DDIC。DDIC将软件侧送显的图像数据存储在缓存器(buffer)中,并通过扫描(读取)缓存器中的图像数据,控制显示屏(例如OLED或者LCD)完成刷新率切换,显示屏进行图像刷新显示(display)。在高刷新率显示场景下,软件侧高频生成图像数据,相应地,显示屏侧根据图像数据进行高频图像刷新,从而提高画面的流畅度。
为了避免出现屏幕画面出现撕裂效应,DDIC在完成刷新率切换之后,可以按照Vsync周期输出TE信号,TE信号用于指示软件侧发送图像数据,软件侧在监听到TE信号上升沿或TE信号高电平,且准备好下一帧图像数据时,即向DDIC发送下一帧图像数据。
也就是说,App执行的图层绘制渲染和SurfaceFlinger执行的图层合成均是通过Vsync周期来控制的,Vsync周期决定了用户在屏幕上进行点击或滑动操作后,屏幕所呈现出的画面的变化速度,App和SurfaceFlinger都必须在接收到TE信号后才执行图层绘制操作。
由于人眼对运动的物体比较敏感,因此在各种动态显示场景中需要较高的屏幕刷新率。当电子设备感应到出现动态显示场景时,可以将当前的屏幕刷新率切换到较高的屏幕刷新率,以满足该动态显示场景的高帧率显示需求。此时,如果屏幕刷新率切换时的延时较长,那么此时屏幕画面仍然会发生错位的撕裂现象,用户也会感受到画面卡顿。
基于此,本申请实施例提供一种控制屏幕刷新率动态变化的方法及电子设备,通过在手机系统底层的改进,以提高用户体验。下面结合具体实施例,先对本申请提供的电子设备进行示例性的说明。
参见图2,为本申请实施例提供的一种电子设备的结构示意图。电子设备100可以包 括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,触摸传感器180K,环境光传感器180L等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。例如,处理器110用于执行本申请实施例中的环境光的检测方法。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用有机发光二极管(organic light-emitting diode,OLED)。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
其中,电子设备100中可以包括刷新率决策模块,该刷新率决策模块用于实现刷新率动态变化的功能。
电子设备可以是搭载iOS、Android、Microsoft或者其它操作系统的便携式终端设备,例如手机、平板电脑、可穿戴设备等,还可以是具有触敏表面或触控面板的膝上型计算机(Laptop)、具有触敏表面或触控面板的台式计算机等非便携式终端设备。电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。
图3是本申请实施例的电子设备100的一种软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件 接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层(applications)、应用程序框架层(application framework)、硬件抽象层(hardware abstract layer,HAL)以及内核层(kernel)。
应用程序层可以包括一系列应用程序包。其中,应用程序可以简称为应用。如图3所示,应用程序层可以包括电子书应用,视频应用,导航应用,游戏应用,滑动动效应用等,本申请实施例对此不做任何限制。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图3所示,应用程序框架层可以包括刷新率决策模块和SurfaceFlinger模块。其中,刷新率决策模块可以向SurfaceFlinger模块通知最新的刷新率,通过SurfaceFlinger模块将刷新率下发给显示驱动,然后通过显示驱动下发给DDIC,然后DDIC控制显示器以该刷新率进行图像刷新显示。
本申请实施例中,应用程序框架层还可以包括情景感知模块和刷新率决策模块等。其中,情境感知模块,常驻运行或以低功耗形式运行,具有感知外部事实或者环境的能力。情境感知模块可以通过应用程序接口(application programming interface,API)从应用程序层的应用程序或硬件抽象层或内核层来检测相关事件并获取事件的状态,比如检测蓝牙连接、网络连接等。
在本申请实施例中,情境感知模块主要作用是监听是否出现动效事件,即根据用户触发的点击操作或者滑动操作,判断当前应用场景是否为动态显示场景,情境感知模块通知业务逻辑处理模块出现动态显示场景。业务逻辑处理模块(如:计算引擎)具有业务逻辑处理能力,可以用于根据动态显示场景的类型,确定适合于该动态显示场景的屏幕刷新率。进一步地,业务逻辑处理模块将当前的屏幕刷新率切换到适合该动态显示场景的屏幕刷新率,实现屏幕分辨率动态变化。
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。
如图3所示,内核层是硬件和软件之间的层。内核层至少包含显示驱动。具体到本申请方案,涉及的硬件可以包括显示驱动集成芯片(display driver integrated circuit,DDIC)以及显示屏(例如OLED或者LCD)。显示驱动用于驱动DDIC完成显示的处理和实现。
硬件抽象层可以包括硬件合成模块(hwcomposer,HWC),HWC具有利用硬件完成图像数据组合并显示的功能或能力,具体图像显示可以由多个类如SurfaceFlinger、HWC、显示屏(panel)等协同完成。
HWC是Android系统中进行窗口/图层(layer)合成并显示的HAL层模块,其实现是特定于设备的,而且通常由显示设备制造商(OEM)完成,为SurfaceFlinger服务提供硬件支持。
其中,SurfaceFlinger提供所有软图层信息给HWC,并询问HWC处理方式。进一步地,HWC根据硬件性能决定是使用硬件图层合成器还是GPU合成;例如,HWC会为每个图层标注合成方式,是通过GPU还是通过HWC合成。一方面,SurfaceFlinger对需要GPU合成的软图层进行处理,并将结果递交给HWC做显示;另一方面,需要硬件图层合成器 合成的软图层由HWC自行处理。
SurfaceFlinger可以使用三维图形处理库(例如OpenGL ES)合成图层,这需要占用并消耗GPU资源。大多数GPU都没有针对图层合成进行优化,当SurfaceFlinger通过GPU合成图层时,应用程序无法使用GPU进行自己的渲染。而HWC通过硬件设备进行图层合成,可以减轻GPU的合成压力。
但是并非所有情况下HWC都比GPU更高效,例如:当屏幕上没有任何变化时,尤其是叠加层有透明像素并且需要进行图层透明像素混合时。在这种情况下,HWC可以要求部分或者全部叠加层都进行GPU合成,然后HWC持有合成的结果缓存器(buffer),如果SurfaceFlinger要求合成相同的叠加图层列表,HWC可以直接显示之前合成的结果Buffer,这有助于提高待机设备的电池寿命。
HWC也提供了VSync事件,用于管理渲染和图层合成时机。
在相关技术(如图3所示)中,屏幕刷新率的切换过程包括以下步骤:刷新率决策模块先通知SurfaceFlinger刷新率切换指令,然后通过SurfaceFlinger下发该刷新率切换指令到达HWC再到达显示驱动,显示驱动在收到刷新率切换指令后,通知DDIC切换到目标刷新率,DDIC驱动显示屏(例如OLED或者LCD)完成刷新率切换,然后DDIC返回新的TE信号给显示驱动,显示驱动上报新的TE信号,然后SurfaceFlinger接收到新的TE信号,并通知APP切换到新的刷新率,这样App和SurfaceFlinger都必须在接收到TE信号后才执行图层绘制操作。
图4是本申请实施例提供的电子设备100的改进后的软件结构框图,并示出了本申请实施例改进后的系统层级交互的示意图。改进后的方案可以提高屏幕刷新率动态变化的速率,避免出现上述动态显示场景出现撕裂效应。
本申请实施例在系统底层做了改进。如图4所示,本申请方案在图3所示软件架构基础上增加新的通路,增加的通路中采用显示刷新率设置接口(displaySetFps)来实现刷新率切换指令的下发。具体地,刷新率决策模块可以直接通过displaySetFps模块将刷新率切换指令下发给显示驱动。与图3所示的软件架构相比,图4中刷新率切换指令不再通过SurfaceFlinger下发刷新率切换指令。因此可以不用等待当前Vsync周期(记为第一Vsync周期,例如8ms)结束,而是在当前第i帧时段内立即下发刷新率切换指令到显示驱动(或者HWC)。然后,显示驱动在第i帧时段内收到刷新率切换指令后,通知DDIC切换到目标刷新率,DDIC驱动显示屏(例如OLED或者LCD)完成刷新率切换。在硬件底层DDIC的刷新率切换成功之后,上层SurfaceFlinger的帧率需要跟随一起切换,因此DDIC可以上报TE信号给上层,以指示上层切换到新的帧率,即按照新的Vsync周期送显图像。DDIC返回新的TE信号(对应第二Vsync周期,例如11ms)给显示驱动;然后显示驱动上报新的TE信号。SurfaceFlinger在接收到新的TE信号之后,将Vsync周期设置为第二Vsync周期。这样,SurfaceFlinger后续可以按照第二Vsync周期下发刷新率切换指令。
本申请实施例可以通过增加新的通道提升屏幕刷新率的切换速度,快速完成屏幕刷新率切换,降低延时,一定程度上避免了画面卡顿现象。例如,屏幕刷新率的每一次切换可以保证在1帧之内完成,例如耗时8ms。
示例性地,在本申请实施例中,电子设备系统支持的动态显示场景可以包括:应用启动时画面动效显示,应用退出时画面动效显示、返回上级菜单时画面动效显示,和/或在应 用列表上滑动操作时画面动效显示。可以理解,动态显示场景还可以包括其他任意可能的画面动效显示的场景,具体可以根据实际使用需求确定,本申请实施例不作限定。
示例性地,在本申请实施例中,刷新率动态变化范围可以包括以下刷新率档位:120Hz,90Hz,60Hz,40Hz,30Hz,10Hz,1Hz。
以120Hz为例,120Hz指显示屏每秒刷新120次。对应地,每一次刷新所需时长约为8毫秒(ms)。可以理解,每一帧的显示时长(也称为帧长)可以约为8ms。
以90Hz为例,90Hz指显示屏每秒刷新90次。对应地,每一次刷新所需时长约为11ms。可以理解,每一帧的帧长可以约为11ms。
以1Hz为例,1Hz指显示屏每秒刷新1次。对应地,每一次刷新所需时长为1秒(s)。可以理解,每一帧的帧长可以约为1s。
可以理解,屏幕刷新率越大,画面的流畅度越高,这适用于动态显示场景;相反,屏幕刷新率越小,画面的流畅度越低,这适用于静态显示场景。
图5示出了安卓(Android)系统原生的刷新率切换流程的模块交互示意图。如图5所示,该流程涉及的模块可以包括情景感知模块、刷新率决策模块、surfaceFlinger、显示驱动、DDIC和显示屏。可以理解,这里所涉及的模块是实现该流程的主要模块,在实际实现时还会包括其他模块,具体可以根据实际使用需求确定,本申请实施例不作限定。如图5所示,该流程可以包括步骤A1至A14。
步骤A1,在电子设备接收到用户操作(例如滑动操作)时,情景感知模块可以响应于用户操作,识别显示场景发生变化。
可选地,场景识别结果可以包括静态显示场景和动态显示场景。当然,还可以包括划分更详细的场景识别结果,例如静态显示场景,偏静态显示场景,偏动态显示场景以及动态显示场景。
步骤A2,情景感知模块将场景识别结果发送给刷新率决策模块。
步骤A3,刷新率决策模块根据场景识别结果,确定与场景识别结果对应的刷新率。
为了便于说明,将当前的刷新率称为第一刷新率,将与场景识别结果对应的刷新率称为第二刷新率。
其中,静态显示场景对应的屏幕刷新率低于动态显示场景对应的屏幕刷新率。
示例性地,静态显示场景对应的屏幕刷新率可以为1Hz或10Hz,动态显示场景对应的屏幕刷新率可以为60Hz或90Hz或120Hz。
再示例性地,静态显示场景对应的屏幕刷新率可以为1Hz或10Hz,偏静态显示场景对应的屏幕刷新率可以为30Hz或40Hz,偏动态显示场景对应的屏幕刷新率可以为60Hz,动态显示场景对应的屏幕刷新率可以为90Hz或120Hz。
步骤A4,刷新率决策模块向SurfaceFlinger下发刷新率切换指令,该刷新率切换指令用于指示从第一刷新率切换到第二刷新率。
刷新率决策模块在接收到用户对电子设备的操作(例如点击事件)后,可以调用SurfaceFlinger的刷新率设置接口setActiveMode。
步骤A5,SurfaceFlinger在第i帧时段内接收到该刷新率切换指令。
示例性地,假设当前的第一刷新率为120Hz,对应的每一帧时长可以约为8ms。相应地,Vsync周期可以设置为8ms。因此,这里第i帧时段可以为8ms。
步骤A6,SurfaceFlinger按照当前的第一Vsync周期,在第i帧结束后下发刷新率切换指令。
示例性地,第一Vsync周期可以为8ms。
其中,刷新率切换指令用于指示从当前的第一刷新率切换到第二刷新率。
步骤A7,显示驱动在接收到刷新率切换指令之后,将刷新率切换指令下发给DDIC。
其中,SurfaceFlinger下发的刷新率切换指令先到达HWC,然后再到达显示驱动,这里为了便于说明,未示出HWC模块。
步骤A8,DDIC按照刷新率切换指令,从第一刷新率切换为第二刷新率。
步骤A9,DDIC控制显示屏以第二刷新率进行刷新显示。
其中,DDIC控制显示屏以90Hz的刷新率进行刷新显示,即每秒刷新90次。
步骤A10,DDIC按照当前的第一Vsync周期,在第i+1帧时段结束后上报新的TE信号。
其中,第一Vsync周期为8ms,第i+1帧时段也为8ms。
可以理解,为了避免出现屏幕画面出现撕裂效应,DDIC可以按照Vsync周期输出TE信号,TE信号用于指示SurfaceFlinger发送图像数据(送显),SurfaceFlinger在监听到TE信号上升沿或TE信号高电平,且准备好下一帧图像数据时,即向DDIC发送下一帧图像数据。
也就是说,SurfaceFlinger执行的图层合成均是通过Vsync周期来控制的,Vsync周期决定了用户在屏幕上进行点击或滑动操作后,屏幕所呈现出的画面的变化速度,SurfaceFlinger都必须在接收到TE信号后才执行送显。
需要说明的是,新的TE信号先到达显示驱动,然后再到达HWC,然后再到达SurfaceFlinger。
步骤A11,SurfaceFlinger将Vsync周期设置为第二Vsync周期,该第二Vsync周期对应于第二刷新率。
其中,假设第二刷新率为90Hz,对应地每一帧时长可以约为11ms。相应地,第二Vsync周期可以设置为11ms。
步骤A12,SurfaceFlinger按照第二Vsync周期下发刷新率切换指令。
步骤A13,显示驱动在接收到该刷新率切换指令之后,将该刷新率切换指令下发给DDIC。
步骤A14,DDIC控制显示屏切换到第i+2帧进行显示。
通过图5可知,在每一次刷新率动态变化时,SurfaceFlinger在接收到刷新率切换指令之后,SurfaceFlinger仍然先按照当前的第一Vsync周期下发刷新率切换指令,例如需要等待约8ms后下发刷新率切换指令,并且DDIC也仍然按照当前的第一Vsync周期上报TE信号,例如需要等待约8ms后上报新的TE信号,这样每一次刷新率切换过程可能需要在2帧之内才能完成,耗时约16ms。
图6示出了本申请实施例提供的刷新率切换流程的模块交互示意图。如图6所示,该流程涉及的模块可以包括情景感知模块、刷新率决策模块、SurfaceFlinger、刷新率设置接口、显示驱动、DDIC和显示屏。与图5安卓原生流程相比,图6增加了刷新率设置接口。
可以理解,这里所涉及的模块是实现该流程的主要模块,在实际实现时还会包括其他 模块,具体可以根据实际使用需求确定,本申请实施例不作限定。下面描述在检测到场景发生变化后如何通过新增的通路触发Vsync周期更新、帧率切换以及刷新率切换。如图6所示,该流程可以包括步骤S1至S13。
步骤S1,在电子设备接收到用户操作(例如滑动操作)时,情景感知模块可以响应于用户操作,识别显示场景发生变化。
可选地,场景识别结果可以包括静态显示场景和动态显示场景。当然,还可以包括划分更详细的场景识别结果,例如静态显示场景,偏静态显示场景,偏动态显示场景以及动态显示场景。
步骤S2,情景感知模块将场景识别结果发送给刷新率决策模块。
步骤S3,刷新率决策模块根据场景识别结果,确定与场景识别结果对应的刷新率。
为了便于说明,将当前的刷新率称为第一刷新率,将与场景识别结果对应的刷新率称为第二刷新率。
其中,静态显示场景对应的屏幕刷新率低于动态显示场景对应的屏幕刷新率。
示例性地,静态显示场景对应的屏幕刷新率可以为1Hz或10Hz,动态显示场景对应的屏幕刷新率可以为60Hz或90Hz或120Hz。
再示例性地,静态显示场景对应的屏幕刷新率可以为1Hz或10Hz,偏静态显示场景对应的屏幕刷新率可以为30Hz或40Hz,偏动态显示场景对应的屏幕刷新率可以为60Hz,动态显示场景对应的屏幕刷新率可以为90Hz或120Hz。
步骤S4,刷新率决策模块调用刷新率设置接口(displaySetFps),在当前第i帧时段内立即下发刷新率切换指令,该刷新率切换指令用于指示从第一刷新率切换到第二刷新率。
刷新率决策模块在接收到用户对电子设备的操作(例如点击事件或滑动事件)后,调用新增的刷新率设置接口下发刷新率切换指令。
步骤S5,刷新率设置接口在第i帧时段内接收到该刷新率切换指令,并在第i帧时段内立即下发刷新率切换指令。
由于本申请方案在感应到场景发生变化需要动态切换刷新率时,立即下发刷新率切换指令,这样无需按照当前的第一Vsync周期,在第i帧结束后下发刷新率切换指令。示例性地,假设当前的第一刷新率为120Hz,对应的每一帧时长可以约为8ms。相应地,第一Vsync周期可以设置为8ms。对应的帧率为120FPS。因此,第i帧时段可以为8ms。
步骤S6,显示驱动在接收到刷新率切换指令之后,将刷新率切换指令下发给DDIC。
其中,刷新率切换指令先到达HWC,然后再到达显示驱动,这里为了便于说明,未示出HWC模块。
步骤S7,DDIC根据刷新率切换指令,从第一刷新率切换第二刷新率。
步骤S8,DDIC控制显示屏以第二刷新率进行刷新显示。
示例性地,第二刷新率可以为90Hz。
步骤S9,DDIC上报新的TE信号。
其中,新的TE信号对应第二Vsync周期。
需要说明的是,新的TE信号先到达显示驱动,然后再到达HWC,然后再到达刷新率设置接口,然后再到达SurfaceFlinger。
步骤S10,SurfaceFlinger根据接收到的TE信号,将Vsync周期设置为与第二刷新率 对应的第二Vsync周期。
其中,假设第二刷新率为90Hz,对应地每一帧时长可以约为11ms。相应地,第二Vsync周期可以设置为11ms,对应的帧率为90FPS。这样,SurfaceFlinger从120FPS的帧率切换为90FPS的帧率。
步骤S11,SurfaceFlinger按照第二Vsync周期送显图像(第i+1帧图像)。
步骤S12,显示驱动在接收到该第i+1帧图像之后,将该第i+1帧图像下发给DDIC。
步骤S13,DDIC控制显示屏显示第i+1帧图像。
以上通过图5和图6分析了本申请实施例提供的控制屏幕刷新率动态变化的方法在实现时模块交互流程。下面结合图7从帧的角度说明本申请方案相比于相关技术方案的对比图示。
图7中的(a)示出了安卓(Android)系统原生的刷新率切换示意图。如图7中的(a)所示,假设当前屏幕刷新率为120Hz,当前帧记为第i帧,则第i帧的帧长约为8ms。在第i帧时段内,若检测到当前显示场景有变化,需要动态降低刷新率,则刷新率决策模块下发刷新率切换指令给SurfaceFlinger,例如刷新率切换指令用于指示将屏幕刷新率从120Hz切换为90Hz。
SurfaceFlinger此时采用的Vsync周期为8ms,即SurfaceFlinger会按照8ms的Vsync周期下发刷新率切换指令。在此情况下,如果当i帧时段内有送图,那么需要等待当第i帧结束,第i+1帧开始时,才会下发刷新率切换指令。这样SurfaceFlinger需要等待约8ms(实际实现时,等待时长可能是1ms至8ms中的任一项,这里以8ms为例)后下发刷新率切换指令到显示驱动。然后,显示驱动在收到刷新率切换指令后,通知DDIC驱动显示屏(例如OLED或者LCD)切换屏幕刷新率。
需要说明的是,DDIC也会按照8ms的Vsync周期上报TE信号。当第i+1帧结束,第i+2帧开始时,DDIC返回新的TE信号给显示驱动,显示驱动上报新的TE信号到SurfaceFlinger,即需要等待约8ms后上报新的TE信号。SurfaceFlinger在接收到显示驱动上报新的TE信号之后,同步开启新的Vsync周期(即上述第二Vsync周期),第二Vsync周期对应第二刷新率90Hz,因此第二Vsync周期为11ms。
这样,从第i+2帧开始,SurfaceFlinger后续会按照11ms的Vsync周期下发刷新率切换指令,相应地,DDIC可以控制显示屏以90Hz的刷新率进行图像刷新显示。
通过图7中的(a)可知,在每一次刷新率动态变化时,SurfaceFlinger在接收到刷新率切换指令之后,SurfaceFlinger仍然会先按照当前的第一Vsync周期下发刷新率切换指令,例如需要等待约8ms后下发刷新率切换指令,并且DDIC也仍然按照当前的第一Vsync周期上报TE信号,例如需要等待约8ms后上报新的TE信号,然后在SurfaceFlinger接收到新的TE信号之后才会设置开启新的Vsync周期。这样每一次刷新率切换过程可能需要在2帧之内才能完成,耗时约16ms。
再来看图7中的(b),图7中的(b)示出了本申请实施例系统改进后的刷新率切换示意图。如图7中的(b)所示,仍然假设当前屏幕刷新率为120Hz,当前帧记为第i帧,则第i帧的帧长约为8ms。在第i帧时段内,若检测到当前显示场景有变化,需要动态降低刷新率,则刷新率决策模块下发刷新率切换指令给SurfaceFlinger,例如刷新率切换指令用于指示将屏幕刷新率从120Hz切换为90Hz。
SurfaceFlinger此时采用的Vsync周期为8ms,即SurfaceFlinger会按照8ms的Vsync周期下发刷新率切换指令。为了快速切换屏幕刷新率,因此可以在当前的第i帧时段内直接下发刷新率切换指令到显示驱动。然后,当第i帧结束,第i+1帧开始时,DDIC返回新的TE信号给显示驱动,显示驱动上报新的TE信号到SurfaceFlinger。SurfaceFlinger在接收到显示驱动上报新的TE信号之后,同步开启新的Vsync周期(即上述第二Vsync周期),第二Vsync周期对应第二刷新率90Hz,因此第二Vsync周期为11ms。
这样,从第i+1帧开始,SurfaceFlinger后续会按照11ms的Vsync周期下发刷新率切换指令,相应地,DDIC可以控制显示屏以90Hz的刷新率进行图像刷新显示。
通过图7中的(b)可知,在每一次刷新率动态变化时,在当前的第i帧时段内通过调用本申请方案提供的刷新率设置接口,直接下发刷新率切换指令,DDIC根据刷新率切换指令控制显示屏切换屏幕刷新率,然后上报新的TE信号,然后在SurfaceFlinger接收到新的TE信号之后会强制设置开启新的Vsync周期,确保后续Vsync周期稳定。这样每一次刷新率切换过程可能需要在1帧之内才能完成,耗时约8ms。
在本申请实施例中,通过构建新的屏幕刷新率切换通路,不用等待Vsync同步周期结束,可立即触发刷新率切换指令到HWC以及显示驱动,这样可以在1帧的帧长时间内完成刷新率切换,从而可以减少丢帧而造成的画面卡顿。
需要说明的是,以上以120Hz刷新率切换到90Hz刷新率为例进行说明,可以理解,在实际实现时,可以根据实际使用情况,采用本申请实施例提供的方案,实现在1Hz至120Hz之间进行刷新率动态变化。
在一些实施例中,在感应到无触摸操作后将刷新率逐渐降低,例如将刷新率从120Hz—>90Hz—>60Hz—>40Hz—>30Hz—>10Hz—>1Hz。
在一些实施例中,在无其他图层的情况下,可以将屏幕刷新率设置为30Hz。
在一些实施例中,在有其他图层的情况下,可以将屏幕刷新率设置为60Hz。
本申请实施例中的电子设备可以为移动终端,也可以为非移动终端。示例性的,移动终端可以为手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动终端可以为个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例提供的控制屏幕刷新率动态变化的方法的执行主体可以为上述的电子设备,也可以为该电子设备中能够实现该控制屏幕刷新率动态变化的方法的功能模块和/或功能实体,并且本申请方案能够通过硬件和/或软件的方式实现,具体的可以根据实际使用需求确定,本申请实施例不作限定。下面以电子设备为例,结合附图对本申请实施例提供的控制屏幕刷新率动态变化的方法进行示例性的说明。
也需要说明的是,在本申请实施例中,“大于”可以替换为“大于或等于”,“小于或等于”可以替换为“小于”,或者,“大于或等于”可以替换为“大于”,“小于”可以替换为“小于或等于”。
本文中描述的各个实施例可以为独立的方案,也可以根据内在逻辑进行组合,这些方案都落入本申请的保护范围中。
可以理解的是,上述各个方法实施例中由电子设备实现的方法和操作,也可以由可用 于电子设备的部件(例如芯片或者电路)实现。
上文描述了本申请提供的方法实施例,下文将描述本申请提供的装置实施例。应理解,装置实施例的描述与方法实施例的描述相互对应,因此,未详细描述的内容可以参见上文方法实施例,为了简洁,这里不再赘述。
上文主要从方法步骤的角度对本申请实施例提供的方案进行了描述。可以理解的是,为了实现上述功能,实施该方法的电子设备包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的保护范围。
本申请实施例可以根据上述方法示例,对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有其它可行的划分方式。下面以采用对应各个功能划分各个功能模块为例进行说明。
可选地,在一些实施例中,本申请提供一种芯片,该芯片与存储器耦合,该芯片用于读取并执行存储器中存储的计算机程序或指令,以执行上述各实施例中的方法。
可选地,在一些实施例中,本申请提供一种电子设备,该电子设备包括芯片,该芯片用于读取并执行存储器存储的计算机程序或指令,使得各实施例中的方法被执行。
可选地,在一些实施例中,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有程序代码,当计算机程序代码在计算机上运行时,使得计算机执行上述各实施例中的方法。
可选地,在一些实施例中,本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行上述各实施例中的方法。
在本申请实施例中,电子设备包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。其中,硬件层可以包括中央处理器(central processing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。操作系统层的操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。应用层可以包含浏览器、通讯录、文字处理软件、即时通信软件等应用。
本申请实施例并未对本申请实施例提供的方法的执行主体的具体结构进行特别限定,只要能够通过运行记录有本申请实施例提供的方法的代码的程序,以根据本申请实施例提供的方法进行通信即可。例如,本申请实施例提供的方法的执行主体可以是电子设备,或者,是电子设备中能够调用程序并执行程序的功能模块。
本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。 本文中使用的术语“制品”可以涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括但不限于:磁存储器件(例如,硬盘、软盘或磁带等),光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。
本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可以包括但不限于:无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
应理解,本申请实施例中提及的处理器可以是中央处理单元(central processing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
还应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM)。例如,RAM可以用作外部高速缓存。作为示例而非限定,RAM可以包括如下多种形式:静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)可以集成在处理器中。
还需要说明的是,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的保护范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组 件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。此外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上,或者说对现有技术做出贡献的部分,或者该技术方案的部分,可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,该计算机软件产品包括若干指令,该指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。前述的存储介质可以包括但不限于:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (23)

  1. 一种控制屏幕刷新率动态变化的方法,其特征在于,应用于电子设备,所述电子设备包括显示屏和显示驱动集成芯片DDIC,所述方法包括:
    响应于用户的第一操作,识别当前场景类别变化为第一场景类别,所述第一场景类别为静态显示场景或动态显示场景;
    根据场景识别结果,生成屏幕刷新率切换指令,所述屏幕刷新率切换指令用于指示所述显示屏从当前的第一屏幕刷新率切换到第二屏幕刷新率,所述第二屏幕刷新率为所述第一场景类别对应的屏幕刷新率;
    在当前帧时段内下发所述屏幕刷新率切换指令到所述DDIC,以指示所述DDIC切换到所述第二屏幕刷新率;
    在所述DDIC切换到所述第二屏幕刷新率之后,将图像送显周期从第一Vsync周期切换为第二Vsync周期,所述第一Vsync周期对应第一屏幕刷新率,所述第二Vsync周期对应所述第二屏幕刷新率。
  2. 根据权利要求1所述的方法,其特征在于,所述电子设备还包括刷新率设置接口;所述方法还包括:
    在所述当前帧时段内,通过调用所述刷新率设置接口下发所述屏幕刷新率切换指令。
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:
    所述DDIC根据所述屏幕刷新率切换指令,控制所述显示屏采用所述第二屏幕刷新率进行刷新显示。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,在所述DDIC切换到所述第二屏幕刷新率之后,所述方法还包括:
    所述DDIC生成TE信号,所述TE信号用于指示图像送显周期已切换为所述第二Vsync周期。
  5. 根据权利要求4所述的方法,其特征在于,所述电子设备还包括SurfaceFlinger;
    其中,在所述DDIC生成TE信号之后,所述方法还包括:
    所述DDIC向所述SurfaceFlinger上报所述TE信号。
  6. 根据权利要求5所述的方法,其特征在于,所述将图像送显周期从第一Vsync周期切换为第二Vsync周期,包括:
    所述SurfaceFlinger将图像送显周期从所述第一Vsync周期切换为所述第二Vsync周期。
  7. 根据权利要求6所述的方法,其特征在于,所述SurfaceFlinger将图像送显周期从第一Vsync周期切换为第二Vsync周期,包括:
    所述SurfaceFlinger根据所述TE信号,将所述图像送显周期从所述第一Vsync周期切换为所述第二Vsync周期。
  8. 根据权利要求5所述的方法,其特征在于,在所述将图像送显周期从第一Vsync周期切换为第二Vsync周期之后,所述方法还包括:
    所述SurfaceFlinger按照所述第二Vsync周期送显图像。
  9. 根据权利要求5所述的方法,其特征在于,在所述根据场景识别结果,生成屏幕刷新率切换指令之前,所述方法还包括:
    所述SurfaceFlinger按照所述第一Vsync周期送显图像。
  10. 根据权利要求5至9中任一项所述的方法,其特征在于,所述电子设备还包括驱动显示和硬件合成器HWC;
    其中,所述DDIC向所述SurfaceFlinger上报所述TE信号,包括:
    所述DDIC向所述驱动显示上报所述TE信号;
    所述驱动显示将所述TE信号上报给所述HWC;
    所述HWC将所述TE信号上报给所述SurfaceFlinger。
  11. 根据权利要求2所述的方法,其特征在于,所述电子设备还包括刷新率决策模块;
    所述在所述当前帧时段内,通过调用所述刷新率设置接口下发所述屏幕刷新率切换指令到所述DDIC,包括:
    所述刷新率决策模块在所述当前帧时段内,调用所述刷新率设置接口,将所述屏幕刷新率切换指令发送给所述DDIC。
  12. 根据权利要求11所述的方法,其特征在于,所述刷新率决策模块在所述当前帧时段内,调用所述刷新率设置接口,将所述屏幕刷新率切换指令发送给所述DDIC,包括:
    所述刷新率决策模块在所述当前帧时段内,通过调用所述刷新率设置接口,将所述屏幕刷新率切换指令发送给显示驱动;
    所述显示驱动将所述屏幕刷新率切换指令发送给所述DDIC。
  13. 根据权利要求11或12所述的方法,其特征在于,所述根据场景识别结果,生成屏幕刷新率切换指令,包括:
    所述刷新率决策模块根据所述场景识别结果,生成所述屏幕刷新率切换指令。
  14. 根据权利要求12或13所述的方法,其特征在于,所述根据场景识别结果,生成屏幕刷新率切换指令,包括:
    当所述场景识别结果表示当前场景变化为静态显示场景时,生成所述屏幕刷新率切换指令,其中切换后的第二屏幕刷新率低于当前的第一屏幕刷新率;或者,
    当所述场景识别结果表示当前场景变化为动态显示场景时,生成所述屏幕刷新率切换指令,其中切换后的第二屏幕刷新率高于当前的第一屏幕刷新率。
  15. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    根据所述第二屏幕刷新率,确定所述第二Vsync周期。
  16. 根据权利要求15所述的方法,其特征在于,所述根据所述第二屏幕刷新率,确定所述第二Vsync周期,包括:
    当所述第二屏幕刷新率为R赫兹时,确定所述第二Vsync周期为1000/R毫秒。
  17. 根据权利要求16所述的方法,其特征在于,所述第二屏幕刷新率为以下中的任一项:1Hz、10Hz、30Hz、40Hz、60Hz、90Hz、120Hz。
  18. 根据权利要求1所述的方法,其特征在于,所述显示屏为有机发光二极体OLED显示屏。
  19. 一种显示驱动集成芯片DDIC,其特征在于,所述DDIC应用于显示屏,所述DDIC用于执行存储器中存储的计算机程序或指令,以使得实现如权利要求1至18中任一项所述的方法。
  20. 根据权利要求19所述的DDIC,其特征在于,所述显示屏为有机发光二极体OLED显示屏。
  21. 一种电子设备,其特征在于,包括处理器,所述处理器与存储器耦合,所述处理器用于执行所述存储器中存储的计算机程序或指令,以使得所述电子设备实现如权利要求1至18中任一项所述的方法。
  22. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求1至18中任一项所述的方法。
  23. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序,当所述计算机程序被电子设备执行时,使得所述电子设备实现如权利要求1至18中任一项所述的方法。
PCT/CN2022/141110 2022-02-28 2022-12-22 控制屏幕刷新率动态变化的方法及电子设备 WO2023160194A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US18/275,305 US20240185775A1 (en) 2022-02-28 2022-12-22 Method for controlling dynamic change of screen refresh rate and electronic device
EP22919271.1A EP4266302A1 (en) 2022-02-28 2022-12-22 Method for controlling dynamic change in screen refresh rate, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210191454.6A CN114648951B (zh) 2022-02-28 2022-02-28 控制屏幕刷新率动态变化的方法及电子设备
CN202210191454.6 2022-02-28

Publications (1)

Publication Number Publication Date
WO2023160194A1 true WO2023160194A1 (zh) 2023-08-31

Family

ID=81992762

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/141110 WO2023160194A1 (zh) 2022-02-28 2022-12-22 控制屏幕刷新率动态变化的方法及电子设备

Country Status (4)

Country Link
US (1) US20240185775A1 (zh)
EP (1) EP4266302A1 (zh)
CN (1) CN114648951B (zh)
WO (1) WO2023160194A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114648951B (zh) * 2022-02-28 2023-05-12 荣耀终端有限公司 控制屏幕刷新率动态变化的方法及电子设备
CN116048933B (zh) * 2022-08-09 2024-05-03 荣耀终端有限公司 一种流畅度检测方法
CN117711356A (zh) * 2022-08-24 2024-03-15 荣耀终端有限公司 一种屏幕刷新率切换方法及电子设备
CN116684677B (zh) * 2022-09-20 2024-06-11 荣耀终端有限公司 一种电子设备动效播放方法、电子设备及存储介质
CN116092452B (zh) * 2023-01-05 2023-10-20 荣耀终端有限公司 一种刷新率切换方法及电子设备
CN115841804B (zh) * 2023-02-21 2023-06-06 深圳曦华科技有限公司 分辨率实时切换控制方法及装置
CN116578261B (zh) * 2023-07-10 2024-03-29 荣耀终端有限公司 电子设备及其显示方法

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105427785A (zh) * 2014-09-17 2016-03-23 联发科技股份有限公司 用于动态刷新率切换的处理器与相关电子装置及方法
CN110333834A (zh) * 2019-05-09 2019-10-15 京东方科技集团股份有限公司 帧频调整方法及装置、显示设备、计算机可读存储介质
CN112331145A (zh) * 2020-11-17 2021-02-05 Oppo广东移动通信有限公司 显示屏变频方法、ddic芯片、显示屏模组及终端
CN112511716A (zh) * 2020-11-17 2021-03-16 Oppo广东移动通信有限公司 图像显示方法、ddic芯片、ap、显示屏模组及终端
CN112667340A (zh) * 2020-12-31 2021-04-16 努比亚技术有限公司 屏幕刷新控制方法、移动终端及计算机可读存储介质
WO2021153955A1 (ko) * 2020-01-31 2021-08-05 삼성전자 주식회사 표시 장치를 포함하는 전자 장치 및 그의 동작 방법
CN113362783A (zh) * 2020-03-06 2021-09-07 华为技术有限公司 刷新率切换方法和电子设备
CN113630572A (zh) * 2021-07-09 2021-11-09 荣耀终端有限公司 帧率切换方法和相关装置
CN114648951A (zh) * 2022-02-28 2022-06-21 荣耀终端有限公司 控制屏幕刷新率动态变化的方法及电子设备

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111613173A (zh) * 2019-02-23 2020-09-01 华为技术有限公司 显示驱动系统、显示模组、显示屏的驱动方法及电子设备
CN112445315A (zh) * 2019-08-28 2021-03-05 北京小米移动软件有限公司 屏幕刷新帧率的控制方法、装置及存储介质
CN111968582B (zh) * 2020-01-14 2022-04-15 Oppo广东移动通信有限公司 显示屏变频方法、ddic芯片、显示屏模组及终端
CN113140173B (zh) * 2020-01-17 2023-01-13 华为技术有限公司 显示驱动器及控制方法、显示控制电路系统、电子设备
CN113160748B (zh) * 2020-01-22 2022-03-29 Oppo广东移动通信有限公司 显示屏变频方法、显示驱动集成电路芯片及应用处理器
CN113160747B (zh) * 2020-01-22 2022-08-05 Oppo广东移动通信有限公司 显示屏变频方法、显示驱动集成电路芯片及应用处理器
CN114040238B (zh) * 2020-07-21 2023-01-06 华为技术有限公司 一种显示多个窗口的方法及电子设备
CN113781949B (zh) * 2021-09-26 2023-10-27 Oppo广东移动通信有限公司 图像显示方法、显示驱动芯片、显示屏模组及终端

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105427785A (zh) * 2014-09-17 2016-03-23 联发科技股份有限公司 用于动态刷新率切换的处理器与相关电子装置及方法
CN110333834A (zh) * 2019-05-09 2019-10-15 京东方科技集团股份有限公司 帧频调整方法及装置、显示设备、计算机可读存储介质
WO2021153955A1 (ko) * 2020-01-31 2021-08-05 삼성전자 주식회사 표시 장치를 포함하는 전자 장치 및 그의 동작 방법
CN113362783A (zh) * 2020-03-06 2021-09-07 华为技术有限公司 刷新率切换方法和电子设备
CN112331145A (zh) * 2020-11-17 2021-02-05 Oppo广东移动通信有限公司 显示屏变频方法、ddic芯片、显示屏模组及终端
CN112511716A (zh) * 2020-11-17 2021-03-16 Oppo广东移动通信有限公司 图像显示方法、ddic芯片、ap、显示屏模组及终端
CN112667340A (zh) * 2020-12-31 2021-04-16 努比亚技术有限公司 屏幕刷新控制方法、移动终端及计算机可读存储介质
CN113630572A (zh) * 2021-07-09 2021-11-09 荣耀终端有限公司 帧率切换方法和相关装置
CN114648951A (zh) * 2022-02-28 2022-06-21 荣耀终端有限公司 控制屏幕刷新率动态变化的方法及电子设备

Also Published As

Publication number Publication date
EP4266302A1 (en) 2023-10-25
CN114648951B (zh) 2023-05-12
US20240185775A1 (en) 2024-06-06
CN114648951A (zh) 2022-06-21

Similar Documents

Publication Publication Date Title
WO2023160194A1 (zh) 控制屏幕刷新率动态变化的方法及电子设备
WO2018120546A1 (zh) 一种图像显示的方法及终端设备
US20130139186A1 (en) Application programming interface for providing native and non-native display utility
WO2016095728A1 (zh) 一种多窗口显示方法及装置
WO2024041047A1 (zh) 一种屏幕刷新率切换方法及电子设备
WO2023093458A1 (zh) 确定墨水屏的刷新模式的方法、电子设备和存储介质
WO2023040666A1 (zh) 键盘显示方法、折叠屏设备和计算机可读存储介质
US11249640B2 (en) Electronic apparatus and controlling method thereof
WO2023001163A1 (zh) 一种可提升动效性能的屏幕刷新方法及设备
US20240161670A1 (en) Dynamic refresh rate switching
US20240071283A1 (en) Independent refresh rate for multiple monitors
US8773442B2 (en) Aligning animation state update and frame composition
CN111857902A (zh) 应用的显示方法、装置、设备和可读存储介质
WO2021056364A1 (en) Methods and apparatus to facilitate frame per second rate switching via touch event signals
WO2024016798A1 (zh) 图像显示方法和相关装置
CN112241303A (zh) 图像处理方法及系统、电子设备及存储介质
CN110609599A (zh) 双屏终端的显示方法、装置、存储介质及终端
WO2023160209A1 (zh) 帧数据显示方法、电子设备及存储介质
CN115639920B (zh) 绘制方法、电子设备和可读存储介质
CN117234319B (zh) 一种屏幕刷新率的设置方法及电子设备
WO2024055904A1 (zh) 一种请求vSync信号的方法及电子设备
WO2024078121A1 (zh) 图像处理方法和电子设备
CN117707406A (zh) 一种亮屏显示方法、电子设备及存储介质
CN118283317A (zh) 显示控制方法、显示控制系统、计算机设备及存储介质
CN117133232A (zh) 一种显示方法、芯片及电子设备

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022919271

Country of ref document: EP

Effective date: 20230718

WWE Wipo information: entry into national phase

Ref document number: 18275305

Country of ref document: US

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

Ref document number: 22919271

Country of ref document: EP

Kind code of ref document: A1