Display screen refresh rate switching method, electronic equipment and storage medium

By switching the display refresh rate in electronic devices, the problem of flower screen display in under-screen fingerprint unlocking scenarios is solved, achieving a more stable user experience and lower power consumption.

CN119649723AActive Publication Date: 2025-03-18HONOR DEVICE CO LTD

Patent Information

Application Number
CN202411456852.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-03-18
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

In the under-screen fingerprint unlocking scenario, the display may have a screen display problem.

Method used

By implementing the switching method of the display refresh rate in an electronic device, the display refresh rate is set to a value matching the fingerprint unlocking spot in response to the fingerprint unlocking operation, and no switching operation of the refresh rate during the unlocking process is to avoid displaying in the screen.

Benefits of technology

It effectively avoids the problem of displaying screens in under-screen fingerprint unlocking scenarios, and also avoids unnecessary power consumption and waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119649723A_ABST
    Figure CN119649723A_ABST
Patent Text Reader

Abstract

The invention provides a display screen refresh rate switching method, electronic equipment and a storage medium. In the method, when the electronic equipment enters an under-screen fingerprint unlocking scene, the refresh rate of a display screen is set to be a numerical value matched with a fingerprint unlocking light spot. In the fingerprint unlocking process, the electronic equipment does not respond to any switching operation on the screen refresh rate, and the screen refresh rate is kept to be the numerical value matched with the fingerprint unlocking light spot. In this way, the problem of blurred screen display in the under-screen fingerprint unlocking scene can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart terminal technology, and in particular to a method for switching a refresh rate of a display screen, an electronic device, and a storage medium. Background Art

[0002] With the continuous development of technology, the refresh rate of display screens has been continuously improved. From the early 60Hz display screens to the current 90Hz, 120Hz and even 144Hz high refresh rate displays, the refresh rate of display screens is getting higher and higher. High refresh rate can bring smoother visual effects, faster response speed, and better user experience. It is suitable for some application scenarios with high requirements for display effects, such as games, video playback, etc., but it also brings some problems, such as higher power consumption.

[0003] In order to improve the balance between display effect and energy efficiency of electronic devices and provide a better user experience, the automatic display refresh rate switching technology came into being. The automatic display refresh rate switching technology detects the degree of change of the content displayed on the screen and automatically adjusts the display refresh rate to provide better display effect and energy efficiency. When the content on the screen changes less or is static, the display refresh rate automatically decreases to save battery power; in scenarios that require a smoother display, the increase in the display refresh rate can achieve the effect of improving the fluency and smoothness of the picture. Summary of the invention

[0004] The present application provides a display refresh rate switching method, electronic device and storage medium. The method can solve the screen distorting problem that may occur in the under-screen fingerprint unlocking scenario.

[0005] In the first aspect, an embodiment of the present application provides a method for switching the refresh rate of a display screen. The method is applied to an electronic device, wherein the electronic device includes a display screen and an application processor, and the application processor and the display screen are connected via a mobile industry processor interface (MIPI) bus. The electronic device also includes an under-screen fingerprint sensor, which can be used to collect the user's fingerprint data so that the electronic device can perform an unlocking operation based on the fingerprint data collected.

[0006] The method includes: the electronic device displays a first interface in response to a touch operation in a fingerprint unlocking area, and sets the refresh rate of the display screen to a first value; the first interface includes a preset image; during the process of the electronic device displaying the first interface, the electronic device does not respond to the switching operation of the refresh rate of the display screen, and the refresh rate of the display screen remains at the first value.

[0007] The refresh rate of the display screen is set to the first value, which can be understood as the number of times the display screen is refreshed per second is the first value. For example, the first value is 120, that is, the refresh rate of the display screen is set to 120 Hz.

[0008] Exemplarily, the preset image is the fingerprint collection light spot mentioned below, and the fingerprint collection light spot is a hard light spot. The configuration parameters of the hard light spot burned into the display screen when it leaves the factory match the refresh rate of the first value.

[0009] The electronic device does not respond to the switching operation of the refresh rate of the display screen. It can be understood that when the application triggers the display refresh rate switching, the electronic device does not switch the display refresh rate and maintains the currently set screen refresh rate.

[0010] In this way, when the electronic device enters the under-screen fingerprint unlocking scenario, the refresh rate of the display screen is set to a value that matches the fingerprint unlocking spot. During the fingerprint unlocking process, the electronic device does not respond to any switching operation on the screen refresh rate, and keeps the screen refresh rate at a value that matches the fingerprint unlocking spot. In this way, the problem of distorted screen display in the under-screen fingerprint unlocking scenario can be avoided.

[0011] According to the first aspect, when the refresh rate of the display screen maintains a first value, the MIPI clk of the display screen is the first value.

[0012] In this implementation, the refresh rate of the display screen is matched with the MIPI clk. For example, when the refresh rate of the display screen is 120Hz, the MIPI clk of the display screen is also set to 120Hz, which can not only avoid the problem of distorted display on the display screen, but also avoid unnecessary power consumption.

[0013] According to the first aspect, or any implementation of the first aspect above, the electronic device does not respond to the modification operation of the refresh rate of the display screen, including: when the electronic device sets the image synthesis frame rate of the SurfaceFlinger module to a second value, the refresh rate of the HWC module remains at the first value.

[0014] The image synthesis frame rate is set to the second value, which can be understood as the number of frames of the display screen synthesizing the image per second is the second value. Exemplarily, the second value is 60, that is, the image synthesis frame rate is set to 60FPS.

[0015] The image synthesis frame rate of the SurfaceFlinger module can be set according to the actual situation. In this implementation, when the electronic device is in the under-screen fingerprint unlocking scenario and the screen refresh rate is set to the first value, if the image synthesis frame rate of the SurfaceFlinger module is set to the second value, the refresh rate of the HWC module remains at the first value and will not be adjusted to the second value with the SurfaceFlinger module.

[0016] In this way, it can be ensured that in the under-screen fingerprint unlocking scenario, the screen refresh rate remains at the first value, always matches the screen refresh rate corresponding to the hard spot configuration parameters, and will not affect the rate at which the fingerprint sensor collects fingerprint data.

[0017] According to the first aspect, or any implementation of the first aspect above, after the electronic device stops displaying the first interface, when the image synthesis frame rate of the SurfaceFlinger module is set to a third value, the refresh rate of the HWC module is set to the third value; the electronic device sets the refresh rate of the display screen to the third value.

[0018] The electronic device also sets the MIPI clk of the display screen to a third value.

[0019] In this way, after the electronic device exits the fingerprint unlocking scenario, the electronic device responds normally to the switching operation of the screen refresh rate, and will not affect the dynamic adjustment of the display refresh rate. In addition, the dynamic matching of the MIPI clk of the display and the screen refresh rate can not only avoid the problem of screen distortion, but also avoid unnecessary power consumption.

[0020] According to the first aspect, or any implementation of the first aspect above, the electronic device sets the refresh rate of the display screen to the first value, including: the electronic device switches the refresh rate of the display screen from the fourth value to the first value. The method also includes: the electronic device displays the second interface in response to the lifting operation in the fingerprint unlocking area, and sets the refresh rate of the display screen to the fourth value.

[0021] In this way, after the display screen performs LHBM, the refresh rate of the display screen is switched from the fourth value to the first value, and after the display screen exits LHBM, the refresh rate of the display screen can be restored to the fourth value.

[0022] According to the first aspect, or any implementation of the first aspect above, when the electronic device sets the image synthesis frame rate of the SurfaceFlinger module to a second value, the electronic device further includes: the electronic device sets the value of the target configuration parameter to a first parameter value, and the first parameter value is used to indicate that the image synthesis frame rate is the second value. The refresh rate of the HWC module is maintained at the first value, including: the electronic device replaces the value of the target configuration parameter with the second parameter value, and the second parameter value is used to indicate that the image synthesis frame rate is the first value.

[0023] Among them, the target configuration parameters may be configuration parameters related to the image synthesis frame rate in the Commit command, which may include but are not limited to CRTC_SET_CORE_CLK, CRTC_SET_CORE_AB, CRTC_SET_LLCC_AB, CRTC_SET_DRAM_AB, CRTC_SET_ROT_PREFILL_BW, CRTC_SET_CORE_IB, CRTC_SET_LLCC_IB, CRTC_SET_DRAM_IB, and CRTC_SET_ROT_CLK.

[0024] When the electronic device is in the under-screen fingerprint unlocking scenario, HWC will not block the Commit process sent by SurfaceFlinger, but will replace the values ​​of the relevant configuration parameters in the Commit command it receives, specifically replacing them with parameter values ​​corresponding to the refresh rate of the first value, so that after HWC sends the Commit command to the display driver, the display driver does not need to switch the screen refresh rate, that is, the display driver controls the screen to maintain the currently set refresh rate corresponding to the first value.

[0025] According to the first aspect, or any implementation of the first aspect above, the electronic device replaces the value of the target configuration parameter with the second parameter value, including: the electronic device determines that the value of the target variable is the first value; the electronic device replaces the value of the target configuration parameter with the second parameter value.

[0026] Exemplarily, the target variable may be the finger down state variable mentioned below, and the first value may be true.

[0027] When the value of the target variable is the first value, HWC determines that the electronic device is currently in a fingerprint unlocking scenario. HWC does not block the Commit process sent by SurfaceFlinger, but replaces the values ​​of relevant configuration parameters in the Commit command it receives.

[0028] According to the first aspect, or any implementation of the first aspect above, the method further includes:

[0029] In response to a touch operation in the fingerprint unlocking area, the electronic device sets the value of the target variable to a first value; in response to a lift operation in the fingerprint unlocking area, the electronic device sets the value of the target variable to a second value; the second value is different from the first value.

[0030] Exemplarily, the first value may be false.

[0031] Exemplarily, a target variable is pre-set in the HWC. When the value of the target variable is a first value, it indicates that the current finger state of the current user is a finger down state, and the HWC determines that the electronic device is currently in a fingerprint unlocking scenario; when the value of the target variable is a second value, it indicates that the current finger state of the current user is a finger up state, and the HWC determines that the electronic device is not currently in a fingerprint unlocking scenario.

[0032] In this way, HWC can determine whether the electronic device is currently in a fingerprint unlocking scenario based on the current value of the target variable, and then determine how to process the Commit process sent by SurfaceFlinger based on the judgment result.

[0033] In a second aspect, an embodiment of the present application provides an electronic device. The electronic device includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device executes the method for switching the refresh rate of the display screen of the first aspect and any one of the first aspects.

[0034] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0035] In a third aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium includes a computer program, and when the computer program is executed on an electronic device, the electronic device executes the method for switching the refresh rate of a display screen according to the first aspect and any one of the first aspects.

[0036] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0037] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed, enables a computer to execute a method for switching a display screen refresh rate as described in the first aspect or any one of the first aspects.

[0038] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0039] In a fifth aspect, the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the display refresh rate switching method as in the first aspect or any one of the first aspects, to control the receiving pin to receive a signal, to control the sending pin to send a signal.

[0040] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 is a schematic diagram of the hardware structure of an electronic device shown as an example;

[0042] Figure 2 A schematic diagram showing an exemplary fingerprint sensor setting position;

[0043] Figure 3 A schematic diagram of the software structure of an electronic device is shown as an example;

[0044] Figure 4 The image display process is shown as an example;

[0045] Figure 5 Schematic diagram showing an example of comparing whether MIPI clk and screen refresh rate are coordinated and adjusted;

[0046] Figure 6 It is a schematic diagram showing that MIPI clk and screen refresh rate switching are out of sync;

[0047] Figure 7a It is a schematic diagram showing exemplary synchronization of MIPI clk and screen refresh rate switching effectiveness;

[0048] Figure 7bIt is a flow chart showing the synchronization of MIPI clk and screen refresh rate switching taking effect;

[0049] Figure 8 This is a schematic diagram of an exemplary under-screen fingerprint unlocking scenario;

[0050] Figure 9a This is a schematic diagram of the process of switching the screen refresh rate involved in an exemplary under-screen fingerprint unlocking scenario;

[0051] Figure 9b This is a schematic diagram of the process of switching the screen refresh rate involved in an exemplary under-screen fingerprint unlocking scenario;

[0052] Fig.9c This is a schematic diagram of the process of switching the screen refresh rate involved in an exemplary under-screen fingerprint unlocking scenario;

[0053] Fig.10a The flowchart for exemplarily showing the display screen entering the LHBM;

[0054] Fig.10b The flowchart for exemplarily showing the display screen exiting LHBM;

[0055] Fig.11 The following is a flowchart showing the sending and displaying of a frame of image by way of example;

[0056] Fig.12a This is a schematic diagram of processing when no image is displayed in an under-screen fingerprint unlocking scenario;

[0057] Figure 12b This is a schematic diagram of the processing when there is a picture display in the under-screen fingerprint unlocking scenario shown as an example;

[0058] Fig.12c This is a schematic diagram showing the processing when a picture is displayed in a non-under-screen fingerprint unlocking scenario. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0060] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0061] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0062] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0063] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

[0064] Before introducing the method for switching the refresh rate of a display screen provided in the present application, some terms used in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.

[0065] 1) Frame rate, also known as frame rate, is measured in frames per second, denoted as FPS (frames per second). Frame rate refers to the number of image frames generated by the graphics card (i.e. GPU) per second, that is, the number of images that the graphics card (i.e. GPU) can render and display per second. For example, the frame rate can be 30FPS, 60FPS, 120FPS, etc. In some cases, the frame rate can also be called the frame frequency, denoted as Hertz (Hz), for example, the frame rate is 60Hz, 120Hz, etc.

[0066] Multiple still images displayed quickly and continuously form a dynamic picture. The higher the frame rate of the video, the better the continuity of the picture. A high frame rate can produce a smoother and more realistic picture. The more frames per second, the smoother the displayed action will be, and the better the picture quality will be.

[0067] 2) Screen refresh rate (also called display refresh rate) is the number of times the screen can refresh the image per second, measured in Hertz (Hz). For example, a screen with a refresh rate of 60Hz means that the screen can refresh the display 60 times in 1 second. Similarly, a screen with a refresh rate of 120Hz means that the screen can refresh the display 120 times in 1 second. The higher the refresh rate, the more frames the screen can display. Correspondingly, the lower the image delay and the higher the fluency.

[0068] It should be noted that in some scenarios, the screen refresh rate can also be expressed as n FPS. That is, in some scenarios, the screen refresh rate can be expressed by the number of frames displayed per second (FPS). For example, a 60Hz screen refresh rate can be expressed as 60FPS, and a 120Hz screen refresh rate can be expressed as 120FPS.

[0069] 3) Vertical scanning (Vsync), a top-to-bottom refresh mechanism, is used to synchronize the refresh rate and frame rate of the display screen to avoid screen tearing. In the vertical refresh mechanism, the electronic device can periodically generate a vertical synchronization signal. The vertical synchronization signal can include a software Vsync signal and a hardware-generated Vsync signal. The software Vsync signal can trigger the frame drawing and frame synthesis of the electronic device.

[0070] Specifically, the software Vsync signal may include a VsyncAPP signal and a VsyncSF signal. The VsyncAPP signal is used to trigger the frame drawing process. That is, when the application of the electronic device receives the VsyncAPP signal, the frame drawing can be performed. The VsyncSF signal is used to trigger the frame synthesis process. That is, when the image synthesis system (SurfaceFlinger) of the electronic device receives the VsyncSF signal, the frame after the frame drawing can be frame synthesized.

[0071] 4) Tearing effect (TE) signal is a signal output by the timing controller of an electronic device to prevent tearing when the screen is refreshed during image display. The TE signal can be understood as a Vsync signal generated by hardware. The TE signal can be set according to the screen refresh frequency. For example, when the screen refresh frequency is 60Hz, the TE signal period is 16.6ms, that is, the electronic device generates a control signal every 16.6ms to trigger the TE signal period.

[0072] When users play games or watch videos on electronic devices and other dynamic display scenes (also known as dynamic display scenes), when the refresh rate and 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 the refresh rate is low (such as 30Hz), the screen will freeze or even tear. This situation often occurs in dynamic display scenes with a frame rate of 60 frames per second or higher (such as game scenes).

[0073] 5) Variable frequency display mode of the display screen refers to the screen of the electronic device being able to support dynamic switching of the refresh rate within a certain range, for example, switching between 1Hz and 120Hz. This provides the basic physical conditions for supporting dynamic changes in the refresh rate during various dynamic display scenes in the electronic device system, and can achieve more extreme power saving effects.

[0074] 6) Display screens can be divided into video mode (Video Mode) display screens and command mode (Command Mode) display screens according to the interface mode.

[0075] The working mode of the video mode display is similar to the traditional RGB interface. The main processor (also called the application processor (AP)) connected to the display needs to continuously refresh the display. Since no dedicated data signal is used to transmit synchronization information, the control signal and RGB data are transmitted through the MIPI bus in the form of messages. Because the application processor needs to refresh the display regularly, the display does not need a frame buffer.

[0076] In command mode, the MIPI bus controller of the main processor uses display command messages to send data to the display. The command mode display has a full-frame frame buffer (such as RAM (Random Access Memory)) to store frame data. Frame data refers to a frame of image data sent by the AP in a certain frame cycle. After the frame data is placed in the frame buffer of the display, the DDIC (Display Driver IC) of the display reads the frame data from the frame buffer and displays the data on the screen (Panel). When the main processor writes frame data to the frame buffer, it is controlled by the TE signal generated by the main processor and the DDIC of the display. When the DDIC reads frame data from the frame buffer, it is also controlled by the TE signal. The high level of the TE signal includes the VFP (Vertical Front Porch) signal and the VBP (Vertical Back Porch) signal. The main processor receives the TE signal sent by the DDIC and starts writing data into the frame buffer at the rising edge of the VFP signal; the DDIC starts reading frame data from the frame buffer at the falling edge of the VBP signal. To avoid tearing, the main processor writes frame data into the frame buffer at a higher speed than the data driver reads frame data from the frame buffer.

[0077] Figure 1 The schematic diagram of the structure of the electronic device is shown. For example, the electronic device may be a mobile phone, a tablet computer, etc. This embodiment does not limit the type of electronic device. It should be understood that Figure 1 The electronic device shown is only one example of an electronic device, and the electronic device may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. Figure 1 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0078] The electronic device may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0079] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0080] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0081] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0082] It is understandable that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0083] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0084] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to electronic devices. The wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc., applied to electronic devices. In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology.

[0085] The electronic device implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0086] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicrOLED, Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0087] In this embodiment, the interface mode of the display screen is the command mode, that is, the display screen is a command mode display screen.

[0088] The electronic device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0089] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0090] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0091] The electronic device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0092] The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., which are not listed here one by one and the present application does not impose any limitation on this.

[0093] The pressure sensor is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor can be set on the display screen 194. When a force acts on the pressure sensor, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device detects the intensity of the touch operation based on the pressure sensor. The electronic device can also calculate the position of the touch based on the detection signal of the pressure sensor.

[0094] Fingerprint sensors are used to collect fingerprints. Electronic devices can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering calls, etc.

[0095] For example, in the embodiment of the present application, the fingerprint sensor can output the collected fingerprint to the processor 110, and the processor 110 can perform operations such as identification and entry on the fingerprint to realize functions such as fingerprint entry and fingerprint unlocking.

[0096] Figure 2 Schematic diagram of the position of the fingerprint sensor shown as an example. Figure 2 , for example, taking the electronic device as a mobile phone, the fingerprint sensor can be arranged under the display screen of the mobile phone, referred to as the under-screen fingerprint sensor, which can be used for under-screen fingerprint unlocking. Optionally, the fingerprint sensor can usually be set to a corresponding position according to the width and length of the mobile phone, so that when the user holds the mobile phone with one hand, the user's thumb can touch the fingerprint sensing area corresponding to the fingerprint sensor. Of course, the above setting method is only an illustrative example. In other embodiments, the mobile phone may be provided with multiple fingerprint sensors, and the position of the fingerprint sensor may be set according to actual needs, which is not limited in this application. For example, the fingerprint sensor may be distributed at multiple positions under the display screen, so that the user can press and input the fingerprint at any position on the screen. Exemplarily, the fingerprint sensor in the embodiment of the present application is an under-screen (i.e., under the display screen) sensor, that is, the fingerprint sensor is arranged in the display screen (or under the display screen).

[0097] A touch sensor is also called a "touch panel" or a TP (TouchPad) sensor. The touch sensor can be arranged on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor can also be arranged on the surface of the electronic device, which is different from the position of the display screen 194.

[0098] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.

[0099] Figure 3 It is a software structure block diagram of the electronic device according to an embodiment of the present application.

[0100] The layered architecture of electronic devices divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the hardware abstract layer (HAL), and the kernel layer.

[0101] The application layer can include a series of application packages.

[0102] like Figure 3 As shown, the application package may include video applications, game applications, lock screen applications, fingerprint applications, etc. The application package may also include camera, gallery, WLAN, Bluetooth, call, calendar, map, navigation, music, short message, etc.

[0103] For example, the fingerprint application can provide functions such as fingerprint entry, fingerprint recognition, and fingerprint unlocking.

[0104] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0105] like Figure 3As shown, the application framework layer may include a fingerprint service (FingerPrint Service), a SurfaceFlinger service, an input (Input) system, an AGP (Android Gradle Plugin), and the like.

[0106] The fingerprint service can be understood as a system service, which is used to provide some services related to fingerprints, such as fingerprint entry and deletion, fingerprint authentication, and fingerprint security policies. For example, the application can communicate with the fingerprint service through the fingerprint manager (FingerPrint Manager).

[0107] SurfaceFlinger is a system-level service responsible for managing and compositing all visible content of the application interface (UI). It plays a role similar to that of a window manager and a graphics renderer, ensuring the correct display and smooth rendering of all UI elements. The role of SurfaceFlinger in the Android system can include, but is not limited to: buffer management (managing graphics buffers, which contain the content of the application interface, such as windows, bitmaps, and other graphic elements), compositor (compositing different applications, system UI components, and other graphics layers into the final display frame to ensure that each layer is superimposed in the correct order and transparency) and hardware acceleration (using hardware acceleration functions (such as GPU) to improve graphics rendering performance).

[0108] The Input system is an important module in the Android system. It is the core component responsible for processing user input operations. The system obtains raw input events from various input devices and converts them into KeyEvent or MotionEvent objects that Android applications can understand and consume.

[0109] AGP is a plug-in for Gradle that provides specific features for Android development, making it easier for developers to build, test, and publish Android applications. AGP brings many features to Android projects, including but not limited to core features such as task management, dependency management, and incremental builds.

[0110] In addition, the application framework layer may also include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0111] HAL is an interface layer between the operating system kernel and the hardware circuit. HAL may include TP HAL, fingerprint HAL, HWC (Hwcomposer), etc. Among them, TP HAL may perform relevant processing based on the data and / or events reported by the TP sensor driver. Fingerprint HAL may perform relevant processing based on the data and / or events reported by the fingerprint sensor driver.

[0112] In an embodiment of the present application, the fingerprint HAL may send an instruction to enter LHBM (Local High Bright Mode) to the display driver after receiving a finger down event in the fingerprint sensing area reported by the fingerprint sensor driver.

[0113] Accordingly, the fingerprint HAL may send an instruction to exit the LHBM to the display driver after receiving a Finger Up event in the fingerprint sensing area reported by the fingerprint sensor driver.

[0114] HWC is a HAL module for window synthesis and display, providing hardware support for SurfaceFlinger service.

[0115] In an embodiment of the present application, when the refresh rate of the display screen switches from a high refresh rate to a low refresh rate, the HWC submits a Commit command to the display driver twice. When the Commit command is submitted for the first time, the display driver is notified to switch the screen refresh rate. When the Commit command is submitted for the second time, the DSI module is notified to switch the MIPI clk.

[0116] HWC does not block any Commit submission to SurfaceFlinger. In the under-screen fingerprint unlocking scenario, HWC replaces the relevant configuration parameter values ​​in the Commit command to make the frame rate indicated by the Commit command consistent with the current screen refresh rate, so as to achieve the effect of not responding to the screen refresh rate switch in the under-screen fingerprint unlocking scenario. In the non-under-screen fingerprint unlocking scenario, HWC does not replace the relevant configuration parameter values ​​in the Commit command, and directly submits the Commit command to the display driver according to the existing logic.

[0117] In some embodiments, the Android system may further include an Android Runtime and a system library, and the Android Runtime and the system library may be located between the application framework layer and the hardware abstraction layer.

[0118] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the core library of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application 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 system library can include multiple functional modules. For example: surface manager, media library, 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.

[0119] The kernel layer is the layer between hardware and software. The kernel layer at least includes display driver, TP driver, fingerprint sensor driver, etc. Among them, the hardware at least includes processor, display screen, TP sensor, fingerprint sensor, etc.

[0120] Understandably, Figure 3 The layers in the software structure shown and the components contained in each layer do not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, or combine certain components, or split certain components, or arrange components differently, which is not limited in the present application.

[0121] It is understandable that in order to implement the method for switching the refresh rate of the display screen in the embodiment of the present application, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.

[0122] Combine the following Figure 4 Explain the image drawing and display process. Figure 4As shown, in the Android system, the image drawing and display process requires the application processor and the display screen (including DDIC and Panel) to work together, and the application processor and the display screen communicate through the MIPI bus. Among them, on the application processor side, the page is first drawn through the application (application, App), and then the drawn layers are synthesized through SurfaceFlinger to obtain image data. The image data is processed by HWC and sent to the display driver. Then, the application processor sends the image data to the DDIC buffer through MIPI. DDIC scans (reads) the image data in the buffer, controls the Panel to complete the refresh rate switch, and performs image refresh display (display).

[0123] MIPI clk refers to the clock frequency of MIPI, specifically the clock frequency when image data is transmitted between the application processor and the display screen, which determines the rate at which image data is transmitted from the application processor to the display screen. Specifically, MIPI supports high-speed and high-bandwidth data transmission. However, in high-speed mode, power consumption is relatively high. Reducing the MIPI clock frequency (i.e., reducing MIPIclk) can reduce the data transmission rate and thus reduce the power consumption of the device. This adjustment is suitable for scenarios that do not require high-speed data transmission, especially in low refresh rates, and can further optimize the battery life of the device.

[0124] In a high refresh rate display scenario, the software side generates image data at a high frequency, and accordingly, the display screen side performs high-frequency image refresh according to the image data, thereby improving the smoothness of the picture. Since the human eye is more sensitive to moving objects, a higher screen refresh rate can enhance the user's visual experience in various dynamic display scenarios. When an electronic device senses that it is currently in 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 requirements of the dynamic display scene. In order to reduce the power consumption of the electronic device, when the electronic device senses that it is currently in a non-dynamic display scene, it can also switch the current screen refresh rate to a lower screen refresh rate. In this way, when the display screen adopts a variable frequency display mode, its refresh rate can be dynamically switched according to the application scenario.

[0125] MIPI clk is the basis for screen data transmission, while the screen refresh rate is the frequency of screen image updates. If MIPI clk is lower than the screen refresh rate, electronic devices will have display problems such as image tearing. When MIPI clk is lower than the screen refresh rate, the time it takes for a frame of image data to be transmitted through MIPI is longer than the display time of a frame of image. That is, before the image data is transmitted through MIPI, the display screen will refresh the screen, resulting in an incomplete displayed image and display problems such as image tearing. When MIPI clk is higher than the screen refresh rate, although it will not cause display problems such as image tearing in electronic devices, the power consumption of the device is relatively high, and there is unnecessary power consumption waste. In this way, when the two are consistent, not only can the screen display normally without display problems such as image tearing, but it will also not cause waste of device power consumption.

[0126] Figure 5 (1) shows an exemplary case where the screen refresh rate is adjusted but the MIPI clk is not adjusted. Figure 5 In (1), when the screen refresh rate is 120Hz, the display time of a frame of image is 8.3ms. At this time, MIPI clk is consistent with the screen refresh rate, which is also 120Hz. Exemplarily, the time it takes for a frame of image data to be transmitted through MIPI is 5ms. When the screen refresh rate switches from 120Hz (high refresh rate) to 60Hz (high refresh rate), the display time of a frame of image becomes 16.6ms. If MIPI clk is not adjusted, at this time MIPI clk is higher than the adjusted screen refresh rate, and the rate at which a frame of image data is transmitted through MIPI is high, which will not affect the normal display of the image, but the power consumption of the device is relatively high.

[0127] Figure 5 (2) shows an exemplary case of adjusting the screen refresh rate and adjusting the MIPI clk. When the screen refresh rate is switched from 120Hz (high refresh rate) to 60Hz (high refresh rate), the display time of a frame of image becomes 16.6ms, and the MIPI clk is adjusted accordingly. That is, the MIPI clk is also switched from 120Hz to 60Hz, thereby reducing the rate at which image data is transmitted through MIPI. Exemplarily, after the MIPI clk is switched to 60Hz, the time it takes for a frame of image data to be transmitted through MIPI increases to 12ms. At this point, the MIPI clk and screen refresh rate are also consistent, and display problems such as image tearing will not occur. Moreover, when the screen refresh rate is a low refresh rate, electronic devices using a lower MIPI clk can reduce device power consumption.

[0128] In an embodiment of the present application, when the screen refresh rate is switched, the electronic device controls the MIPI clk to switch accordingly so that the MIPI clk and the screen refresh rate remain consistent, thereby ensuring normal display of the screen and device performance.

[0129] Since a frame buffer is not set in the video mode display, the application processor does not need to notify the DDIC when switching the screen refresh rate. It can directly control the display to switch the refresh rate, and the refresh rate switch can take effect immediately.

[0130] Since a frame buffer is set in the command mode display screen, DDIC needs to read image data from the frame buffer to refresh the screen, so the application processor needs to notify DDIC when switching the screen refresh rate, and DDIC implements the switching of the screen refresh rate. Therefore, if the HWC on the application processor side notifies DDIC to switch the screen refresh rate through the display driver when submitting the i-th frame of image data through the Commit command, DDIC receives the refresh rate switching command when processing the i-th frame of image data, and switches the screen refresh rate when processing the i+1-th frame of image data. The switched screen refresh rate takes effect when the screen displays the i+2-th frame of image data.

[0131] If the HWC on the application processor side notifies the DSI (Display Serial Interface) module to switch MIPI clk when submitting the i-th frame of image data through the Commit command, the DSI module receives the MIPI clk switching command when transmitting the i-th frame of image data, and can immediately switch the MIPI clk. The switched MIPI clk will take effect when transmitting the i+1-th frame of image data.

[0132] Reference Figure 6, when the HWC submits the i-th frame of image data through the Commit command, the refresh rate of the command mode display screen is 120Hz (that is, the TE signal period is 8.3ms), and the MIPI clk is 120Hz (that is, the MIPI clk period is 8.3ms). The application processor determines to switch the refresh rate of the command mode display screen from 120Hz to 60Hz. If the HWC notifies the DDIC to switch the screen refresh rate to 60Hz through the display driver when submitting the i-th frame of image data through the Commit command, and notifies the DSI module to switch the MIPI clk to 60Hz, then the 60Hz MIPI clk (that is, the MIPI clk period is 16.6ms) takes effect when the i+1 frame of image data is transmitted through MIPI, and the 60Hz screen refresh rate (that is, the TE signal period is 16.6ms) takes effect only when the screen displays the i+2 frame of image data. In this way, when the application processor sends the i+1 frame of image data for display, the screen refresh rate is higher than the MIPIclk. That is, the time length for the application processor to transmit the i+1th frame of image data through MIPI is longer than the screen refresh time length, so the display screen has to refresh the screen before the i+1th frame of image data transmission is completed, resulting in incomplete image data displayed and screen display distortion.

[0133] In this way, when the screen refresh rate switches from a high refresh rate (such as 120Hz) to a low refresh rate (such as 60Hz), the switching of the screen refresh rate and the switching of MIPI clk are not synchronized. The switching of the screen refresh rate is later than the switching of MIPI clk, which will cause the screen display to be distorted.

[0134] In order to solve the delay problem when switching the refresh rate of the command mode display screen, an embodiment of the present application provides a non-blocking solution for switching the screen refresh rate. Among them, when the refresh rate of the command mode display screen needs to be switched from a high refresh rate to a low refresh rate, the HWC can first notify the DDIC to switch the screen refresh rate through the display driver, and then notify the DSI module to switch the MIPI clk, so that the switched screen refresh rate and MIPI clk can take effect at the same time, avoiding the problem of screen display distortion. For example, when the HWC submits the i-th frame of image data through the Commit command, it notifies the DDIC to switch the screen refresh rate through the display driver, and when submitting the i+1-th frame of image data through the Commit command, it notifies the DSI module to switch the MIPI clk.

[0135] Reference Figure 7a and Figure 7bS201 to S205 explain the non-blocking screen refresh rate switching process. When SurfaceFlinger on the application processor side commits the i-th frame image data to HWC, the frame rate information it carries is 60FPS. After HWC obtains the data committed by SurfaceFlinger, it determines that the frame rate needs to be switched, that is, the frame rate is switched from a high frame rate (120FPS) to a low frame rate (60FPS) based on the frame rate information of the most recent switch recorded (such as 120FPS), which is equivalent to determining that the current screen refresh rate needs to be switched from a high refresh rate (120Hz) to a low refresh rate (60Hz). In this case, HWC first notifies the display driver to switch the screen refresh rate, and then notifies the DSI module to switch MIPIclk. Among them, when HWC performs the first Commit operation, for example, when committing the i-th frame image data to the display driver, it notifies the display driver to switch the screen refresh rate, so that the display driver notifies the DDIC of the display screen to switch the screen refresh rate to 60Hz. Subsequently, when the HWC performs the second Commit operation, for example, when committing the i+1th frame image data to the display driver, the HWC notifies the DSI module to switch the MIPI clk to 60 Hz.

[0136] In this way, when the DDIC processes the i-th frame of image data, it receives the refresh rate switching command and switches the screen refresh rate when processing the i+1-th frame of image data. The switched screen refresh rate takes effect when the screen displays the i+2-th frame of image data. When the DSI module transmits the i+1-th frame of image data, it receives the MIPI clk switching command and performs the MIPI clk switching operation. The switched MIPI clk takes effect when it transmits the i+2-th frame of image data.

[0137] That is, the 60Hz screen refresh rate (i.e., the TE signal cycle is 16.6ms) takes effect when the screen displays the i+2th frame of image data, and at the same time, the 60Hz MIPI clk (i.e., the MIPI clk cycle is 16.6ms) also takes effect when the MIPI bus transmits the i+2th frame of image data. Therefore, the switched screen refresh rate and MIPI clk take effect at the same time, and the screen refresh rate and MIPIclk are always consistent, and the screen display will not be distorted.

[0138] Exemplarily, SurfaceFlinger can call the SetActiveConfig function in HWC to notify HWC to switch the frame rate.

[0139] Exemplarily, when the HWC performs the first Commit operation, it can notify the display driver to switch the screen refresh rate by executing the CONNECTOR_SET_PFS function, so that the display driver sends a command for switching the screen refresh rate to the DDIC.

[0140] Exemplarily, when executing the second Commit operation, the HWC may set the relevant parameters of MIPI by executing the SetQosData function, including but not limited to the bandwidth of MIPI, MIPI clk, etc., and notify the DSI module to complete the relevant parameter switching.

[0141] Exemplarily, when the HWC performs the second Commit operation, it can not only notify the DSI module to switch the MIPI clk to 60Hz, but also notify the DDIC to set the display refresh rate mode through the display driver. Different refresh rate modes correspond to different screen refresh rates. Exemplarily, when the HWC performs the second Commit operation, it can notify the display driver to set the refresh rate mode by executing the CRTC_SET_MODE function, so that the display driver sends a command to set the refresh rate mode to the DDIC.

[0142] In the scenario where the refresh rate of the command mode display switches from a low refresh rate to a high refresh rate, the early increase of MIPI clk will not cause the screen to display distorted images. The early increase of MIPI clk indicates that the rate at which a frame of image data is transmitted through the MIPI bus increases, and there will be no situation where a frame of image data is not fully transmitted when the display is refreshed, and there will be no problem of screen display distorted images.

[0143] In this embodiment, for the scenario where the screen refresh rate switches from a low refresh rate to a high refresh rate, the HWC notifies the display driver to switch the screen refresh rate and notifies the DSI module to switch the MIPI clk during a Commit operation. For the scenario where the screen refresh rate switches from a high refresh rate to a low refresh rate, the HWC first notifies the display driver to switch the screen refresh rate (such as when the previous Commit operation is performed), and then notifies the DSI module to switch the MIPI clk (such as when the next Commit operation is performed), thereby realizing a non-blocking solution for switching the screen refresh rate.

[0144] Currently, electronic devices can be unlocked in various ways, including, but not limited to, fingerprint unlocking, password unlocking, and face unlocking. In the scenario of unlocking an electronic device by fingerprint, the user needs to enter the fingerprint in advance, and the electronic device can be unlocked when the fingerprint of the finger used for unlocking matches the entered fingerprint.

[0145] In an embodiment of the present application, the fingerprint sensor in the electronic device is a fingerprint sensor arranged under the display screen, and the electronic device has the ability of fingerprint recognition under the screen. In response to the user's touch operation in the fingerprint unlocking area (or fingerprint sensing area), the display screen enters the local highlight mode (LHBM), and the fingerprint collection light spot is lit in the fingerprint unlocking area on the display screen to facilitate the collection of fingerprint information. In response to the user's hand-off operation in the fingerprint unlocking area (that is, canceling the touch operation), the display screen exits the LHBM, and the fingerprint collection light spot is extinguished in the fingerprint unlocking area on the display screen. Among them, the fingerprint unlocking area can be understood as the display screen area corresponding to the position of the fingerprint sensor.

[0146] In this embodiment, the fingerprint collection light spot is a hard light spot. Different from the soft light spot (ie, the display screen light spot displayed by the software program control), the hard light spot is a light spot emitted by the display screen itself.

[0147] In some implementations, the fingerprint collection light spot may be a light spot in the shape of a finger, or a light spot similar to a fingerprint texture, so as to more clearly remind the user that the fingerprint collection spot is located there. In some implementations, in order to adapt to different finger sizes, the fingerprint collection light spot may be a light spot of a universal shape, such as a circular light spot, an elliptical light spot, etc.

[0148] In some implementations, the fingerprint collection light spot can be a light spot of a high-brightness color, such as a white light spot, so as to provide more light for the lens of the under-screen fingerprint sensor to collect a clearer fingerprint image.

[0149] Figure 8 FIG. 1 is a schematic diagram of an exemplary fingerprint unlocking scenario. Figure 8 In (1), the mobile phone is in the screen-off display mode, and the screen-off display (Always On Display, AOD) interface 301 is displayed. Exemplarily, the screen-off display interface 301 includes a fingerprint image 302. The fingerprint image 302 is used to prompt the user that the area where the image is located is the fingerprint unlocking area, and the user can use the fingerprint to unlock in this area. In response to the user's touch operation (or pressing operation) in the fingerprint unlocking area, for example, in response to the user performing a touch operation on the fingerprint image 302, the mobile phone displays an interface 303, which can be referred to as Figure 8 (2) The interface 303 includes a fingerprint collection light spot (or light spot image, light spot, etc.) 304. Among them, the light spot image is highlighted in the interface 303. Other areas of the interface 303 except the light spot image 304 can be off-screen display or non-highlight display, which is not limited in this embodiment. That is, in response to the user's touch operation on the fingerprint image 302, the electronic device controls the display screen to light up the fingerprint collection light spot. The position where the fingerprint light spot is displayed corresponds to the area where the fingerprint sensor collects data.

[0150] Continue to refer to Figure 8 In (2), the user can press the fingerprint collection spot with a finger. In response to the user operation, the fingerprint sensor of the mobile phone can collect the fingerprint data input by the user when pressing the fingerprint collection spot.

[0151] The mobile phone can match the fingerprint data collected by the fingerprint sensor with the pre-recorded user fingerprint. In the case of a successful match, the mobile phone can determine that the screen has been unlocked, display the main interface of the mobile phone, or display an unlock interface including an unlock icon. In the case of an unsuccessful match, the mobile phone determines that the screen is not unlocked and displays the lock screen interface. Among them, the lock screen interface can be a bright screen interface, and this embodiment does not limit the display content in the lock screen interface. In the case of an unsuccessful match, the mobile phone can also display a prompt message that the fingerprint unlocking is unsuccessful. The prompt message can be a text message or image message displayed on the lock screen interface, or it can be a vibration message, voice message, etc.

[0152] Optionally, after the fingerprint sensor completes the fingerprint data collection operation, the electronic device can control the display screen to turn off the fingerprint collection light spot. Optionally, when the user's finger leaves the display screen, the electronic device can control the display screen to turn off the fingerprint collection light spot.

[0153] It is understandable that the faster the fingerprint unlocking speed, the better the user experience. When the refresh rate of the display is high (for example, 120Hz), it is beneficial to increase the speed of fingerprint data collection, which in turn can increase the speed of fingerprint unlocking. Therefore, in the fingerprint unlocking scenario, the electronic device needs to switch the display refresh rate to a high refresh rate to increase the speed of fingerprint unlocking.

[0154] In one implementation, due to hardware limitations, the display screen only has hard spot (i.e. fingerprint collection spot) configuration parameters corresponding to a high refresh rate (e.g. 120Hz) burned in when it leaves the factory. In other words, the hard spot can only be displayed when the display screen refresh rate is the high refresh rate. Therefore, if the current refresh rate of the display screen does not match the screen refresh rate corresponding to the pre-burned hard spot configuration parameters, then in the fingerprint unlocking scenario, the electronic device needs to switch the display screen refresh rate to the high refresh rate.

[0155] In the fingerprint unlocking scenario, in order to further improve the switching rate of the screen refresh rate, the fingerprint HAL can directly notify the display driver to switch the screen refresh rate to the target refresh rate and enter LHBM. Among them, the target refresh rate can be understood as a high refresh rate that is conducive to fingerprint unlocking, or a high refresh rate corresponding to the pre-burned hard spot configuration parameters. The following explanation takes the target refresh rate of 120Hz as an example.

[0156] Figure 9aS401 to S409 exemplarily illustrate the situation of switching the screen refresh rate when entering the fingerprint unlocking scenario. In response to the user's finger pressing (or touching) the fingerprint unlocking area of ​​the screen, the TP driver notifies the fingerprint sensor driver of the finger press (finger down) event, and the fingerprint sensor driver notifies the fingerprint HAL of the finger down event. After receiving the finger down event, the fingerprint HAL determines that the screen refresh rate needs to be switched to 120Hz, then directly notifies the display driver to switch the screen refresh rate to 120Hz, and notifies the display driver to control the display screen to enter LHBM. At the same time, the fingerprint HAL also notifies the fingerprint service in the application framework layer to send a command to switch the screen refresh rate from the upper layer to the display driver through the fingerprint service. Continue to refer to Figure 9a In S405~S407, the fingerprint service notifies SurfaceFlinger through AGP to switch the screen refresh rate. Then, when SurfaceFlinger submits the image data to HWC through the Commit command, only HWC switches the screen refresh rate. In this scenario, the screen refresh rate switches from a low refresh rate to a high refresh rate. When HWC commits a frame of image data, it notifies the display driver to switch the screen refresh rate to 120Hz, and instructs the DSI module to switch MIPI clk to 120Hz. The display driver switches the display refresh rate to 120Hz according to the notification of HWC, and controls the display to enter LHBM, so that the display shows the fingerprint collection spot in the fingerprint unlocking area.

[0157] After the fingerprint HAL receives the finger down event, it determines that the screen refresh rate needs to be switched to 120Hz, and directly notifies the display driver to switch the screen refresh rate to 120Hz, and notifies the display driver to control the display screen to enter LHBM. After the display driver receives the notification from the fingerprint HAL, it waits for the upper-layer screen refresh rate switching process, that is, waits for the screen refresh rate switching notification sent by the HWC. Due to some reasons, the upper-layer screen refresh rate switching process may be abnormal, for example, the display driver is slow to wait for the screen refresh rate switching notification sent by the HWC. Reference Figure 9a In S410, if the display driver has not waited for the screen refresh rate switching notification sent by the HWC when the waiting time reaches the preset threshold (for example, 100ms), it will directly send a refresh rate switching command to the display screen to switch the display refresh rate to 120Hz and control the display screen to enter LHBM. In this case, the display refresh rate has been switched to 120Hz, but the MIPI clk has not been switched. At this time, the MIPI clk is lower than the display refresh rate, and the two do not match, which will cause the screen display to be distorted.

[0158] Figure 9bAnother possible problem scenario is shown as an example. Figure 9a S401~S409 and Figure 9b In S411~S415, after the fingerprint unlocking scene display screen enters LHBM, other applications may notify SurfaceFlinger through AGP to switch the screen refresh rate back to a low refresh rate (such as 60Hz). At this time, if the display driver does not intercept the screen refresh rate switching notification sent by HWC, it will cause the upper and lower layers (ie hardware) screen refresh rates to mismatch, and then cause the screen display to be distorted.

[0159] Fig.9c Another possible problem scenario is shown as an example. Figure 9a S401~S409 and Fig.9c In S417~S422, after the display screen enters LHBM in the fingerprint unlocking scenario, other applications may notify SurfaceFlinger through AGP to switch the screen refresh rate back to a low refresh rate (such as 60Hz). At this time, if the display driver intercepts the screen refresh rate switching notification sent by HWC, the display driver will not control the display screen to switch the refresh rate back to 60Hz, but it may cause the display screen to freeze. Moreover, according to the aforementioned non-blocking switching scheme when switching from high refresh rate to low refresh rate, the screen refresh rate switching notification and MIPI clk switching notification are sent by HWC twice. The display driver can only intercept the screen refresh rate switching notification sent by HWC to avoid the screen refresh rate switching back to 60Hz. However, the display driver cannot intercept the MIPI clk switching notification sent by HWC, and MIPI clk will be switched back to 60Hz, making MIPI clk lower than the display refresh rate. The two do not match, resulting in screen display problems such as flowery screen and freeze.

[0160] In order to solve these problems that may occur in the fingerprint unlocking scenario, an embodiment of the present application provides a method for switching the refresh rate of the display screen. In this method, when the user uses the fingerprint to unlock, the display screen of the electronic device enters the LHBM, the fingerprint collection spot is displayed on the interface, and the screen refresh rate value is switched from the original value to the target value. In the process of the electronic device displaying the fingerprint collection spot, the electronic device does not respond to any application program to modify the screen refresh rate, so that the screen refresh rate value is maintained at the target value.

[0161] Among them, when the screen refresh rate value is the target value, the screen refresh rate is a higher refresh rate, which is a screen refresh rate corresponding to the pre-burned hard spot configuration parameters. Exemplarily, the target value is 120. The display screen of the electronic device enters LHBM, the fingerprint collection spot is displayed on the interface, and the screen refresh rate is set to 120Hz. When the user's finger leaves the display screen, the display screen of the electronic device exits LHBM, the fingerprint collection spot is cancelled on the interface, and the screen refresh rate value is switched back to the original value from the target value.

[0162] The following explains the process of the display entering LHBM and exiting LHBM respectively.

[0163] Fig.10a An exemplary module interaction flow chart is shown. Fig.10a As shown, the process of the display screen entering LHBM may include:

[0164] S501, in response to an operation in which a user touches a fingerprint unlocking area on a display screen, the TP driver detects a finger touch event.

[0165] S502, the TP driver determines whether the finger touch area is located in the fingerprint unlocking area. If so, S503 is executed. If not, a finger down event is sent to the Input system.

[0166] The TP driver can determine whether the finger touch area is located in the fingerprint unlocking area based on the touch point coordinate information reported by the TP. If so, the TP driver can determine that the fingerprint unlocking scene is currently entered. Otherwise, the TP driver determines that the fingerprint unlocking scene is not currently entered. Then the TP driver can send a finger down event to the Input system to distribute the finger down event to the matching service through the Input system.

[0167] S503: The TP driver sends a finger down event to the fingerprint sensor driver.

[0168] S504: The fingerprint sensor driver sends a finger down event to the fingerprint HAL.

[0169] As an optional implementation, the TP driver may directly send a finger down event to the fingerprint sensor driver, and the fingerprint sensor driver may send the finger down event to the fingerprint HAL.

[0170] Exemplarily, the TP driver may send a finger down event to the fingerprint sensor driver through the send_event_to_fingerprint_ud function. Also exemplary, the fingerprint sensor driver may send a finger down event to the fingerprint HAL through the ud_fingerprint_irq_notify function.

[0171] As another optional implementation, the TP driver may send a finger down event to the Input system, and distribute the finger down event to the fingerprint HAL through the Input system.

[0172] This embodiment does not limit the process of the TP driver sending the finger down event to the fingerprint HAL.

[0173] S505, the fingerprint HAL sends information of entering LHBM (enter LHBM) to the display driver.

[0174] After the fingerprint HAL receives the finger down event, it can be determined that the electronic device is currently entering the fingerprint unlocking scene, and the fingerprint collection spot (also known as the hard spot) needs to be highlighted on the display screen. Therefore, after the fingerprint HAL receives the finger down event, it sends the information of entering LHBM to the display driver. Among them, the information of entering LHBM can be understood as information used to indicate "entering LHBM", for example, the information is enter LHBM.

[0175] Exemplarily, the fingerprint HAL may send the information “enterLHBM” to the display driver through the msm_ioctl_hbm_set function.

[0176] S506: The display driver stores the original value of the screen refresh rate.

[0177] After receiving the information of entering LHBM, the display driver determines that the screen refresh rate needs to be switched to the target value (such as 120), that is, the screen refresh rate needs to be switched to 120Hz. At this time, the display driver needs to record the original value of the screen refresh rate, that is, record the current screen refresh rate value, so that the display refresh rate can be switched from the target value back to the original value when the display exits LHBM.

[0178] S507: The display driver sends a finger down status to the HWC.

[0179] The display driver sends the finger down state to the HWC to notify the HWC of the user's current finger state (finger down state or finger up state).

[0180] Exemplarily, the display driver may send the finger down status to the HWC through the notify_display_udfp_finger_status function.

[0181] S508, HWC sets the value of the finger down state variable to true.

[0182] Exemplarily, a finger down state variable or a finger down flag is pre-set in the HWC. When the value of the finger down state variable or the finger down flag is a first value, it indicates that the current finger state of the current user is a finger down state, and when the value of the finger down state variable or the finger down flag is a second value, it indicates that the current finger state of the current user is a finger up state.

[0183] Exemplarily, when the value of the finger down state variable is true or 1, it indicates that the current finger state of the user is the finger down state; correspondingly, when the value of the finger down state variable is false or 0, it indicates that the current finger state of the user is the finger up state.

[0184] If the user's current finger state is finger down, the HWC can determine that the electronic device is currently in a fingerprint unlocking scenario; if the user's current finger state is finger up, the HWC can determine that the electronic device is not currently in a fingerprint unlocking scenario.

[0185] After receiving the finger down status sent by the display driver, the HWC updates the value of the finger down status variable, that is, sets the value of the finger down status variable to true.

[0186] In an embodiment of the present application, after receiving the Commit command submitted by SurfaceFlinger, HWC can determine whether the electronic device is currently in a fingerprint unlocking scenario based on the current value of the finger down state variable, that is, determine whether it is necessary to use a pre-stored configuration parameter value corresponding to the screen refresh rate target value (such as 120) to replace the relevant configuration parameter value in the Commit command submitted by SurfaceFlinger.

[0187] Exemplarily, when the current value of the finger down state variable is true, the HWC determines that the electronic device is currently in a fingerprint unlocking scenario. The HWC uses a pre-stored configuration parameter value corresponding to the screen refresh rate target value to replace the relevant configuration parameter value in the Commit command submitted by SurfaceFlinger, and continues to submit the Commit command to the display driver after the replacement is completed.

[0188] For example, if the current value of the finger down state variable is false, the HWC determines that the electronic device is not currently in a fingerprint unlocking scenario. The HWC does not need to adjust the relevant configuration parameters in the Commit command submitted by SurfaceFlinger, and directly submits the Commit command to the display driver.

[0189] For details not explained here, please refer to the following text and I will not repeat them here.

[0190] S509 , the display driver controls the display screen to switch the value of its refresh rate to the target value, and controls the display screen to enter LHBM.

[0191] After receiving the information of entering LHBM, the display driver determines that the screen refresh rate value needs to be switched to the target value (such as 120), controls the display screen to switch its refresh rate value to the target value, and controls the display screen to enter LHBM.

[0192] Exemplarily, the display driver may control the display screen to switch its refresh rate value to the target value through the HWDeviceDRM::ForceSetUdfpFps function.

[0193] After the display screen enters LHBM, the fingerprint collection spot is highlighted in the fingerprint unlocking area of ​​the display screen to facilitate the quick and accurate collection of fingerprint data.

[0194] This embodiment does not limit the timing sequence of S506 , S507 , and S509 .

[0195] Different from Figure 9a In the process of the display screen entering LHBM provided by the present embodiment, the fingerprint HAL no longer notifies the upper-layer fingerprint service, that is, the fingerprint service no longer triggers the display screen refresh rate switching process from the upper layer. In the process of the display screen entering LHBM provided by the present embodiment, after the fingerprint HAL sends the information of entering LHBM to the display driver, it directly controls the display screen to switch the screen refresh rate, so that the following will not occur. Figure 9aThe display driver shown in S410 waits for a timeout before controlling the display screen to switch the screen refresh rate, thereby improving the rate of LHBM of the electronic device display screen, which is beneficial to improving the speed of fingerprint data collection, and is also beneficial to improving the speed of fingerprint unlocking.

[0196] Fig.10b An exemplary module interaction flow chart is shown. Fig.10b As shown, the process of the display screen exiting LHBM may include:

[0197] S509, in response to the user lifting the finger on the fingerprint unlocking area of ​​the display screen, the TP driver detects a finger lift event.

[0198] S510, the TP driver determines whether the finger lift area is located in the fingerprint unlocking area. If so, S511 is executed. If not, a finger up event is sent to the Input system.

[0199] The TP driver can determine whether the finger lift area is located in the fingerprint unlocking area based on the coordinate information reported by the TP. If so, the TP driver can determine the current exit fingerprint unlocking scene. Otherwise, the TP driver can send a fingerup event to the Input system to distribute the fingerup event to the matching service through the Input system.

[0200] S511, the TP driver sends a finger up event to the fingerprint sensor driver.

[0201] S512: The fingerprint sensor driver sends a finger up event to the fingerprint HAL.

[0202] As an optional implementation, the TP driver may directly send a finger up event to the fingerprint sensor driver, and the fingerprint sensor driver may send the finger up event to the fingerprint HAL.

[0203] Exemplarily, the TP driver may send a finger up event to the fingerprint sensor driver through the send_event_to_fingerprint_ud function. Also exemplary, the fingerprint sensor driver may send a finger up event to the fingerprint HAL through the ud_fingerprint_irq_notify function.

[0204] As another optional implementation, the TP driver may send a finger up event to the Input system, and distribute the finger up event to the fingerprint HAL through the Input system.

[0205] This embodiment does not limit the process of the TP driver sending the finger up event to the fingerprint HAL.

[0206] S513, the fingerprint HAL sends an exit LHBM message to the display driver.

[0207] After the fingerprint HAL receives the finger up event, it can determine that the electronic device is currently exiting the fingerprint unlocking scene, without displaying the fingerprint collection spot on the display screen. Therefore, after the fingerprint HAL receives the finger up event, it sends the information of exiting LHBM to the display driver. Among them, the information of exiting LHBM can be understood as information used to indicate "exit LHBM", for example, the information is exit LHBM.

[0208] Exemplarily, the fingerprint HAL may send the message “exitLHBM” to the display driver through the msm_ioctl_hbm_set function.

[0209] S514: The display driver sends a finger up status to the HWC.

[0210] The display driver sends the finger up state to the HWC to notify the HWC of the user's current finger state (fingerdown state or finger up state).

[0211] Exemplarily, the display driver may send the finger up status to the HWC through the notify_display_udfp_finger_status function.

[0212] S515, HWC sets the value of the finger down state variable to false.

[0213] After the HWC receives the finger down status sent by the display driver, it sets the value of the finger down status variable to false to determine that the electronic device is not currently in the fingerprint unlocking scenario.

[0214] S516, the display driver controls the display screen to switch the value of its refresh rate to the original value, and controls the display screen to exit LHBM.

[0215] After receiving the information to exit LHBM, the display driver determines that the screen refresh rate needs to be switched back to the original value, and then controls the display to switch its refresh rate value to the original value of the screen refresh rate recorded by the display driver, and controls the display to exit LHBM.

[0216] Exemplarily, the display driver may control the display screen to switch its refresh rate back to the original value through the HWDeviceDRM::ForceSetUdfpFps function.

[0217] After the display screen exits LHBM, the fingerprint collection spot is cancelled in the fingerprint unlocking area of ​​the display screen.

[0218] This embodiment does not limit the timing sequence of S514 and S516.

[0219] For details not explained in this process, please refer to the previous text or existing technologies, and will not be repeated here.

[0220] The following is an explanation of the method for switching the refresh rate of the display screen provided in this embodiment in combination with the display process of a frame of image. Fig.11 An exemplary module interaction flow chart is shown. Fig.11 As shown, the display process of a frame of image may include:

[0221] S601, the APP draws a frame of the APP page and renders it, obtains a frame of APP page data, and submits the APP page data to SurfaceFlinger.

[0222] When the APP needs to refresh the page, it draws a frame of the APP page through its drawing thread, and renders the frame of the APP page through its rendering thread to obtain a frame of APP page data. Among them, a frame of APP page data can be understood as image data belonging to the APP interface displayed on the display screen.

[0223] S602, SurfaceFlinger performs operations on the composite layer.

[0224] After SurfaceFlinger receives the page data submitted by the APP, it synthesizes it as a layer with other layers (such as the status bar layer, etc.) to obtain a frame of image data to be displayed on the display screen, and submits the image data to the HWC through the Commit command.

[0225] Among them, the Commit command sent by SurfaceFlinger to HWC may include but is not limited to layer information, frame rate information, powermode (power mode) and other information.

[0226] S603, HWC determines whether the value of the finger down state variable is true, if so, execute S604, if not, execute S605.

[0227] After HWC receives the Commit command sent by SurfaceFlinger, it reads the current value of the finger down state variable, and determines whether the electronic device is currently in a fingerprint unlocking scenario based on the current value of the finger down state variable.

[0228] When the electronic device is currently in the fingerprint unlocking scenario, according to the previous Fig.10a In the process shown, the screen refresh rate has been switched to the target refresh rate (e.g. 120) that matches the fingerprint acquisition spot. In order to avoid screen distortion, the HWC needs to adjust the Commit command it receives. When the electronic device is not currently in the fingerprint unlocking scenario, according to the previous Fig.10b In the process shown, since the screen refresh rate has not been switched to the target refresh rate that matches the fingerprint acquisition spot, the HWC does not need to adjust the Commit command it receives.

[0229] S604, HWC replaces the value of the relevant configuration parameter in Commit with the parameter value corresponding to the target refresh rate.

[0230] If the current value of the finger down state variable is true, HWC determines that the electronic device is currently in a fingerprint unlocking scenario. HWC will not block the Commit process sent by SurfaceFlinger, but will replace the values ​​of the relevant configuration parameters in the Commit command it receives with parameter values ​​corresponding to the target refresh rate. After HWC sends the Commit command to the display driver, the display driver does not need to switch the screen refresh rate, that is, the display driver controls the screen to maintain the currently set target refresh rate.

[0231] Among them, the HWC stores relevant configuration parameter values ​​corresponding to the target refresh rate. Exemplarily, the HWC can obtain the pre-stored relevant configuration parameter values ​​corresponding to the target refresh rate when the electronic device is turned on.

[0232] For example, in the Commit command sent by SurfaceFlinger to HWC, the frame rate information carried does not match the target refresh rate currently set for the screen. Taking the target refresh rate of 120Hz as an example, the frame rate information carried in the Commit command sent by SurfaceFlinger to HWC is 60Hz (or 60FPS), and the two do not match. At this time, HWC will not block the Commit process sent by SurfaceFlinger, but will replace the parameter value corresponding to 120Hz (or 120FPS) with the relevant configuration parameter value corresponding to 60Hz (or 60FPS) in the Commit command it receives.

[0233] In the Commit command sent by SurfaceFlinger to HWC, a configuration parameter value is 1, which is determined based on the screen refresh rate "60Hz" or the image synthesis frame rate "60FPS". When the current value of the finger down state variable is true, HWC replaces the configuration parameter value with 2, which is determined based on the screen refresh rate "120Hz" or the image synthesis frame rate "120FPS". In other words, after the configuration parameter value is replaced, HWC will submit the Commit command according to the screen refresh rate or frame rate corresponding to the replaced parameter value.

[0234] Exemplarily, in this step, the configuration parameters that the HWC needs to replace may include but are not limited to CRTC_SET_CORE_CLK, CRTC_SET_CORE_AB, CRTC_SET_LLCC_AB, CRTC_SET_DRAM_AB, CRTC_SET_ROT_PREFILL_BW, CRTC_SET_CORE_IB, CRTC_SET_LLCC_IB, CRTC_SET_DRAM_IB, and CRTC_SET_ROT_CLK. For the explanation of these configuration parameters, reference may be made to the prior art and will not be repeated here.

[0235] Optionally, before the HWC replaces the values ​​of the relevant configuration parameters in Commit with the parameter values ​​corresponding to the target refresh rate, the original values ​​of the relevant configuration parameters in Commit can also be recorded so that the settings of the relevant configuration parameters in Commit can be restored according to these values ​​when necessary.

[0236] S605, HWC commits a frame of image data to the display driver.

[0237] If the current value of the finger down state variable is not true, the HWC determines that the electronic device is not currently in a fingerprint unlocking scenario, and the HWC does not need to execute S604 and can directly execute S605.

[0238] When the electronic device is currently in a fingerprint unlocking scenario, the HWC replaces the value of the relevant configuration parameter in the Commit with the parameter value corresponding to the target refresh rate, and then commits the image data to the display driver. At this time, the relevant configuration parameter value in the Commit command has been replaced with a value that matches the target refresh rate. Therefore, when the HWC commits the image data to the display driver, it determines that the current screen refresh rate is the same as the screen refresh rate indicated by the relevant configuration parameters in the Commit, and the HWC will not notify the display driver to switch the refresh rate. If the current MIPI clk does not match the target refresh rate, when the HWC commits the image data to the display driver, it notifies the DSI module to switch the MIPI clk so that the MIPI clk matches the target refresh rate. If the current MIPI clk matches the target refresh rate, when the HWC commits the image data to the display driver, it will not notify the DSI module to switch the MIPI clk.

[0239] When the electronic device is not currently in a fingerprint unlocking scenario, the HWC does not replace the values ​​of the relevant configuration parameters in the Commit, and directly commits the image data to the display driver. At this time, the HWC can process according to the logic shown above. If the HWC determines that the current scenario is switching from a low refresh rate to a high refresh rate, the HWC notifies the display driver to switch the refresh rate when it commits the image data to the display driver, and notifies the DSI module to switch the MIPI clk. If the HWC determines that the current scenario is switching from a high refresh rate to a low refresh rate, the HWC notifies the display driver to switch the refresh rate when it commits the image data of the current frame (such as the i-th frame) to the display driver. When the HWC commits the image data of the next frame (such as the i+1-th frame) to the display driver, it notifies the DSI module to switch the MIPI clk and notifies the display driver to control the display screen to set the refresh rate mode.

[0240] S606, the display driver determines whether a refresh rate switching notification is received, if not, executes S607, and if so, executes S608.

[0241] S607: The display driver sends the image data to the display screen.

[0242] S608, the display driver controls the screen switching refresh rate and sends image data to the display screen.

[0243] When the display driver receives the commit image from the HWC, if it receives a refresh rate switching notification, it sends a refresh rate switching command to the display screen according to the refresh rate switching notification, so that the DDIC in the display screen executes the screen refresh rate switching operation according to the refresh rate switching command.

[0244] When the display driver receives the commit image from HWC, if it receives the refresh rate mode setting notification, it sends a refresh rate mode setting command to the display screen according to the refresh rate mode setting notification, so that the DDIC in the display screen performs the screen refresh rate mode setting operation according to the refresh rate mode setting command.

[0245] In this way, when the electronic device enters the fingerprint unlocking scenario, the screen refresh rate is directly switched to the target refresh rate that matches the fingerprint acquisition spot. When SurfaceFlinger sends a Commit command to HWC, HWC does not block the Commit process, but replaces the value of the relevant configuration parameter in the Commit command with the parameter value that matches the target refresh rate, so that the screen refresh rate always remains at the target refresh rate, and the MIPI clk is also matched with the screen refresh rate, so as to avoid the problem of screen display distortion.

[0246] When the electronic device enters the fingerprint unlocking scenario, the screen refresh rate is directly switched to the target refresh rate that matches the fingerprint acquisition spot. When SurfaceFlinger does not send a Commit command to HWC, the AP will not transmit image data to the display through MIPI, so the screen refresh rate is directly switched to the target refresh rate, and the screen display will not be distorted.

[0247] The following is an explanation of the display refresh rate switching method provided by this embodiment in combination with the under-screen fingerprint unlocking scenario of an electronic device (taking a mobile phone as an example). In this scenario, taking the need to switch the display refresh rate to 120Hz when the electronic device enters LHBM as an example, the refresh rate corresponding to the pre-burned hard spot configuration parameters at 120Hz.

[0248] Fig.12a An exemplary under-screen fingerprint unlocking scenario is shown. In the process of under-screen fingerprint unlocking, the AP does not transmit image data to the display screen through MIPI.

[0249] Reference Fig.12aIn (1), the mobile phone displays the lock screen interface 701, and the screen refresh rate value is 60 (that is, the screen refresh rate is 60Hz). In response to the user's finger touching the fingerprint unlocking area, the TP driver sends a finger down event to the fingerprint HAL through the fingerprint sensor driver. After receiving the finger down event, the fingerprint HAL sends the "enter LHBM" message to the display driver. The display driver stores the original value "60" of the screen refresh rate, and controls the display screen to switch its refresh rate value to "120", and controls the display screen to enter LHBM. Then, the refresh rate value of the mobile phone screen is set to 120, and interface 702 is displayed. Among them, the fingerprint collection spot is displayed on the interface 702, which is convenient for the under-screen fingerprint sensor to collect user fingerprint data. At this time, the refresh rate of the mobile phone screen is consistent with the refresh rate corresponding to the configuration parameters of the fingerprint collection spot, and the under-screen fingerprint sensor can quickly perform fingerprint data collection operations.

[0250] After the display driver receives the "enter LHBM" information, it sends the finger down state to the HWC, so that the HWC sets the value of the finger down state variable to true according to the received finger down state.

[0251] Continue to refer to Fig.12a In (2), the mobile phone displays an interface 703 including a fingerprint collection spot. In response to the user's finger lifting up in the fingerprint unlocking area, the TP driver sends a finger up event to the fingerprint HAL through the fingerprint sensor driver. After receiving the finger up event, the fingerprint HAL sends an "exit LHBM" message to the display driver. The display driver controls the display screen to switch its refresh rate value back to the original value "60", and controls the display screen to exit LHBM. Subsequently, the refresh rate value of the mobile phone screen is set to 60, and interface 704 is displayed. Among them, if the fingerprint unlocking is successful, interface 704 can be the main interface of the mobile phone; if the fingerprint unlocking is unsuccessful, interface 704 can be the lock screen interface in the bright screen (state).

[0252] After the display driver receives the "exit LHBM" information, it sends the finger up state to the HWC, so that the HWC sets the value of the finger down state variable to false according to the received finger up state.

[0253] Reference Fig.12aIn this fingerprint unlocking scenario, after the user touches the fingerprint unlocking area, the display driver sets the screen refresh rate to 120Hz. After the user leaves the fingerprint unlocking area, the display driver restores the screen refresh rate to 60Hz. During this process, SurfaceFlinger does not send a Commit command to HWC, and the AP will not transmit image data to the display through MIPI. The display driver directly switches the screen refresh rate, which will not cause the screen to display distorted images.

[0254] Figure 12b An exemplary under-screen fingerprint unlocking scenario is shown. In the process of under-screen fingerprint unlocking, the AP transmits image data to the display screen through MIPI.

[0255] about Figure 12b In (1), you can refer to Fig.12a The explanation of (1) will not be repeated here.

[0256] Continue to refer to Figure 12b In (2), during the process of fingerprint unlocking under the screen, for example, when the mobile phone displays an interface containing a fingerprint collection spot, SurfaceFlinger sends a Commit image data command to HWC, and HWC sends a Commit image data command to the display driver, so that the AP transmits the image data to the display screen through MIPI. Among them, after HWC receives the Commit command sent by SurfaceFlinger, it queries that the current value of the finger down state variable is true, and replaces the relevant configuration parameter value in the Commit command. For example, the synthetic frame rate value of SurfaceFlinger is 60, and in the Commit command sent to HWC, the relevant configuration parameter value matches the frame rate value "60". After HWC receives the Commit command sent by SurfaceFlinger, it replaces the relevant configuration parameter value matching the frame rate value "60" with the relevant configuration parameter value matching the frame rate value "120", and sends the Commit image data command to the display driver after the replacement is completed. That is, the frame rate value or refresh rate value of HWC is "120". When HWC commits image data to the display driver, it notifies the display driver to switch the screen refresh rate to 120, and notifies the DSI module to switch the MIPI clk value to 120. Then, the display driver can switch the screen refresh rate to 120 according to the notification, and the DSI module can switch the MIPI clk value to 120 according to the notification.

[0257] In this way, HWC will not block the Commit process sent by SurfaceFlinger, but will not respond to the frame rate switching process initiated by SurfaceFlinger. Instead, when the current value of the finger down state variable is queried to be true, the parameter value is replaced with the pre-stored configuration parameter value that matches the frame rate value "120". As a result, the screen refresh rate is always maintained at 120Hz, and MIPI clk also matches the screen refresh rate, so that the screen will not have a distorted display problem during the fingerprint unlocking process.

[0258] Fig.12c An example of a scenario after fingerprint unlocking under the screen is shown. For the explanation of lifting a finger in the fingerprint unlocking area to trigger the display screen to exit LHBM, please refer to the previous text and will not be repeated here. Fig.12c , after the display screen exits LHBM, SurfaceFlinger sends a Commit image data command to HWC, and HWC sends a Commit image data command to the display driver, so that the AP transmits image data to the display screen through MIPI. Among them, after HWC receives the Commit command sent by SurfaceFlinger, it queries that the current value of the finger down state variable is false, and no longer replaces the relevant configuration parameter values ​​in the Commit command, but processes the Commit command according to the existing logic and actual situation. In the example shown in Figure 12, the synthetic frame rate value of SurfaceFlinger is 90. In the Commit sent by SurfaceFlinger to HWC, the relevant configuration parameter values ​​match the frame rate value "90". After HWC receives the Commit command sent by SurfaceFlinger, it determines that the screen refresh rate value is to be switched to 90. At this time, the frame rate value or refresh rate value of HWC is "90", and it is determined that the current situation is a low frame rate to high frame rate situation (or a low refresh rate to high refresh rate situation). When HWC commits image data to the display driver, it notifies the display driver to switch the screen refresh rate to 90, and notifies the DSI module to switch the MIPIclk value to 90. Then, the display driver can switch the screen refresh rate to 90 according to the notification, and the DSI module can switch the MIPI clk value to 90 according to the notification.

[0259] As another example, the synthetic frame rate value of SurfaceFlinger is 30. When SurfaceFlinger sends a Commit to HWC, the relevant configuration parameter value matches the frame rate value of "30". After receiving the Commit command sent by SurfaceFlinger, HWC determines that the screen refresh rate value needs to be switched to 30. At this time, the frame rate value or refresh rate value of HWC is "30", and it is determined that the current situation is a high frame rate to low frame rate situation (or a high refresh rate to low refresh rate situation). When HWC commits the current frame image data to the display driver, it notifies the display driver to switch the screen refresh rate value to 30, and the display driver switches the screen refresh rate value to 30 according to the notification; when HWC commits the next frame image data to the display driver, it notifies DSI to switch the MIPIclk value to 30, and the DSI module can switch the MIPI clk value to 30 according to the notification. In this way, the screen refresh rate value is switched to 30, and the MIPI clk value is switched to 30, which can take effect in the same frame period, avoiding the problem of distorted screen display due to the mismatch between MIPI clk and screen refresh rate.

[0260] This embodiment also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the method for switching the refresh rate of the display screen in the above-mentioned embodiment.

[0261] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the method for switching the refresh rate of the display screen in the above-mentioned embodiment.

[0262] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory so that the chip executes the display refresh rate switching method in the above-mentioned method embodiments.

[0263] Among them, the electronic device (such as a mobile phone, etc.), computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0264] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0265] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0266] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for switching a display screen refresh rate, characterized in that: Applied in an electronic device, the electronic device includes a display screen, including: In response to a touch operation in the fingerprint unlocking area, a first interface is displayed, and a refresh rate of the display screen is set to a first value; the first interface includes a preset image; During the process of displaying the first interface, the switching operation of the refresh rate of the display screen is not responded to, and the refresh rate of the display screen remains at the first value.

2. The method according to claim 1, characterized in that: When the refresh rate of the display screen maintains the first value, the MIPI clk of the display screen is the first value.

3. The method according to claim 1, characterized in that The not responding to the modification operation of the refresh rate of the display screen includes: When the image synthesis frame rate of the SurfaceFlinger module is set to the second value, the refresh rate of the HWC module remains at the first value.

4. The method according to claim 3, characterized in that Also includes: After stopping displaying the first interface, when the image synthesis frame rate of the SurfaceFlinger module is set to a third value, the refresh rate of the HWC module is set to the third value; The refresh rate of the display screen is set to the third value.

5. The method according to claim 1, characterized in that Setting the refresh rate of the display screen to a first value includes: Switching the refresh rate of the display screen from a fourth value to the first value; The method further comprises: In response to a lift-up operation in the fingerprint unlocking area, a second interface is displayed, and the refresh rate of the display screen is set to the fourth value.

6. The method according to claim 3, characterized in that When the image synthesis frame rate of the SurfaceFlinger module is set to the second value, the method further includes: Setting the value of the target configuration parameter to a first parameter value, wherein the first parameter value is used to indicate that the image synthesis frame rate is the second value; The refresh rate of the HWC module is maintained at the first value, comprising: The value of the target configuration parameter is replaced with a second parameter value, where the second parameter value is used to indicate that the image synthesis frame rate is the first value.

7. The method according to claim 6, characterized in that Replacing the value of the target configuration parameter with the second parameter value includes: Determine the value of the target variable as the first value; The value of the target configuration parameter is replaced with the second parameter value.

8. The method according to claim 7, characterized in that Also includes: In response to a touch operation in the fingerprint unlocking area, setting the value of the target variable to the first value; In response to a lift-up operation in the fingerprint unlocking area, the value of the target variable is set to a second value; the second value is different from the first value.

9. An electronic device, characterized in that: include: one or more processors; Memory; And one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device executes the method for switching the refresh rate of the display screen as described in any one of claims 1-8.

10. A computer-readable storage medium comprising a computer program, characterized in that: When the computer program is executed on an electronic device, the electronic device executes the method for switching the refresh rate of a display screen as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Screen refreshing control method, mobile terminal and computer readable storage medium

    CN112667340A

  • Display method, electronic equipment and storage medium

    CN114518817A

  • Method for controlling dynamic change of screen refresh rate and electronic equipment

    CN114648951A

  • Screen refresh rate switching method and electronic equipment

    CN116052618A

  • Screen-on display method, electronic equipment and storage medium

    CN117707406A

Cited By

  • Display panel control method and device, time sequence control circuit and display panel

    CN121438766A