Method for switching display screen refresh rate, electronic device and storage medium
By maintaining the display refresh rate to match the fingerprint unlocking light spot in under-display fingerprint unlocking scenarios, and keeping the refresh rate unchanged before and after fingerprint unlocking, the problems of screen flickering and power consumption waste in under-display fingerprint unlocking scenarios are solved, thus improving the user experience.
Patent Information
- Application Number
- CN202411456852.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-10-17
AI Technical Summary
In under-display fingerprint unlocking scenarios, automatic switching of the display refresh rate may cause screen flickering issues and result in unnecessary power consumption.
During fingerprint unlocking, the display refresh rate is kept to match the fingerprint unlocking light spot value, and the refresh rate remains unchanged before and after fingerprint unlocking to avoid unnecessary refresh rate switching. The HWC module is used to replace the configuration parameters in the Commit command to maintain a consistent refresh rate.
It avoids the screen flickering problem in under-display fingerprint unlocking scenarios, while reducing unnecessary power consumption and improving user experience.
Smart Images

Figure CN119649723B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent terminals, and in particular to a display screen refresh rate switching method, an electronic device, and a storage medium. BACKGROUND
[0002] With the continuous development of technology, the refresh rate of display screens has also been continuously improved. From the early 60Hz display screen to the current 90Hz, 120Hz, or even 144Hz high refresh rate display screen, 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, and is suitable for some application scenarios that have high requirements for display effects, such as games and video playback. However, high refresh rate also brings some problems, such as higher power consumption.
[0003] In order to improve the balance between display effect and energy efficiency of an electronic device and provide better user experience, display screen refresh rate automatic switching technology has emerged. The display screen refresh rate automatic switching technology automatically adjusts the refresh rate of the display screen to provide better display effect and energy efficiency by detecting the degree of change of the content displayed on the screen. When the content on the screen changes little or is static, the refresh rate of the display screen is automatically reduced to save battery power. In the display scenario that requires smoother display, the increase of the refresh rate of the display screen can achieve the effect of improving the smoothness and smoothness of the picture. SUMMARY
[0004] The present application provides a display screen refresh rate switching method, an electronic device, and a storage medium. The method can solve the problem of screen display that may occur in the screen fingerprint unlocking scenario.
[0005] In a first aspect, an embodiment of the present application provides a display screen refresh rate switching method. The method is applied to an electronic device, and the electronic device includes a display screen and an application processor. The application processor and the display screen are connected through a Mobile Industry Processor Interface (MIPI) bus. The electronic device further includes a screen fingerprint sensor, which can be used to collect fingerprint data of a user, so that the electronic device can perform an unlocking operation according to the fingerprint data collected by the electronic device.
[0006] The method includes: in response to a touch operation on a fingerprint unlocking area, the electronic device displays a first interface and sets the refresh rate of the display screen to a first value. The first interface includes a preset image. During the process in which the electronic device displays the first interface, the electronic device does not respond to a switching operation of the refresh rate of the display screen, and the refresh rate of the display screen remains 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 of refreshing per second of the display screen being 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] For example, the preset image is a fingerprint collection light spot mentioned below, and the fingerprint collection light spot is a hard light spot. The configuration parameter of the hard light spot burned in the display screen when it is manufactured is matched with 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, which can be understood as the electronic device does not switch the refresh rate of the display screen when the application triggers the switching of the refresh rate of the display screen, and keeps the current set screen refresh rate.
[0010] In this way, when the electronic device enters the under-screen fingerprint unlocking scene, the refresh rate of the display screen is set to a value matched with the fingerprint unlocking light spot. During the fingerprint unlocking process, the electronic device does not respond to any switching operation of the screen refresh rate, and keeps the screen refresh rate as the value matched with the fingerprint unlocking light spot. In this way, the problem of screen display can be avoided in the under-screen fingerprint unlocking scene.
[0011] According to the first aspect, when the refresh rate of the display screen keeps the first value, the MIPI clk of the display screen is the first value.
[0012] In the 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 120 Hz, the MIPI clk of the display screen is also set to 120 Hz, which not only avoids the problem of screen display of the display screen, but also avoids unnecessary power waste.
[0013] According to the first aspect or any one of the implementation modes of the first aspect, the electronic device does not respond to the modification operation of the refresh rate of the display screen, including that the electronic device keeps the refresh rate of the HWC module as the first value when the image synthesis frame rate of the SurfaceFlinger module is set to the second value.
[0014] The image synthesis frame rate is set to the second value, which can be understood as the number of frames of synthesized images per second of the display screen being the second value. For example, the second value is 60, that is, the image synthesis frame rate is set to 60 FPS.
[0015] The image synthesis frame rate of the SurfaceFlinger module can be set according to actual conditions. In this implementation manner, when the electronic device is in the under-screen fingerprint unlocking scene 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 still remains the first value and will not be adjusted to the second value along with the SurfaceFlinger module.
[0016] In this way, it can be ensured that the screen refresh rate remains the first value in the under-screen fingerprint unlocking scene, is always matched with the screen refresh rate corresponding to the hard spot configuration parameter, and will not affect the rate of collecting fingerprint data by the fingerprint sensor.
[0017] According to the first aspect or any one of the implementation manners of the above first aspect, after the electronic device stops displaying the first interface, the refresh rate of the HWC module is set to the third value when the image synthesis frame rate of the SurfaceFlinger module is set to the third value; and 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 the third value.
[0019] In this way, after the electronic device exits the fingerprint unlocking scene, the electronic device normally responds to the switching operation of the screen refresh rate and will not affect the scheme of dynamically adjusting the refresh rate of the display screen. Moreover, the MIPI clk of the display screen is dynamically matched with the screen refresh rate, which can not only avoid the problem of garbled display of the display screen, but also avoid unnecessary power waste.
[0020] According to the first aspect or any one of the implementation manners of the above first aspect, 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 further includes: the electronic device displays a second interface and sets the refresh rate of the display screen to the fourth value in response to a lifting operation in the fingerprint unlocking area.
[0021] In this way, after the display screen performs the LHBM, the refresh rate of the display screen is switched from the fourth value to the first value, and after the display screen exits the LHBM, the refresh rate of the display screen can also be restored to the fourth value.
[0022] According to a first aspect, or any possible implementation mode of the first aspect, when the electronic device sets the image composition frame rate of the SurfaceFlinger module to the second value, the electronic device further sets a value of a target configuration parameter to a first parameter value, the first parameter value being used to indicate that the image composition frame rate is the second value. The refresh rate of the HWC module is kept at the first value, including: the electronic device replaces the value of the target configuration parameter with a second parameter value, the second parameter value being used to indicate that the image composition frame rate is the first value.
[0023] The target configuration parameter can be a configuration parameter related to the image composition frame rate in the Commit command, and can include but is 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, the HWC does not block the Commit process sent by the SurfaceFlinger, but replaces the value of the related configuration parameter in the received Commit command with a parameter value corresponding to the refresh rate of the first value, so that after the 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 keep the current set refresh rate corresponding to the first value.
[0025] According to the first aspect, or any possible implementation mode of the first aspect, the electronic device replaces the value of the target configuration parameter with the second parameter value, including: the electronic device determines that a value of a target variable is a first value; and the electronic device replaces the value of the target configuration parameter with the second parameter value.
[0026] For example, the target variable can be the finger down state variable mentioned below, and the first value can be true.
[0027] When the value of the target variable is the first value, the HWC determines that the electronic device is currently in the fingerprint unlocking scenario, and the HWC does not block the Commit process sent by the SurfaceFlinger, but replaces the value of the related configuration parameter in the received Commit command.
[0028] According to the first aspect, or any possible implementation mode of the first aspect, the method further includes:
[0029] The electronic device sets a value of a target variable to a first value in response to a touch operation on the fingerprint unlocking area; and the electronic device sets the value of the target variable to a second value in response to a lift-up operation on the fingerprint unlocking area; the second value is different from the first value.
[0030] The first value may be false, for example.
[0031] The target variable is preset in the HWC. When the value of the target variable is the 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 the fingerprint unlocking scenario; when the value of the target variable is the 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 currently not in the fingerprint unlocking scenario.
[0032] In this way, the HWC can determine whether the electronic device is currently in the fingerprint unlocking scenario according to the current value of the target variable, and then can determine how to process the Commit process sent by the SurfaceFlinger according to the determination result.
[0033] In a second aspect, an electronic device is provided. 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, cause the electronic device to perform the display screen refresh rate switching method in the first aspect and any one of the implementations of the first aspect.
[0034] The second aspect and any one of the implementations of the second aspect correspond to the first aspect and any one of the implementations of the first aspect, respectively. For details of the technical effects of the second aspect and any one of the implementations of the second aspect, refer to the technical effects of the first aspect and any one of the implementations of the first aspect, which will not be described here.
[0035] In a third aspect, a computer readable storage medium is provided. The computer readable storage medium includes a computer program, and when the computer program runs on an electronic device, causes the electronic device to perform the display screen refresh rate switching method in the first aspect and any one of the implementations of the first aspect.
[0036] The third aspect and any one of the implementations of the third aspect correspond to the first aspect and any one of the implementations of the first aspect, respectively. For details of the technical effects of the third aspect and any one of the implementations of the third aspect, refer to the technical effects of the first aspect and any one of the implementations of the first aspect, which will not be described here.
[0037] In a fourth aspect, an embodiment of the present application provides a computer program product, comprising a computer program which, when executed by a computer, causes the computer to perform the display screen refresh rate switching method according to the first aspect or any one of the implementation forms of the first aspect.
[0038] The fourth aspect and any one of the implementation forms of the fourth aspect correspond to the first aspect and any one of the implementation forms of the first aspect respectively. For details of the technical effects of the fourth aspect and any one of the implementation forms of the fourth aspect, reference can be made to the technical effects of the first aspect and any one of the implementation forms of the first aspect, which will not be repeated here.
[0039] In a fifth aspect, the present application provides a chip, comprising a processing circuit, a receiving pin and a sending pin. The receiving pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the display screen refresh rate switching method according to the first aspect or any one of the implementation forms of the first aspect to control the receiving pin to receive a signal and control the sending pin to send a signal.
[0040] The fifth aspect and any one of the implementation forms of the fifth aspect correspond to the first aspect and any one of the implementation forms of the first aspect respectively. For details of the technical effects of the fifth aspect and any one of the implementation forms of the fifth aspect, reference can be made to the technical effects of the first aspect and any one of the implementation forms of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 A schematic diagram of a hardware structure of an electronic device is shown for example;
[0042] Figure 2 A schematic diagram of a fingerprint sensor setting position is shown for example;
[0043] Figure 3 A schematic diagram of a software structure of an electronic device is shown for example;
[0044] Figure 4 An image sending and displaying flow is shown for example;
[0045] Figure 5 A comparison diagram of whether MIPI clk and screen refresh rate are adjusted cooperatively is shown for example;
[0046] Figure 6 A diagram of different synchronization of MIPI clk and screen refresh rate switching is shown for example;
[0047] Figure 7a A diagram of synchronous of MIPI clk and screen refresh rate switching is shown for example;
[0048] Figure 7bA flowchart for the synchronization of the MIPI clk and the screen refresh rate switching is shown as an example.
[0049] Figure 8 A scene diagram for the under-screen fingerprint unlocking is shown as an example.
[0050] Figure 9a A flowchart for the screen refresh rate switching involved in the under-screen fingerprint unlocking is shown as an example.
[0051] Figure 9b A flowchart for the screen refresh rate switching involved in the under-screen fingerprint unlocking is shown as an example.
[0052] Figure 9c A flowchart for the screen refresh rate switching involved in the under-screen fingerprint unlocking is shown as an example.
[0053] Figure 10a A flowchart for the display screen entering the LHBM is shown as an example.
[0054] Figure 10b A flowchart for the display screen exiting the LHBM is shown as an example.
[0055] Figure 11 A flowchart for the sending of a frame of image is shown as an example.
[0056] Figure 12a A processing diagram for the under-screen fingerprint unlocking without image sending in the scene is shown as an example.
[0057] Figure 12b A processing diagram for the under-screen fingerprint unlocking with image sending in the scene is shown as an example.
[0058] Figure 12c A processing diagram for the non-under-screen fingerprint unlocking with image sending in the scene is shown as an example. DETAILED DESCRIPTION
[0059] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0060] The term “and / or” in the present document is only used to describe the association relationship of the associated objects, and means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone.
[0061] The terms "first" and "second" and the like in the description and claims of the application embodiments, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. For example, the first target object and the second target object are used for distinguishing between two different target objects and do not imply that the first target object is before the second target object in any way.
[0062] In the application embodiments, the words "exemplary" and "for example" are used to mean serving as an example, instance, or illustration. Any implementation or design solution described as "exemplary" or "for example" in the application embodiments is not necessarily to be construed as preferred or advantageous over other implementations or design solutions. In fact, a variety of implementations and design solutions are contemplated as can serve one or more purposes, or provide one or more benefits, or one or more advantages ahead. The exemplary or for example language is used merely for a convenient and simple introduction of concepts as can be further described throughout the subject disclosure.
[0063] In the description of the application embodiments, the meaning of "a plurality of" is two or more unless otherwise specified. For example, a plurality of processing units means two or more processing units; a plurality of systems means two or more systems.
[0064] Before introducing the display screen refresh rate switching method provided by the application, the following explains some terms of the application embodiments, so as to facilitate the understanding of the skilled in the art.
[0065] 1) Frame rate, also known as frame rate, unit is frame per second, denoted as FPS. Frame rate refers to the number of picture frames generated by a graphics card (i.e. GPU) per unit of time, that is, the number of pictures that can be rendered and displayed by the graphics card (i.e. GPU) per second. For example, the frame rate can be 30FPS, 60FPS, 120FPS, etc. In some cases, the frame rate can also be referred to as frame frequency, denoted as Hertz (Hz), for example, the frame rate is 60Hz, 120Hz, etc.
[0066] The rapid and continuous display of multiple frames of still images forms a dynamic picture. The larger the frame rate of a video, the better the continuity of the picture. High frame rate can get smoother and more realistic pictures. The more frames per second, the smoother the displayed motion, and the better the picture quality.
[0067] 2) Screen refresh rate (also known as display screen refresh rate) is the number of times the screen can refresh the picture per second, unit is Hertz (Hz). For example, a screen with a refresh rate of 60Hz means that the screen can complete 60 times of refresh display in 1 second. Similarly, a screen with a refresh rate of 120Hz means that the screen can complete 120 times of refresh display in 1 second. The higher the refresh rate, the more frames the screen can display. Accordingly, the picture delay is lower, and the smoothness is higher.
[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 screen refresh rate of 60Hz can be expressed as 60FPS, and a screen refresh rate of 120Hz can be expressed as 120FPS.
[0069] 3) Vertical scanning (Vsync), which is a top-to-bottom refresh mechanism, is used to synchronize the refresh rate and frame rate of the display screen to avoid the tearing effect of the screen picture. In the vertical scanning 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 frame drawing and frame composition of the electronic device.
[0070] Specifically, the software Vsync signal can include a VsyncAPP signal and a VsyncSF signal. The VsyncAPP signal is used to trigger the frame drawing process. That is, after the application program of the electronic device receives the VsyncAPP signal, frame drawing can be performed. The VsyncSF signal is used to trigger the frame composition process. That is, after the image composition system (SurfaceFlinger) of the electronic device receives the VsyncSF signal, frame composition can be performed on the frame after frame drawing.
[0071] 4) Tearing effect (TE) signal, which is a signal output by the timing controller of the electronic device, is used to prevent tearing problems during picture refresh in the image display process. The TE signal can be understood as a hardware generated Vsync signal. 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] In the process of the user playing games or watching videos and other dynamic display scenarios (also referred to as dynamic effect display scenarios) through the electronic device, when the refresh rate and frame rate of the display are not synchronized, for example, in the case of a large number of frames per second (such as 90FPS or 120FPS) and a low refresh rate (such as 30Hz), picture lag will occur, and even a tearing effect of screen picture misalignment will occur. This situation often occurs in dynamic display scenarios (such as game scenarios) with 60 frames per second or higher frame rate.
[0073] 5) The display screen variable frequency display mode, that is, the screen of the electronic device can support dynamic switching of the refresh rate in a certain range, for example, switching between 1Hz and 120Hz, which provides a basic physical condition for supporting dynamic changes of the refresh rate in the process of each dynamic display scene in the electronic device system, and can achieve more extreme power saving effect.
[0074] 6) The display screen can be divided into video mode (Video Mode) display screen and command mode (Command Mode) display screen according to the interface mode.
[0075] The working mode of the video mode display screen is similar to the traditional RGB interface. The main processor (also called application processor (AP)) connected with the display screen needs to continuously refresh the display screen. Since the synchronization information is not transmitted by using a dedicated data signal, the control signal and the RGB data are transmitted in the form of a message through the MIPI bus. Because the application processor needs to refresh the display screen regularly, the display screen does not need a frame buffer.
[0076] In the command mode, the MIPI bus controller of the main processor uses display command messages to send data to the display screen. The command mode display screen has a frame buffer (such as a RAM (Random Access Memory)) with a full frame length, which is used to store frame data. The frame data refers to a frame of image data issued by the AP in a frame period. After the frame data is put into the frame buffer of the display screen, the DDIC (Display Driver IC) of the display screen reads the frame data from the frame buffer and displays the data on the screen (Panel). When the main processor writes frame data into the frame buffer, the TE signal generated by the main processor and the DDIC of the display screen controls together. When the DDIC reads the 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 to write data into the frame buffer at the rising edge of the VFP signal; the DDIC starts to read the frame data from the frame buffer at the falling edge of the VBP signal. In order to avoid the tearing phenomenon, the speed of the main processor writing frame data into the frame buffer is higher than the speed of the data driver reading frame data from the frame buffer.
[0077] Figure 1 The structure schematic diagram of the electronic device is shown. For example, the electronic device can be a mobile phone, a tablet computer, etc. The type of the electronic device is not limited in the embodiment. It should be understood that,Figure 1 The electronic device shown is only one example of an electronic device, and an electronic device can have more or fewer components than shown in the figure, can combine two or more components, or can have a different configuration of components. Figure 1 The various components shown in FIG. 1 can be implemented in hardware, software, or a combination of both hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0078] The electronic device can 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, a headset interface 170D, a sensor module 180, a key 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 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (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. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0080] Among them, the controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to instruction operation codes and timing signals, complete the control of fetching instructions and executing instructions.
[0081] The processor 110 can also include memory that stores instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The cache memory can hold instructions or data that the processor 110 has recently used or is likely to use again. If the processor 110 needs to use that instruction or data again, it can be retrieved directly from the cache memory. This avoids repetition and reduces the latency of the processor 110, thus improving the efficiency of the system.
[0082] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device. In some other embodiments of the present application, the electronic device can also use different interface connection modes or a combination of multiple interface connection modes.
[0083] The wireless communication function of the electronic device can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.
[0084] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device. The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device. In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device can communicate with the network and other devices through the wireless communication technology.
[0085] The electronic device realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.
[0086] The display screen 194 is configured to display images, videos, and the like. 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 (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicrOLED, a Micro-OLED, a quantum dot light emitting diode (QLED), or the like. In some embodiments, the electronic device can include one 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 a command mode, i.e., the display screen is a command mode display screen.
[0088] The electronic device can implement the photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor.
[0089] The external memory interface 120 can be configured 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 are stored in the external memory card.
[0090] The internal memory 121 can be configured to store computer executable program codes including instructions. The processor 110 executes various function applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, and the like), and the like. The data storage area can store data created during use of the electronic device (such as audio data, a phone book, and the like), and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
[0091] The electronic device can implement an audio function through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc.
[0092] The sensor module 180 can include a pressure sensor, a gyro sensor, a barometric 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 one by one here, and the present application does not limit this.
[0093] The pressure sensor is used to sense a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor can be disposed 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 according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device detects the intensity of the touch operation according to the pressure sensor. The electronic device can also calculate the position of the touch according to the detection signal of the pressure sensor.
[0094] The fingerprint sensor is used to collect a fingerprint. The electronic device can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locking, fingerprint photographing, fingerprint answering a call, etc.
[0095] For example, in the embodiments of the present application, the fingerprint sensor can output the collected fingerprint to the processor 110, and the processor 110 can perform identification, recording, etc. on the fingerprint to implement fingerprint recording, fingerprint unlocking, etc.
[0096] Figure 2 The position of the fingerprint sensor is shown schematically. Please refer to Figure 2 For example, the fingerprint sensor can be disposed under the display screen of the electronic device, which is referred to as an under-screen fingerprint sensor, and can be used for under-screen fingerprint unlocking. Alternatively, the fingerprint sensor can be disposed at a position corresponding to the width and length of the electronic device, so that the user's thumb can touch the fingerprint sensing area corresponding to the fingerprint sensor when the user holds the electronic device with one hand. Of course, the above setting is only an example, and in other embodiments, the electronic device can be provided with multiple fingerprint sensors, and the position of the fingerprint sensor can be set according to actual needs, which is not limited in the present application. For example, the fingerprint sensor can 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. For example, the fingerprint sensor in the embodiments of the present application is an under-screen (i.e. under the display screen) sensor, i.e. the fingerprint sensor is disposed in (or under) the display screen.
[0097] The touch sensor, also referred to as a "touch panel" or TP (TouchPad) sensor, can be disposed on the display screen 194 to form a touch screen, also referred to as a "touch panel". The touch sensor is configured to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operation to the application processor to determine a touch event type. Visual output related to the touch operation can be provided through the display screen 194. In some embodiments, the touch sensor can also be disposed 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 can employ a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. Embodiments of the present application take an Android system with a layered architecture as an example to illustrate the software structure of the electronic device.
[0099] Figure 3 is a software structure block diagram of the electronic device according to an embodiment of the present application.
[0100] The layered architecture of the electronic device divides the software into several layers, each of which has a clear role 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, the applications layer, the application framework layer, the hardware abstract layer (HAL), and the kernel layer.
[0101] The applications layer can include a series of application packages.
[0102] As shown in Figure 3 , the application packages can include video applications, game applications, lock screen applications, fingerprint applications, and the like. The application packages can also include camera applications, gallery applications, WLAN applications, Bluetooth applications, call applications, calendar applications, map applications, navigation applications, music applications, short message applications, and the like.
[0103] For example, the fingerprint application can provide fingerprint entry, fingerprint recognition, fingerprint unlocking, and the like.
[0104] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the applications layer. The application framework layer includes a number of pre-defined functions.
[0105] As shown in Figure 3As shown, the application framework layer can include FingerPrint Service, SurfaceFlinger service, Input system, AGP (Android Gradle Plugin), etc.
[0106] Among them, the FingerPrint Service can be understood as a system service for providing some services related to fingerprints, such as fingerprint entry and deletion, fingerprint authentication, and fingerprint security policy. For example, the application can communicate with the fingerprint service through the FingerPrint Manager.
[0107] SurfaceFlinger is a system-level service responsible for managing and compositing all visible content of application interfaces (UI). It plays a role similar to 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 containing the content of application interfaces, such as windows, bitmaps, and other graphical elements), compositor (combining different application, system UI components and other graphical 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 features such as GPU to improve graphics rendering performance).
[0108] The Input system is an important module in the Android system, which is responsible for handling user input operations. This 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 Gradle plugin 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 task management, dependency management, incremental builds, and other core features.
[0110] In addition, the application framework layer can also include window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0111] The HAL is an interface layer between the operating system kernel and hardware circuitry. The HAL can include a TP HAL, a fingerprint HAL, an HWC (Hwcomposer), and the like. The TP HAL can perform relevant processing based on data and / or events reported by a TP sensor driver. The fingerprint HAL can perform relevant processing based on data and / or events reported by a fingerprint sensor driver.
[0112] In an embodiment of the present application, the fingerprint HAL can send an indication to enter a 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] Correspondingly, the fingerprint HAL can send an indication 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] The HWC is a HAL module for window composition and display, and provides hardware support for the SurfaceFlinger service.
[0115] In an embodiment of the present application, when the refresh rate of the display screen is switched from a high refresh rate to a low refresh rate, the HWC submits a Commit command to the display driver twice, the first time to notify the display driver to switch the screen refresh rate, and the second time to notify the DSI module to switch the MIPI clk.
[0116] The HWC does not block any Commit submitted by the SurfaceFlinger. In the under-screen fingerprint unlocking scenario, the 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 switching in the under-screen fingerprint unlocking scenario. In the non-under-screen fingerprint unlocking scenario, the 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 can also include an Android Runtime and a system library, which can be between the application framework layer and the hardware abstraction layer.
[0118] The Android Runtime includes a core library and a virtual machine. The Android Runtime is responsible for scheduling and managing the Android system. The core library contains two parts: one part is a function function that the java language needs to call, and the other part 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 file of the application layer and the application framework layer into a binary file. The virtual machine is used to execute the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection and the like. The system library can include a plurality of functional modules. For example: a surface manager (surface manager), a media library (Media Libraries), a three-dimensional graphics processing library (for example: OpenGL ES), a 2D graphics engine (for example: SGL) and the like.
[0119] The kernel layer is a layer between hardware and software. The kernel layer at least includes a display driver, a TP driver, a fingerprint sensor driver and the like. Among them, the hardware at least includes a processor, a display screen, a TP sensor, a fingerprint sensor and the like.
[0120] It can be understood that, 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 can include more or fewer layers than shown, and each layer can include more or fewer components, or combine certain components, or split certain components, or different component arrangements, which are not limited in the present application.
[0121] It can be understood that, in order to realize the display screen refresh rate switching method in the embodiments of the present application, the electronic device contains the corresponding hardware and / or software modules for executing each function. The algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain 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 beyond the scope of the present application.
[0122] The following will be described in combination with Figure 4 The image drawing and display process is explained. As shown in FIG. 2, the image drawing and display process includes the following steps. Figure 4As shown, in the Android system, the image drawing and display process needs to be completed by the application processor and the display screen (including the DDIC and the Panel) in cooperation, and the application processor and the display screen communicate through the MIPI bus. Among them, on the application processor side, first, the page is drawn through the application program (application, App), and then the layer synthesis is performed on the drawn layer through the SurfaceFlinger to obtain the image data. The image data is processed by the HWC and sent to the display driver. Then, the application processor sends the image data into the buffer of the DDIC through the MIPI, and the DDIC controls the Panel to complete the refresh rate switching and performs image refresh display by scanning (reading) the image data in the buffer.
[0123] MIPI clk refers to the clock frequency of MIPI, specifically the clock frequency when the application processor and the display screen transmit image data, which determines the rate of image data transmission from the application processor to the display screen. Specifically, MIPI supports high-speed and high-bandwidth data transmission. However, in high-speed mode, the power consumption is relatively high. Reducing the MIPI clock frequency (i.e., reducing MIPI clk) can reduce the transmission rate of data, 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 the case of low refresh rate, which can further optimize the endurance of the device.
[0124] In the high refresh rate display scenario, the software side generates image data at a high frequency, and accordingly, the display screen side refreshes the image at a high frequency according to the image data, thereby improving the smoothness of the picture. Since the human eye is more sensitive to moving objects, in various dynamic display scenarios, a higher screen refresh rate can improve the user's visual experience. When the electronic device perceives that it is currently in a dynamic display scenario, it can switch the current screen refresh rate to a higher screen refresh rate to meet the high frame rate display requirement of the dynamic display scenario. In order to reduce the power consumption of the electronic device, when the electronic device perceives that it is currently in a non-dynamic display scenario, it can also switch the current screen refresh rate to a lower screen refresh rate. In this way, when the display screen adopts the variable frequency display mode, its refresh rate can be dynamically switched according to the application scenario.
[0125] MIPI clk is the foundation of screen data transmission, while the screen refresh rate is the frequency at which the screen image is updated. If the MIPI clk is lower than the screen refresh rate, electronic devices will experience display problems such as image tearing. When the MIPI clk is lower than the screen refresh rate, the time it takes for one frame of image data to be transmitted via MIPI is greater than the display time of one frame. That is, the display screen has to refresh the image before the image data has been completely transmitted via MIPI, resulting in an incomplete image and display problems such as image tearing. When the MIPI clk is higher than the screen refresh rate, although it does not cause display problems such as image tearing, the device power consumption is relatively high, resulting in unnecessary power waste. Therefore, keeping both consistent ensures that the screen can display normally without image tearing and also avoids wasting device power.
[0126] Figure 5 (1) Exemplarily illustrates a scenario where the screen refresh rate is adjusted but the MIPI clk is not adjusted. For example, refer to... Figure 5 In (1), when the screen refresh rate is 120Hz, the display duration of one frame of image is 8.3ms. At this time, the MIPI clk is consistent with the screen refresh rate, which is also 120Hz. For example, the transmission duration of one frame of image data through MIPI is 5ms. When the screen refresh rate is switched from 120Hz (high refresh rate) to 60Hz (high refresh rate), the display duration of one frame of image becomes 16.6ms. If the MIPI clk is not adjusted, the MIPI clk is higher than the adjusted screen refresh rate. The transmission rate of one frame of image data through MIPI is higher, which will not affect the normal display of the image, but the device power consumption is relatively high.
[0127] Figure 5 Example (2) illustrates the scenario where the screen refresh rate and MIPI clk are adjusted. When the screen refresh rate is switched from 120Hz (high refresh rate) to 60Hz (high refresh rate), the display duration of one 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. For example, after the MIPI clk is switched to 60Hz, the duration of one frame of image data transmitted through MIPI increases to 12ms. At this time, the MIPI clk and the screen refresh rate are consistent, and there will be no display problems such as image tearing. Moreover, when the screen refresh rate is low, the use of a lower MIPI clk by the electronic device can reduce the device's power consumption.
[0128] In the 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 are consistent, thereby ensuring the normal display of the screen and the performance of the device.
[0129] Since no frame buffer is set in the video mode display screen, the application processor does not need to notify the DDIC when switching the screen refresh rate, and can directly control the display screen to switch the refresh rate, and the refresh rate can take effect immediately after switching.
[0130] Since the frame buffer is set in the command mode display screen, the DDIC needs to read the image data from the frame buffer to make the screen refresh the picture, so the application processor needs to notify the DDIC when switching the screen refresh rate, and the DDIC implements the switching of the screen refresh rate. Therefore, if the HWC on the application processor side notifies the DDIC to switch the screen refresh rate through the display driver when submitting the i-th frame of image data through the Commit command, the 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, and the switched screen refresh rate takes effect when displaying the i+2-th frame of image data on the screen.
[0131] If the HWC on the application processor side notifies the DSI (Display Serial Interface) module to switch the 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, and the switched MIPI clk takes 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 display screen is commanded to be 120Hz (i.e., the period of the TE signal is 8.3ms), and the MIPI clk is 120Hz (i.e., the period of the MIPI clk is 8.3ms). The application processor determines to switch the refresh rate of the display screen from 120Hz to 60Hz. If the HWC, when the i-th frame of image data is submitted through the Commit command, notifies the DDIC through the display driver to switch the screen refresh rate to 60Hz, and notifies the DSI module to switch the MIPI clk to 60Hz, then the MIPI clk of 60Hz (i.e., the period of the MIPI clk is 16.6ms) takes effect when the (i+1)-th frame of image data is transmitted through the MIPI, and the screen refresh rate of 60Hz (i.e., the period of the TE signal is 16.6ms) takes effect when the (i+2)-th frame of image data is displayed on the screen. In this way, when the application processor transmits the (i+1)-th frame of image data, the screen refresh rate is higher than the MIPI clk. That is, the time length for the application processor to transmit the (i+1)-th frame of image data through the MIPI is greater than the screen refresh time length, so that the display screen has to be refreshed before the (i+1)-th frame of image data is transmitted, resulting in incomplete image data displayed on the screen and screen display mura phenomenon.
[0133] Therefore, when the screen refresh rate is switched from a high refresh rate (e.g., 120Hz) to a low refresh rate (e.g., 60Hz), the switching of the screen refresh rate and the switching of the MIPI clk are not synchronized, and the switching of the screen refresh rate is later than the switching of the MIPI clk, which causes the screen display mura problem.
[0134] To solve the delay problem of the switching of the refresh rate of the command mode display screen, an application embodiment provides a non-blocking screen refresh rate switching scheme. 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 through the display driver to switch the screen refresh rate, and then notify the DSI module to switch the MIPI clk, so that the switched screen refresh rate and the MIPI clk can take effect at the same time, and the screen display mura problem is avoided. For example, the HWC, when the i-th frame of image data is submitted through the Commit command, notifies the DDIC through the display driver to switch the screen refresh rate, and then, when the (i+1)-th frame of image data is submitted through the Commit command, notifies the DSI module to switch the MIPI clk.
[0135] Reference Figure 7a and Figure 7bThe switching process of the screen refresh rate without blocking is explained in S201-S205. When the application processor side SurfaceFlinger commits the i-th frame image data, the frame rate information carried is 60 FPS. After the HWC obtains the data committed by the SurfaceFlinger, according to the last switching frame rate information recorded (for example, 120 FPS), it is determined that the frame rate needs to be switched, that is, the frame rate is switched from a high frame rate (120 FPS) to a low frame rate (60 FPS), which is equivalent to determining that the current screen refresh rate needs to be switched from a high refresh rate (120 Hz) to a low refresh rate (60 Hz). In this case, the HWC first notifies the display driver to switch the screen refresh rate, and then notifies the DSI module to switch the MIPI clk. When the HWC performs the first commit operation, for example, when it commits 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 60 Hz. Subsequently, when the HWC performs the second commit operation, for example, when it commits the i+1-th frame image data to the display driver, it notifies the DSI module to switch the MIPI clk to 60 Hz.
[0136] In this way, the DDIC receives the refresh rate switching command when processing the i-th frame image data, and switches the screen refresh rate when processing the i+1-th frame image data, and the switched screen refresh rate takes effect when the i+2-th frame image data is displayed on the screen. The DSI module receives the MIPI clk switching command when transmitting the i+1-th frame image data, and performs the switching operation of the MIPI clk, and the switched MIPI clk takes effect when the i+2-th frame image data is transmitted.
[0137] That is, the screen refresh rate of 60 Hz (i.e., the TE signal period is 16.6 ms) takes effect when the i+2-th frame image data is displayed on the screen, and at the same time, the MIPI clk of 60 Hz (i.e., the period of the MIPI clk is 16.6 ms) also takes effect when the i+2-th frame image data is transmitted on the MIPI bus. Therefore, the switched screen refresh rate and MIPI clk take effect at the same time, and the screen refresh rate and MIPI clk always remain consistent, and there is no screen display glitch phenomenon.
[0138] For example, the SurfaceFlinger can call the SetActiveConfig function in the HWC to notify the HWC to switch the frame rate.
[0139] For example, when the HWC performs the first Commit operation, the HWC 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 to the DDIC to switch the screen refresh rate.
[0140] For example, when the HWC performs the second Commit operation, the HWC can set the relevant parameters of the MIPI, including but not limited to the bandwidth of the MIPI, the MIPI clk, and the like, by executing the SetQosData function, and notify the DSI module to complete the switching of the relevant parameters.
[0141] For example, when the HWC performs the second Commit operation, the HWC can not only notify the DSI module to switch the MIPI clk to 60 Hz, but also notify the DDIC to set the display refresh rate mode (mode) through the display driver, where different screen refresh rates correspond to different display refresh rate modes. For example, when the HWC performs the second Commit operation, the HWC 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 the DDIC to set the refresh rate mode.
[0142] In a scenario where the refresh rate of the display screen is switched from a low refresh rate to a high refresh rate, the screen will not be displayed in a scrambled manner when the MIPI clk is raised in advance. The MIPI clk is raised in advance, which means that the rate of transmitting one frame of image data through the MIPI bus is increased, and the situation that one frame of image data is not transmitted when the display screen is refreshed will not occur, so the problem of screen display in a scrambled manner will not occur.
[0143] In this embodiment, for a scenario where the screen refresh rate is switched 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 in one Commit operation. For a scenario where the screen refresh rate is switched from a high refresh rate to a low refresh rate, the HWC notifies the display driver to switch the screen refresh rate in advance (for example, in the previous Commit operation) and notifies the DSI module to switch the MIPI clk in the rear (for example, in the subsequent Commit operation), so as to realize a scheme of switching the screen refresh rate without blocking.
[0144] Currently, the unlocking methods of electronic devices include but are not limited to fingerprint unlocking, password unlocking, face unlocking, and the like. In a scenario of unlocking the electronic device by fingerprint, the user needs to pre-record the fingerprint, and in a case where the fingerprint of the finger used at the time of unlocking matches the pre-recorded fingerprint, the electronic device can be unlocked.
[0145] In the embodiments 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 an under-screen fingerprint identification capability. In response to a touch operation of a user on a fingerprint unlocking area (or a fingerprint sensing area), the display screen enters a local high-brightness mode (LHBM), and a fingerprint collection light spot on the fingerprint unlocking area of the display screen is lit to facilitate the collection of fingerprint information. In response to a hand-off operation (i.e., a cancel touch operation) of the user on the fingerprint unlocking area, the display screen exits the LHBM, and the fingerprint collection light spot on the fingerprint unlocking area of the display screen is extinguished. The fingerprint unlocking area can be understood as a display screen area corresponding to the position of the fingerprint sensor.
[0146] In the embodiments, the fingerprint collection light spot is a hard light spot, which is different from a soft light spot (i.e., a display screen light spot controlled by a software program). The hard light spot is a light spot emitted by the display screen itself.
[0147] In some implementations, the fingerprint collection light spot can be a light spot in the shape of a finger or a light spot similar to a fingerprint texture to more clearly prompt the user that the place is a fingerprint collection place. In some implementations, in order to be able to adapt to different finger sizes, the fingerprint collection light spot can be a light spot in a general 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 in a high-brightness color, such as a white light spot, to provide more light for the lens of the under-screen fingerprint sensor to collect a clearer fingerprint image.
[0149] Figure 8 An example fingerprint unlocking scene schematic diagram is shown. Referring to Figure 8 (1) in the embodiment, the mobile phone is in an off-screen display mode, and an always-on display (AOD) interface 301 is displayed. The example AOD 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 a fingerprint unlocking area, and the user can use the fingerprint to unlock in the area. In response to a touch operation (or a press operation) of the user on 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 in Figure 8 (2). The interface 303 includes a fingerprint collection light spot (or a light spot image, a light spot, etc.) 304. The light spot image is displayed in high brightness in the interface 303. The areas other than the light spot image 304 in the interface 303 can be off-screen display or non-high-brightness display, which is not limited in the embodiments. That is, in response to the touch operation of the user on the fingerprint image 302, the electronic device controls the display screen to light the fingerprint collection light spot. The position displayed by the fingerprint light spot corresponds to the area where the fingerprint sensor collects data.
[0150] With reference to the foregoing Figure 8 In the middle (2), the user can press the fingerprint collection light 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 light 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 successful matching, the mobile phone can determine that the screen has been unlocked, display the mobile phone main interface or display the unlocking interface including the unlocking icon. In the case of unsuccessful matching, the mobile phone determines that the screen is not unlocked, and displays the lock screen interface. The lock screen interface can be a bright screen interface, and the display content in the lock screen interface is not limited in this embodiment. In the case of unsuccessful matching, the mobile phone can also display a prompt information that the fingerprint unlocking is unsuccessful, which can be text information or image information displayed on the lock screen interface, or vibration information, voice information, etc.
[0152] Optionally, after the fingerprint sensor completes the fingerprint data collection operation, the electronic device can control the display screen to extinguish the fingerprint collection light spot. Optionally, when the user's finger leaves the display screen, the electronic device can control the display screen to extinguish the fingerprint collection light spot.
[0153] It can be understood that the faster the fingerprint unlocking speed is, the better the user experience is. When the refresh rate of the display screen is a high refresh rate (such as 120Hz), it is beneficial to improve the speed of fingerprint data collection, and in turn can improve the speed of fingerprint unlocking. Therefore, in the fingerprint unlocking scenario, the electronic device needs to switch the refresh rate of the display screen to a high refresh rate to improve the speed of fingerprint unlocking.
[0154] In an implementation manner, due to the limitation of hardware, only the hard light spot (i.e. the fingerprint collection light spot) configuration parameter corresponding to a certain high refresh rate (such as 120Hz) is burned in the display screen when it is shipped. That is, the hard light spot can only be displayed when the refresh rate of the display screen 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 light spot configuration parameter, the electronic device needs to switch the refresh rate of the display screen to the high refresh rate in the fingerprint unlocking scenario.
[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 the LHBM. The target refresh rate can be understood as a high refresh rate that is beneficial to fingerprint unlocking, or a high refresh rate corresponding to the pre-burned hard light spot configuration parameter. The following takes 120Hz as an example to explain and describe the target refresh rate.
[0156] Figure 9aThe screen refresh rate switching in the fingerprint unlocking scenario is exemplarily shown in S401-S409. In response to the operation of the user's finger pressing (or touching) the fingerprint unlocking area on the screen, the TP driver notifies the fingerprint sensor driver of a 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, 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 the LHBM. At the same time, the fingerprint HAL also notifies the fingerprint service in the application framework layer to issue a screen refresh rate switching command from the upper layer to the display driver through the fingerprint service. It is continued to refer to Figure 9a In S405-S407, the fingerprint service notifies the SurfaceFlinger of the screen refresh rate switching through the AGP, and then the SurfaceFlinger only switches the screen refresh rate when submitting the image data to the HWC through the Commit command. In this scenario, the screen refresh rate is switched from a low refresh rate to a high refresh rate. When the HWC submits a frame of image data, the HWC notifies the display driver to switch the screen refresh rate to 120Hz, and instructs the DSI module to switch the MIPI clk to 120Hz. The display driver switches the display screen refresh rate to 120Hz according to the notification of the HWC, and controls the display screen to enter the LHBM, so that the display screen displays the fingerprint acquisition light spot in the fingerprint unlocking area.
[0157] After receiving the finger down event, the fingerprint HAL determines that the screen refresh rate needs to be switched to 120Hz, 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 the LHBM. After receiving the notification of the fingerprint HAL, the display driver waits for the screen refresh rate switching process of the upper layer, that is, waits for the screen refresh rate switching notification issued by the HWC. Due to some reasons, the screen refresh rate switching process of the upper layer may be abnormal, for example, the display driver waits for the screen refresh rate switching notification issued by the HWC for a long time. It is referred to Figure 9a In S410, if the display driver has not received the screen refresh rate switching notification issued by the HWC when the waiting time reaches the preset threshold (for example, 100ms), the display driver directly issues a refresh rate switching command to the display screen to switch the display screen refresh rate to 120Hz and control the display screen to enter the LHBM. In this case, the display screen 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 screen refresh rate, and the two do not match, which will cause the problem of screen display with garbled characters.
[0158] Figure 9bAn example shows another possible problem scenario. In combination with Figure 9a S401-S409 and Figure 9b S411-S415, after the display screen enters the LHBM in the fingerprint unlocking scenario, other applications can notify the SurfaceFlinger through the AGP to switch the screen refresh rate back to a low refresh rate (such as 60 Hz). At this time, if the display driver does not intercept the screen refresh rate switching notification issued by the HWC, the screen refresh rate of the upper layer and the bottom layer (i.e., the hardware) will not match, which will further cause the screen to display a distorted image.
[0159] Figure 9c An example shows another possible problem scenario. In combination with Figure 9a S401-S409 and Figure 9c S417-S422, after the display screen enters the LHBM in the fingerprint unlocking scenario, other applications can notify the SurfaceFlinger through the AGP to switch the screen refresh rate back to a low refresh rate (such as 60 Hz). At this time, if the display driver intercepts the screen refresh rate switching notification issued by the HWC, the display driver will not control the display screen to switch the refresh rate back to 60 Hz, but can cause the display screen to appear to be stuck. Moreover, according to the aforementioned non-blocking switching scheme when switching from a high refresh rate to a low refresh rate, the screen refresh rate switching notification and the MIPI clk switching notification are issued by the HWC twice. The display driver can only intercept the screen refresh rate switching notification issued by the HWC to avoid switching the screen refresh rate back to 60 Hz. However, the display driver cannot intercept the MIPI clk switching notification issued by the HWC, and the MIPI clk will be switched back to 60 Hz, so that the MIPI clk is lower than the refresh rate of the display screen, and the two do not match, which causes the screen to display a distorted image and to be stuck.
[0160] To solve these problems that can occur in the fingerprint unlocking scenario, an embodiment of the present application provides a method for switching the refresh rate of a display screen. In the method, when a user uses fingerprint unlocking, the display screen of an electronic device enters the LHBM, and a fingerprint collection light spot is displayed on the interface. The value of the screen refresh rate is switched from an original value to a target value. During the process in which the electronic device displays the fingerprint collection light spot, the electronic device does not respond to any application program modifying the screen refresh rate, so that the value of the screen refresh rate is maintained at the target value.
[0161] When the value of the screen refresh rate 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 light spot configuration parameter. For example, the target value is 120. When the display screen of the electronic device enters the LHBM, the fingerprint collection light spot is displayed on the interface, and the screen refresh rate is set to 120Hz. When the user's finger is away from the display screen, the display screen of the electronic device exits the LHBM, the fingerprint collection light spot is cancelled on the interface, and the value of the screen refresh rate is switched back to the original value from the target value.
[0162] The following separately explains the processes of the display screen entering the LHBM and the display screen exiting the LHBM.
[0163] Figure 10a An example of a module interaction flowchart is shown. As shown in Figure 10a The process of the display screen entering the LHBM can include:
[0164] S501, in response to the operation of the user's finger touching the fingerprint unlocking area on the display screen, the TP driver detects the finger touch event.
[0165] S502, the TP driver determines whether the finger touch area is located in the fingerprint unlocking area. If yes, S503 is performed, and if no, 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 according to the touch point coordinate information reported by the TP. If yes, the TP driver can determine that the current enters the fingerprint unlocking scene, otherwise the TP driver determines that the current does not enter the fingerprint unlocking scene, and 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 can directly send a finger down event to the fingerprint sensor driver, and send a finger down event to the fingerprint HAL through the fingerprint sensor driver.
[0170] For example, the TP driver can send a finger down event to the fingerprint sensor driver through the send_event_to_fingerprint_ud function. For another example, the fingerprint sensor driver can send the finger down event to the fingerprint HAL through the ud_fingerprint_irq_notify function.
[0171] As another optional implementation, the TP driver can send the finger down event to the Input system, and the Input system can distribute the finger down event to the fingerprint HAL.
[0172] The present 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 enter LHBM information to the display driver.
[0174] After receiving the finger down event, the fingerprint HAL can determine that the electronic device currently enters the fingerprint unlocking scene, and needs to highlight the fingerprint collection light spot (i.e., the hard light spot) on the display screen. Therefore, after receiving the finger down event, the fingerprint HAL sends enter LHBM information to the display driver. The enter LHBM information can be understood as information for indicating "enter LHBM", for example, the information is enter LHBM.
[0175] For example, the fingerprint HAL can send the information "enter LHBM" 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 enter LHBM information, the display driver determines that the value of the screen refresh rate needs to be switched to the target value (e.g., 120) at present, that is, the value of the screen refresh rate needs to be switched to 120Hz at present. At this time, the display driver needs to record the original value of the screen refresh rate, that is, record the value of the current screen refresh rate, so as to switch the display screen refresh rate from the target value back to the original value when the display screen exits the LHBM.
[0178] S507, the display driver sends the finger down state to the HWC.
[0179] The display driver sends the finger down state to the HWC, which is used to inform the HWC of the current finger state (finger down state or finger up state) of the user.
[0180] For example, the display driver can send the finger down state to the HWC through the notify_display_udfp_finger_status function.
[0181] In S508, the HWC sets the value of the finger down state variable to true.
[0182] For example, the HWC is pre-configured with a finger down state variable or a finger down flag. 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 user is the finger down state. 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 user is the finger up state.
[0183] For example, 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 current finger state of the user is the finger down state, the HWC can determine that the electronic device is currently in the fingerprint unlocking scenario. If the current finger state of the user is the finger up state, the HWC can determine that the electronic device is not currently in the fingerprint unlocking scenario.
[0185] After the HWC receives the finger down state sent by the display driver, the value of the finger down state variable is updated, that is, the value of the finger down state variable is set to true.
[0186] In the embodiment of the present application, after receiving the Commit command submitted by the SurfaceFlinger, the HWC can determine whether the electronic device is currently in the fingerprint unlocking scenario according to the current value of the finger down state variable, that is, determine whether the configuration parameter value corresponding to the target value of the screen refresh rate (such as 120) pre-stored needs to be used to replace the related configuration parameter value in the Commit command submitted by the 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 the fingerprint unlocking scenario, the HWC replaces the related configuration parameter value in the Commit command submitted by the SurfaceFlinger with the pre-stored configuration parameter value corresponding to the target value of the screen refresh rate, and continues to submit the Commit command to the display driver after the replacement is completed.
[0188] Exemplarily, if the current value of the finger down state variable is false, the HWC determines that the electronic device is currently not in the fingerprint unlocking scenario, and the HWC does not need to adjust the related configuration parameters in the Commit command submitted by the SurfaceFlinger, and directly submits the Commit command to the display driver.
[0189] Details not explained here can be referred to below, which will not be repeated 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 the LHBM.
[0191] After the display driver receives the information of entering the LHBM, it is determined that the value of the screen refresh rate needs to be switched to the target value (such as 120) at present, 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 the LHBM.
[0192] Exemplarily, the display driver can control the display screen to switch the value of its refresh rate to the target value through the HWDeviceDRM::ForceSetUdfpFps function.
[0193] After the display screen enters the LHBM, the fingerprint unlocking area of the display screen highlights the fingerprint collection light spot, so as to quickly and accurately collect the fingerprint data.
[0194] The sequence of S506, S507 and S509 is not limited in this embodiment.
[0195] Different from Figure 9a The flow of the display screen entering the LHBM shown in the figure, in the flow of the display screen entering the LHBM provided in this embodiment, the fingerprint HAL no longer notifies the upper layer fingerprint service, that is, the display screen refresh rate switching process is no longer triggered by the fingerprint service from the upper layer. In the flow of the display screen entering the LHBM provided in this embodiment, after the fingerprint HAL sends the information of entering the LHBM to the display driver, it directly controls the display screen to switch the screen refresh rate, so that the problem such as Figure 9aThe display driving waits for a timeout before controlling the display screen to switch the screen refresh rate, so as to improve the rate of the electronic device display screen to perform LHBM, which is conducive to improving the speed of fingerprint data acquisition, and is also conducive to improving the speed of fingerprint unlocking.
[0196] Figure 10b An exemplary module interaction flowchart is shown. As shown in Figure 10b The display screen exits the LHBM process can include:
[0197] S509, in response to the user's finger lifting operation on the fingerprint unlocking area of the display screen, the TP driver detects the finger lifting event.
[0198] S510, the TP driver judges whether the finger lifting area is located in the fingerprint unlocking area, if yes, S511 is executed, if not, a finger up event is sent to the Input system.
[0199] The TP driver can determine whether the finger lifting area is located in the fingerprint unlocking area according to the coordinate information reported by the TP, if yes, the TP driver can determine that the current fingerprint unlocking scene is exited, otherwise, the TP driver can send a finger up event to the Input system to distribute the finger up 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 can directly send a finger up event to the fingerprint sensor driver, and send the finger up event to the fingerprint HAL through the fingerprint sensor driver.
[0203] Exemplarily, the TP driver can send a finger up event to the fingerprint sensor driver through the send_event_to_fingerprint_ud function. Exemplarily, the fingerprint sensor driver can send a finger up event to the fingerprint HAL through the ud_fingerprint_irq_notify function.
[0204] As another optional implementation, the TP driver can send a finger up event to the Input system, and distribute the finger up event to the fingerprint HAL through the Input system.
[0205] The embodiment does not limit the flow of the TP driving to send the finger up event to the fingerprint HAL.
[0206] In S513, the fingerprint HAL sends exit LHBM information to the display driver.
[0207] After receiving the finger up event, the fingerprint HAL can determine that the electronic device currently exits the fingerprint unlocking scene, and does not need to display the fingerprint collection light spot on the display screen. Therefore, after receiving the finger up event, the fingerprint HAL sends exit LHBM information to the display driver. The exit LHBM information can be understood as information for indicating "exit LHBM", for example, the information is exit LHBM.
[0208] For example, the fingerprint HAL can send the information "exit LHBM" to the display driver through the msml_ioctl_hbm_set function.
[0209] In S514, the display driver sends the finger up state to the HWC.
[0210] The display driver sends the finger up state to the HWC, to inform the HWC of the current finger state (finger down state or finger up state) of the user.
[0211] For example, the display driver can send the finger up state to the HWC through the notify_display_udfp_finger_status function.
[0212] In S515, the HWC sets the value of the finger down state variable to false.
[0213] After receiving the finger down state sent by the display driver, the HWC sets the value of the finger down state variable to false, to determine that the electronic device currently does not enter the fingerprint unlocking scene.
[0214] In 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 the LHBM.
[0215] After receiving the exit LHBM information, the display driver determines that the value of the screen refresh rate currently needs to be switched back to the original value, and then can control the display screen to switch the value of its refresh rate to the original value of the screen refresh rate recorded by the display driver, and control the display screen to exit the LHBM.
[0216] Exemplarily, the display driving can control the display to switch the value of the refresh rate back to the original value through the HWDeviceDRM::ForceSetUdfpFps function.
[0217] After the display exits the LHBM, the fingerprint unlocking area of the display is cancelled to display the fingerprint collection light spot.
[0218] The embodiment does not limit the sequence of S514 and S516.
[0219] The process not explained in detail can refer to the foregoing or prior art, and will not be described here.
[0220] The following describes the display process of one frame of image to explain the display screen refresh rate switching method provided by the embodiment. Figure 11 Exemplarily, a module interaction flowchart is shown. As shown in Figure 11 The display process of one frame of image can include:
[0221] S601, the APP draws one frame of APP page and performs rendering to obtain one frame of APP page data, and submits the APP page data to SurfaceFlinger.
[0222] When the APP needs to refresh the page, it draws one frame of APP page through its drawing thread, and performs rendering on the frame of APP page through its rendering thread to obtain one frame of APP page data. One frame of APP page data can be understood as image data of the APP interface displayed on the display screen.
[0223] S602, SurfaceFlinger performs the operation of synthesizing layers.
[0224] After receiving the page data submitted by the APP, SurfaceFlinger synthesizes the page data as a layer with other layers (such as a status bar layer, etc.) to obtain one frame of image data to be displayed on the display screen, and submits the image data to HWC through a Commit command.
[0225] In the Commit command sent by SurfaceFlinger to HWC, information such as layer information, frame rate information, power mode (power mode), etc. can be included, but is not limited thereto.
[0226] S603, HWC judges whether the value of the finger down state variable is true, if yes, S604 is executed, and if not, S605 is executed.
[0227] After receiving the Commit command sent by the SurfaceFlinger, the HWC reads the current value of the finger down state variable, and determines whether the electronic device is currently in the fingerprint unlocking scene according to the current value of the finger down state variable.
[0228] When the electronic device is currently in the fingerprint unlocking scene, according to the flow shown in the foregoing Figure 10a screen refresh rate has been switched to the target refresh rate (for example, 120) matching the fingerprint collection light spot. In order to avoid the problem of screen flicker, the HWC needs to adjust the Commit command received by it. When the electronic device is not currently in the fingerprint unlocking scene, according to the flow shown in the foregoing Figure 10b screen refresh rate has not been switched to the target refresh rate matching the fingerprint collection light spot, at this time the HWC does not need to adjust the Commit command received by it.
[0229] In S604, the HWC replaces the value of the related configuration parameter in the Commit with the parameter value corresponding to the target refresh rate.
[0230] If the current value of the finger down state variable is true, the HWC determines that the electronic device is currently in the fingerprint unlocking scene, and the HWC does not block the Commit flow sent by the SurfaceFlinger, but replaces the value of the related configuration parameter in the Commit command received by it with the parameter value corresponding to the target refresh rate, so that after the HWC issues 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 target refresh rate currently set.
[0231] Among them, the HWC stores the related configuration parameter values corresponding to the target refresh rate. For example, the HWC can obtain the pre-stored related configuration parameter values corresponding to the target refresh rate when the electronic device is powered on.
[0232] For example, in the Commit command sent by the SurfaceFlinger to the HWC, the frame rate information carried does not match the target refresh rate currently set by the screen. Taking the target refresh rate of 120Hz as an example, the frame rate information carried in the Commit command sent by the SurfaceFlinger to the HWC is 60Hz (or 60FPS), which does not match. At this time, the HWC does not block the Commit flow sent by the SurfaceFlinger, but replaces the related configuration parameter value corresponding to 60Hz (or 60FPS) in the Commit command received by it with the parameter value corresponding to 120Hz (or 120FPS).
[0233] In the Commit command sent by SurfaceFlinger to HWC, a configuration parameter value is value 1, which is determined according to the screen refresh rate "60Hz" or the image synthesis frame rate "60FPS". In the case that the current value of the finger down state variable is true, HWC replaces the configuration parameter value with value 2, which is determined according to the screen refresh rate "120Hz" or the image synthesis frame rate "120FPS". That is, after the configuration parameter value is replaced, HWC will submit the Commit command according to the screen refresh rate or the frame rate corresponding to the replaced parameter value.
[0234] For example, in this step, the configuration parameters that need to be replaced by HWC can 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, please refer to the prior art, which will not be described here.
[0235] Optionally, before HWC replaces the value of the related configuration parameter in the Commit with the parameter value corresponding to the target refresh rate, the original value of the related configuration parameter in the Commit can also be recorded, so that the settings of the related configuration parameter in the 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, HWC determines that the electronic device is not currently in the fingerprint unlocking scene, and HWC does not need to perform S604, but directly performs S605.
[0238] In the case that the electronic device is currently in the fingerprint unlocking scene, the HWC replaces the value of the related 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 value of the related configuration parameter in the Commit command has been replaced with a value matching the target refresh rate, so 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 related configuration parameter in the Commit, and the HWC does 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 also does not notify the DSI module to switch the MIPI clk.
[0239] In the case that the electronic device is currently not in the fingerprint unlocking scene, the HWC does not replace the value of the related configuration parameter in the Commit, and directly commits the image data to the display driver. At this time, the HWC can process according to the logic as shown in the foregoing. If the HWC determines that the current scene is a low refresh rate to high refresh rate switching scene, when the HWC commits the image data to the display driver, it notifies the display driver to switch the refresh rate, and notifies the DSI module to switch the MIPI clk. If the HWC determines that the current scene is a high refresh rate to low refresh rate switching scene, when the HWC commits the image data of the current frame (such as the i-th frame) to the display driver, it notifies the display driver to switch the refresh rate, and 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 the refresh rate switching notification is received, if not, S607 is executed, and if yes, S608 is executed.
[0241] S607, the display driver sends image data to the display screen.
[0242] S608, the display driver controls the screen to switch the refresh rate, and sends image data to the display screen.
[0243] When the display driver receives the image data committed by the HWC, if the refresh rate switching notification is received, the display driver 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 performs a switching operation of the screen refresh rate according to the refresh rate switching command.
[0244] When the display driver receives the HWC to which the image is committed, if the refresh rate mode setting notification is received, the refresh rate mode setting command is sent to the display screen according to the refresh rate mode setting notification, so that the DDIC in the display screen performs the setting operation of the screen refresh rate mode according to the refresh rate mode setting command.
[0245] In this way, when the electronic device enters the fingerprint unlocking scene, the screen refresh rate is directly switched to the target refresh rate matched with the fingerprint collection light spot. When SurfaceFlinger sends the Commit command to HWC, HWC will not block the Commit process, but replace the value of the related configuration parameter in the Commit command with the parameter value matched with the target refresh rate, so that the screen refresh rate is always kept at the target refresh rate, and the MIPI clk is also matched with the screen refresh rate, thereby avoiding the problem of screen display mura.
[0246] When the electronic device enters the fingerprint unlocking scene, the screen refresh rate is directly switched to the target refresh rate matched with the fingerprint collection light spot. When SurfaceFlinger does not send the Commit command to HWC, the AP will not transmit image data to the display screen through MIPI, so that the screen refresh rate is directly switched to the target refresh rate, and the problem of screen display mura will not occur.
[0247] The following explains the display screen refresh rate switching method provided by the embodiment in combination with the under-screen fingerprint unlocking scene of an electronic device (for example, a mobile phone). In this scene, the display screen refresh rate is switched to 120Hz when the electronic device enters the LHBM, and the refresh rate corresponding to the hard light spot configuration parameter pre-burned at 120Hz is taken as an example.
[0248] Figure 12a An exemplary under-screen fingerprint unlocking scene 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 Figure 12aIn the middle (1), the mobile phone displays the lock screen interface 701, and the value of the screen refresh rate is 60 (i.e., the screen refresh rate is 60 Hz). In response to the operation of 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 the fingerprint HAL receives the finger down event, the fingerprint HAL sends the "enter LHBM" information to the display driver. The display driver stores the original value "60" of the screen refresh rate, and controls the display screen to switch the value of the screen refresh rate to "120", and controls the display screen to enter the LHBM. Then, the value of the screen refresh rate of the mobile phone is set to 120, and the interface 702 is displayed. Among them, the fingerprint collection light spot is displayed on the interface 702, which facilitates the under-screen fingerprint sensor to collect the user's fingerprint data. At this time, the screen refresh rate of the mobile phone is consistent with the refresh rate corresponding to the configuration parameter of the fingerprint collection light spot, and the under-screen fingerprint sensor can quickly perform the fingerprint data collection operation.
[0250] After the display driver receives the "enter LHBM" information, the display driver 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] Continuing to refer to Figure 12a In the middle (2), the mobile phone displays the interface 703 containing the fingerprint collection light spot. In response to the operation of the user's finger lifting in the fingerprint unlocking area, the TP driver sends a finger up event to the fingerprint HAL through the fingerprint sensor driver. After the fingerprint HAL receives the finger up event, the fingerprint HAL sends the "exit LHBM" information to the display driver. The display driver controls the display screen to switch the value of the screen refresh rate back to the original value "60", and controls the display screen to exit the LHBM. Then, the value of the screen refresh rate of the mobile phone is set to 60, and the interface 704 is displayed. Among them, in the case that the fingerprint unlocking is successful, the interface 704 can be the home interface of the mobile phone; in the case that the fingerprint unlocking is not successful, the interface 704 can be the lock screen interface in the bright screen (state).
[0252] After the display driver receives the "exit LHBM" information, the display driver 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] Referring to Figure 12aIn the fingerprint unlocking scenario, after the user's finger touches the fingerprint unlocking area, the display driver sets the screen refresh rate to 120Hz, and after the user's finger 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 AP will not transmit image data to the display screen through MIPI, and the display driver directly switches the screen refresh rate, which will not cause the screen to display a garbled screen.
[0254] Figure 12b An example is shown in a screen-under fingerprint unlocking scenario. In the process of screen-under fingerprint unlocking, the AP transmits image data to the display screen through MIPI.
[0255] Regarding Figure 12b In (1), the explanation and description of the reference to Figure 12a In (1), the explanation and description of the reference to
[0256] Continuing to refer to Figure 12b In (2), in the process of screen-under fingerprint unlocking, 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 to make the AP transmit image data to the display screen through MIPI. Among them, after HWC receives the Commit command sent by SurfaceFlinger, it is found that the current value of the finger down state variable is true, and the related configuration parameter value in the Commit command is replaced. For example, the frame rate value of SurfaceFlinger is 60, and the related configuration parameter value in the Commit command sent to HWC is matched with the frame rate value "60". After HWC receives the Commit command sent by SurfaceFlinger, the related configuration parameter value matched with the frame rate value "60" is replaced with the related configuration parameter value matched with the frame rate value "120", and the Commit image data command is sent 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 value 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 value 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, the HWC does not block the Commit process sent by the SurfaceFlinger, but also does not respond to the frame rate switching process initiated by the SurfaceFlinger, but when the current value of the finger down state variable is true, the pre-stored configuration parameter value matching the frame rate value "120" is used for parameter value replacement. Thus, the screen refresh rate is always maintained at 120Hz, and the MIPI clk is also matched with the screen refresh rate, so that the screen does not have the problem of mura display during the process of under-screen fingerprint unlocking.
[0258] Figure 12c An example is shown after the under-screen fingerprint unlocking. For the explanation of the finger lifting in the fingerprint unlocking area triggering the display to exit the LHBM, please refer to the foregoing, which will not be repeated here. Continue to refer to Figure 12c After the display exits the LHBM, the SurfaceFlinger sends a command to the HWC to Commit the image data, and the HWC sends a command to the display driver to Commit the image data, so that the AP transmits the image data to the display through the MIPI. Among them, after the HWC receives the Commit command sent by the SurfaceFlinger, it is found that the current value of the finger down state variable is false, and the related configuration parameter value in the Commit command is no longer replaced, but is processed according to the existing logic and the actual situation. In the example shown in FIG. 12, the synthesis frame rate value of the SurfaceFlinger is 90. When the SurfaceFlinger sends the Commit, the related configuration parameter value is matched with the frame rate value "90". After the HWC receives the Commit command sent by the SurfaceFlinger, it determines to switch the screen refresh rate value to 90. At this time, the frame rate value or the refresh rate value of the HWC is "90", and it is determined that it is a low frame rate to high frame rate situation (or a low refresh rate to high refresh rate situation). When the HWC Commit image data to the display driver, it notifies the display driver to switch the screen refresh rate value to 90, and notifies the DSI module to switch the MIPI clk value to 90. Then, the display driver can switch the screen refresh rate value to 90 according to the notification, and the DSI module can switch the MIPI clk value to 90 according to the notification.
[0259] For another example, the frame rate value of SurfaceFlinger is 30. SurfaceFlinger sends a Commit to HWC, and the related configuration parameter value is matched with the frame rate value "30". After receiving the Commit sent by SurfaceFlinger, HWC determines to switch the screen refresh rate value to 30. At this time, the frame rate value or the refresh rate value of HWC is "30", and it is determined that the current situation is high frame rate switching to low frame rate (or high refresh rate switching to low refresh rate). When HWC Commit 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 Commit the next frame image data to the display driver, it notifies the DSI to switch the value of MIPI clk to 30, and the DSI module can switch the value of MIPI clk to 30 according to the notification. In this way, the value of the screen refresh rate is switched to 30, and the value of MIPI clk is switched to 30, which can take effect within the same frame period, avoiding the problem of mura display caused by the mismatch between MIPI clk and the screen refresh rate.
[0260] The embodiment further provides a computer storage medium, which stores computer instructions. When the computer instructions run on an electronic device, the electronic device executes the related method steps to realize the display screen refresh rate switching method in the above embodiment.
[0261] The embodiment further provides a computer program product. When the computer program product runs on a computer, the computer executes the related steps to realize the display screen refresh rate switching method in the above embodiment.
[0262] In addition, the embodiment of the present application further provides an apparatus, which can be a chip, a component or a module. The apparatus can include a processor and a memory connected to each other. The memory is configured to store computer execution instructions. When the apparatus runs, the processor can execute the computer execution instructions stored in the memory, so that the chip executes the display screen refresh rate switching method in the above method embodiments.
[0263] The electronic device (such as a mobile phone), the computer storage medium, the computer program product or the chip provided in the embodiment can be used to execute the corresponding method provided above, and thus the beneficial effects thereof can refer to the beneficial effects of the corresponding method provided above, which will not be described herein again.
[0264] Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the division of the above functional modules is exemplified, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0265] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the apparatus embodiments described above are only illustrative, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed ones can be indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0266] The above description and the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of switching refresh rates of a display screen, characterized in that, The application is applied to an electronic device including a display screen, comprising: In response to a touch operation on the fingerprint unlocking area, a first interface is displayed, a refresh rate of the display screen is set to a first value, and a value of a target variable is set to a first value; the first interface includes a preset image; In a process of displaying the first interface, when an image synthesis frame rate of a SurfaceFlinger module is set to a second value, a value of a target configuration parameter is set to a first parameter value, and the first parameter value is used to indicate that the image synthesis frame rate is the second value; When the HWC module determines that the target variable is the first value, the value of the target configuration parameter is replaced with a second parameter value, and the second parameter value is used to indicate that the image synthesis frame rate is the first value.
2. The method of claim 1, wherein, When the refresh rate of the display screen remains the first value, a MIPI clk of the display screen is the first value.
3. The method of claim 1, wherein, Further comprising: After the first interface is stopped from being displayed, when the image synthesis frame rate of the SurfaceFlinger module is set to a third value, a 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.
4. The method of claim 1, wherein, The refresh rate of the display screen is set to a first value, comprising: The refresh rate of the display screen is switched from a fourth value to the first value; The method further comprises: In response to a lift operation on the fingerprint unlocking area, a second interface is displayed, and the refresh rate of the display screen is set to the fourth value.
5. The method of claim 1, wherein, Further comprising: In response to a touch operation on the fingerprint unlocking area, the value of the target variable is set to the first value; In response to a lift operation on 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.
6. An electronic device, comprising: Comprising: One or more processors; Memory; And one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer programs are executed by the one or more processors, the electronic device is caused to perform the display screen refresh rate switching method as claimed in any one of claims 1-5.
7. A computer readable storage medium comprising a computer program, characterized in that, When the computer programs run on the electronic device, the electronic device is caused to perform the display screen refresh rate switching method as claimed in any one of claims 1-5.
Citation Information
Patent Citations
Screen-on display method, electronic equipment and storage medium
CN117707406A