Display screen refresh method and related apparatus

By performing frame skipping when the display does not generate new image frames, the power consumption waste and screen flickering problems caused by repeated display refresh are solved, and normal display is maintained in a low power state.

WO2026056547A1PCT designated stage Publication Date: 2026-03-19HONOR DEVICE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2026-03-19

AI Technical Summary

Technical Problem

When the display screen of an electronic device does not generate image frames for a long time or the frame rate is lower than the refresh rate, it will result in power loss, and the display screen may repeatedly refresh the same image, resulting in wasted power and screen flickering.

Method used

When the display screen does not generate new image frames, the refresh action is avoided by frame skipping, and the image frames on the display screen are maintained until certain conditions are met before refreshing. These conditions include setting thresholds and reducing the refresh rate to ensure that the display screen does not remain unrefreshed for a long time.

Benefits of technology

It reduces power consumption of electronic devices, avoids screen flickering, maintains normal display quality, lowers power consumption, and preserves the performance of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025111119_19032026_PF_FP_ABST
    Figure CN2025111119_19032026_PF_FP_ABST
Patent Text Reader

Abstract

A display screen refresh method and a related apparatus, relating to the technical field of terminals. The method can be applied to an electronic device comprising a first application and a display screen. In the method, during display of a first image frame (0) on the display screen, the first application generates a second image frame (1); at a first moment, the electronic device can refresh and display the second image frame (1) on the display screen in response to a first Vsync signal; and if the first application does not generate an image frame between the first moment and a second moment, then at the second moment, the electronic device can skip executing a refresh operation on the display screen in response to a second Vsync signal, and maintain the display of the second image frame (1). In this way, when the electronic device does not generate an image frame, the power consumption loss caused by executing the refresh operation on the display screen can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

A refresh method of a display screen and related apparatus

[0001] The present application claims priority to the Chinese patent application No. 202411296681.0, filed on September 14, 2024, and titled "A refresh method of a display screen and related apparatus", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of terminal, and in particular, to a refresh method of a display screen and related apparatus. BACKGROUND

[0003] After the electronic device generates an image frame, the electronic device sends the image frame to the display screen. The display screen can refresh the display screen according to a refresh rate, so as to present a continuous and smooth display effect. For example, the display screen of the electronic device can refresh the display screen at a fixed refresh rate of 60 Hz, 90 Hz or 120 Hz.

[0004] However, the display screen of the electronic device may have a problem of large power consumption loss when refreshing the display screen. For example, if the electronic device does not generate an image frame for a long time or generates an image frame at a very low frame rate, the display screen of the electronic device may still display a repeated image after refreshing multiple times. For another example, if the electronic device continuously generates image frames, but the frame rate may be lower than the refresh rate, for example, when the electronic device plays a video, the video includes multiple continuous video frames (i.e., image frames), and the frame rate of the video is lower than the refresh rate of the electronic device, the display screen of the electronic device may display a new image after refreshing twice or more times. The above situations may cause power consumption loss of the electronic device. SUMMARY

[0005] To solve the above problems, the present application provides a refresh method of a display screen and related apparatus, which aims to reduce the power consumption loss of the electronic device.

[0006] In a first aspect, the present application provides a refresh method of a display screen. The method can be applied to an electronic device, for example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, etc. The electronic device can include a first application and a display screen. For example, the first application can be a video playing application, a social communication application, a consultation reading application, etc.

[0007] In the method, during the process that the display screen displays the first image frame, the first application can generate a second image frame; at a first time, the electronic device obtains a first Vsync signal, and then the electronic device can refresh the display screen to display the second image frame in response to the first Vsync signal; the first application does not generate an image frame from the first time to a second time, at the second time, the electronic device obtains a second Vsync signal, and then the electronic device can not perform a refresh action on the display screen in response to the second Vsync signal, and maintain the display of the second image frame, where the first time is later than the second time.

[0008] For example, a display period is between two continuous Vsync signals, in the display period 1, the display screen displays the first image frame, and the first application generates the second image frame; at the first time, the electronic device obtains the first Vsync signal, indicating that the display period 1 ends and the display period 2 starts, and the electronic device can refresh the display screen to display the second image frame generated by the first application in response to the first Vsync signal, in the display period 2, the display screen displays the second image frame, and the first application does not generate an image frame; at the second time, the electronic device obtains the second Vsync signal, indicating that the display period 2 ends and the display period 3 starts, in the display period 2 between the first time and the second time, the first application does not generate an image frame, and in the display period 3, the electronic device can not perform a refresh action on the display screen in response to the second Vsync signal, and maintain the display of the second image frame.

[0009] In this way, in the case that the first application does not generate an image frame, the display screen can not perform a refresh action, and still maintain the display of the last second image frame, so that the power loss caused by the display screen performing a refresh action and still displaying a repeated image frame can be avoided.

[0010] In a possible implementation, the refresh method of the display screen can further include: during the process that the display screen maintains the display of the second image frame, the first application generates a third image frame; at a third time, the electronic device obtains a third Vsync signal, and the electronic device can refresh the display screen to display the third image frame in response to the third Vsync signal.

[0011] For example, a display period is between two continuous Vsync signals, in the display period 3 after the second time, the display screen maintains the display of the second image frame. At the third time, the electronic device obtains the third Vsync signal, indicating that the display period 3 ends and the display period 4 starts, in the display period 3 between the second time and the third time, the first application generates the third image frame, and in the display period 4, the electronic device can perform a refresh action on the display screen in response to the third Vsync signal, and refresh the display of the third image frame.

[0012] In this way, in the case that the first application generates a third image frame which is a new image frame, the electronic device can normally perform the refreshing operation on the display screen to refresh and display the third image frame, thereby avoiding affecting the normal display of the new image frame.

[0013] In a possible implementation, the refreshing method of the display screen can further include: between the first time and the fourth time, the first application does not generate an image frame, at the fourth time, the electronic device obtains a fourth Vsync signal, and the electronic device can perform the refreshing operation on the display screen to refresh and display the second image frame in response to the fourth Vsync signal.

[0014] For example, a display period is between two continuous Vsync signals, in the third display period after the second time, the refreshing operation is not performed on the display screen, and the second image frame is maintained to be displayed. At the fourth time, the electronic device obtains a fourth Vsync signal, which indicates that the third display period ends and the fourth display period starts. In the third display period between the second time and the fourth time, the first application does not generate an image frame, and in the fourth display period, the electronic device performs the refreshing operation on the display screen to refresh and display the second image frame in response to the fourth Vsync signal.

[0015] In this way, in the case that the electronic device does not perform the refreshing operation on the display screen to maintain the display of the second image frame, and the first application continuously does not generate a new image frame, the electronic device can perform the refreshing operation on the display screen again to refresh and display the repeated second image frame, thereby avoiding the problem that the display screen is prone to flickering due to a long time without refreshing on the display screen, and the performance of the electronic device can be maintained.

[0016] In a possible implementation, between the first time and the fourth time, the first application does not generate an image frame, and the electronic device obtains N Vsync signals, where N is greater than 0, for example, N=1, at a second time between the first time and the fourth time, the electronic device obtains a second Vsync signal; for another example, N=2, at a second time between the first time and the fourth time, the electronic device obtains a second Vsync signal, and at a time between the second time and the fourth time, the electronic device can obtain another Vsync signal, and the electronic device can also not perform the refreshing operation on the display screen to maintain the display of the second image frame in response to the Vsync signal.

[0017] In this way, it is indicated that the electronic device can not perform the refreshing operation on the display screen once or multiple times to maintain the display of the second image frame, and then in the case that the first application continuously does not generate a new image frame, the electronic device can perform the refreshing operation on the display screen again to refresh and display the repeated second image frame, thereby further reducing power loss, and also avoiding the problem that the display screen is prone to flickering due to a long time without refreshing on the display screen.

[0018] In a possible implementation, before the electronic device refreshes the display screen to display the second image frame in response to the fourth Vsync signal, the refresh method of the display screen further includes: determining, by the electronic device, that the number of times that the display screen does not perform the refresh action reaches a first threshold, for example, determining that the number of times that the display screen consecutively does not perform the refresh action reaches the first threshold.

[0019] For example, the first threshold is 1, and the display period between two consecutive Vsync signals is one display period. In the display period 3 after the second time, no refresh action is performed on the display screen, and the second image frame is maintained. At the fourth time, the electronic device obtains the fourth Vsync signal, indicating that the display period 3 ends and the display period 4 starts. In the display period 3 between the second time and the fourth time, the first application does not generate an image frame, and the number of times that the display screen does not perform the refresh action reaches 1. In the display period 4, the electronic device can perform the refresh action on the display screen in response to the fourth Vsync signal, and refresh the display screen to display the second image frame.

[0020] For example, the first threshold is 1, and the display period between two consecutive Vsync signals is one display period. In the display period 3 after the second time, no refresh action is performed on the display screen, and the second image frame is maintained. At the fourth time, the electronic device obtains the fourth Vsync signal, indicating that the display period 3 ends and the display period 4 starts. In the display period 3 between the second time and the fourth time, the first application does not generate an image frame, and the number of times that the display screen does not perform the refresh action reaches 1. In the display period 4, the electronic device can perform the refresh action on the display screen in response to the fourth Vsync signal, and refresh the display screen to display the second image frame.

[0021] For example, the first threshold is 2, and the display period between two consecutive Vsync signals is one display period. In the display period 3 after the second time, no refresh action is performed on the display screen, and the second image frame is maintained. In the display period 4 after the display period 3, no refresh action is performed on the display screen, and the second image frame is maintained. At the fourth time, the electronic device obtains the fourth Vsync signal, indicating that the display period 4 ends and the display period 5 starts. In the display period 3 and the display period 4 between the second time and the fourth time, the first application does not generate an image frame, and the number of times that the display screen consecutively does not perform the refresh action reaches 2. In the display period 5, the electronic device can perform the refresh action on the display screen in response to the fourth Vsync signal, and refresh the display screen to display the second image frame.

[0022] In this way, the number of times that the display screen does not perform the refresh action can be limited based on the first threshold, and the problem that the display screen is prone to flickering due to a long time of no refresh on the display screen can be avoided more accurately, and the performance of the electronic device can be maintained.

[0023] In a possible implementation, during a first period between the first time and the second time, the first period being a display period, the display screen continuously displays the second image frame, and the refresh method of the display screen further includes: between the first time and the fifth time, the first application does not generate an image frame, at the fifth time, the electronic device obtains a fifth Vsync signal, and the electronic device can refresh and display the second image frame on the display screen in response to the fifth Vsync signal; at the sixth time, the electronic device obtains a sixth Vsync signal; during a second period between the fifth time and the sixth time, the second period being a display period, the display screen continuously displays the second image frame; and a length of the first period is less than a length of the second period, indicating that a refresh frequency of the electronic device on the display screen is lowered, and a refresh rate is reduced.

[0024] In this way, in a case where the electronic device does not perform a refresh operation on the display screen to maintain display of the second image frame, and the first application continuously does not generate a new image frame, the electronic device can perform a refresh operation on the display screen again, refresh and display the repeated second image frame, and reduce the refresh rate, so that the electronic device continuously displays the second image frame for a longer time between the fifth time and the sixth time, and power consumption of the electronic device can be reduced.

[0025] In a possible implementation, between the first time and the fifth time, the first application does not generate an image frame, and the electronic device obtains L Vsync signals, L being greater than 0, for example, L=2, at a second time between the first time and the fifth time, the electronic device obtains a second Vsync signal, at an instant between the second time and the fifth time, the electronic device can obtain another Vsync signal, and the electronic device can refresh and display the second image frame on the display screen for a longer time between the sixth time and the arrival of the Vsync signal in response to the Vsync signal.

[0026] In this way, in a case where the first application continuously does not generate a new image frame, the electronic device can reduce the refresh rate, continuously display the second image frame for a longer time between the fifth time and the sixth time, and power consumption of the electronic device can be reduced.

[0027] In a possible implementation, before the electronic device refreshes and displays the second image frame on the display screen in response to the fifth Vsync signal, the refresh method of the display screen further includes: determining that a number of display periods in which the first application continuously does not generate an image frame reaches a second threshold, the display period referring to a length of time between two Vsync signals obtained by the electronic device continuously.

[0028] For example, the electronic device obtains two Vsync signals at time 1 and time 2 respectively, and the electronic device does not obtain any Vsync signal between time 1 and time 2, and the display period is between time 1 and time 2.

[0029] Exemplarily, the second threshold value is 3, the first application does not generate image frames for three continuous display periods, the electronic device obtains the fifth Vsync signal, indicating that the third display period in the three continuous display periods ends and enters the next display period, and the electronic device can refresh and display the second image frame on the display screen in response to the fifth Vsync signal.

[0030] In this way, when the number of display periods in which the first application does not generate image frames continuously reaches the second threshold value, the electronic device can be considered to be in low power consumption, the refresh rate of the display screen is reduced, and the power consumption of the electronic device is further reduced.

[0031] In a possible implementation, the refresh method of the display screen further includes: at a seventh time, the electronic device obtains a seventh Vsync signal, the electronic device determines, in response to the seventh Vsync signal, that the first application does not generate image frames between the second time and the seventh time, indicating that no new image frame is generated after the second image frame; the electronic device determines that the number of display periods in which the first application does not generate image frames continuously does not reach the second threshold value, the display period refers to the time length between two Vsync signals obtained by the electronic device continuously, indicating that the electronic device can not need to reduce the refresh rate; and the electronic device determines that the number of times that the display screen does not perform the refresh action does not reach the first threshold value, indicating that the display screen can not perform the refresh action. Subsequently, the electronic device does not perform the refresh action on the display screen, and the second image frame is maintained to be displayed

[0032] In this way, when it is determined that the first application does not generate image frames, it is determined that the electronic device does not need to reduce the refresh rate, and it is determined that the display screen can not perform the refresh action, the electronic device does not perform the refresh action on the display screen, and the second image frame is maintained to be displayed, which can avoid affecting the normal display of the image frame, and can avoid the problem of flashing screen and the like caused by the electronic device not performing the refresh action on the display screen for a long time.

[0033] In a possible implementation, the refresh method of the display screen further includes: at the eighth time, the electronic device obtains an eighth Vsync signal, and the electronic device, in response to the eighth Vsync signal, indicates that there is a new image frame to be displayed in a case where it is determined that the first application generates an image frame between the second time and the eighth time; or the electronic device determines that the number of display periods in which the first application continuously does not generate an image frame reaches a second threshold value, the display period refers to a time length between two Vsync signals obtained by the electronic device continuously, and it can be considered that the electronic device is in a low-power-consumption state, and the refresh rate can be reduced; or the electronic device determines that the number of times that the display screen does not perform a refresh action reaches a first threshold value. In any of the above three conditions, the electronic device refreshes and displays an image frame on the display screen. In the first condition, the electronic device can refresh and display the latest image frame generated by the first application on the display screen, and in the second condition or the third condition, the electronic device can refresh and display the second image frame on the display screen.

[0034] In this way, in a case where it is determined that the first application generates an image frame, or it is determined that the electronic device will reduce the refresh rate, or it is determined that the number of times that the display screen does not perform a refresh action reaches the first threshold value, the electronic device performs a refresh action on the display screen to display an image frame, which can display the newly generated image frame of the first application on the one hand, and avoid the problem of screen flickering caused by the fact that the electronic device does not perform a refresh action on the display screen for a long time on the other hand.

[0035] In a possible implementation, the refresh method of the display screen further includes: calculating the first threshold value based on a ratio of the refresh rate of the second image frame to the lowest refresh rate. For example, the first threshold value is obtained based on the ratio of the refresh rate of the second image frame to the lowest refresh rate minus 1. In this way, the first threshold value is calculated by considering the refresh rate of the second image frame displayed on the display screen, which can avoid the problem that the number of times that the display screen does not perform a refresh action is too large, the refresh rate of the electronic device is lower than the latest refresh rate, and the electronic device has the problem of screen flickering.

[0036] In a possible implementation, the refresh method of the display screen further includes: calculating the first threshold value based on a ratio of the refresh rate of the second image frame to the lowest refresh rate. For example, the first threshold value is obtained based on the ratio of the refresh rate of the second image frame to the lowest refresh rate minus 1. In this way, the first threshold value is calculated by considering the refresh rate of the second image frame displayed on the display screen, which can avoid the problem that the number of times that the display screen does not perform a refresh action is too large, the refresh rate of the electronic device is lower than the latest refresh rate, and the electronic device has the problem of screen flickering.

[0037] In a possible implementation, the refresh method of the display screen further includes: calculating the first threshold value based on a ratio of the refresh rate of the second image frame to the lowest refresh rate. For example, the first threshold value is obtained based on the ratio of the refresh rate of the second image frame to the lowest refresh rate minus 1. In this way, the first threshold value is calculated by considering the refresh rate of the second image frame displayed on the display screen, which can avoid the problem that the number of times that the display screen does not perform a refresh action is too large, the refresh rate of the electronic device is lower than the latest refresh rate, and the electronic device has the problem of screen flickering.

[0038] In a fourth aspect, the present application provides a computer program product, which comprises computer program codes, and when the computer program codes are executed by an electronic device, the display screen refresh method of the first aspect is implemented. BRIEF DESCRIPTION OF DRAWINGS

[0039] FIG. 1 is a schematic diagram of a display screen refresh method provided in the related art;

[0040] FIG. 2 is a schematic diagram of another display screen refresh method provided in the related art;

[0041] FIG. 3a is a signaling interaction diagram of a display screen refresh method provided in an embodiment of the present application;

[0042] FIG. 3b is a software architecture diagram of an electronic device provided in an embodiment of the present application;

[0043] FIG. 4 is a schematic diagram of a refresh rate provided in an embodiment of the present application;

[0044] FIG. 5 is a schematic diagram of image frame display provided in an embodiment of the present application;

[0045] FIG. 6 is a signaling interaction diagram of another display screen refresh method provided in an embodiment of the present application;

[0046] FIG. 7 is a schematic diagram of a display screen refresh method provided in an embodiment of the present application;

[0047] FIG. 8 is a schematic diagram of the judgment logic of a display screen refresh method provided in an embodiment of the present application;

[0048] FIG. 9 is a schematic diagram of the judgment logic of another display screen refresh method provided in an embodiment of the present application;

[0049] FIG. 10 is a signaling interaction diagram of another display screen refresh method provided in an embodiment of the present application;

[0050] FIG. 11 is a schematic diagram of another display screen refresh method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the following embodiments clear and concise, first, the glossary involved in the embodiments of the present application is explained. It should be understood that the explanation is for a clearer understanding of the embodiments of the present application, and does not necessarily constitute a limitation on the embodiments of the present application.

[0052] Refresh rate: refers to the number of image frames refreshed per second by the display screen of an electronic device, for example, the refresh rate of an electronic device is 60Hz, which means that the display screen of the electronic device can refresh and display 60 image frames per second.

[0053] Frame rate: refers to the number of image frames that the electronic device can generate and send to the display per second. For example, the video playback application of the electronic device plays a video with a frame rate of 30 fps, which means that the electronic device can send 30 video frames of the video to the display screen in 1 second, and the display screen of the electronic device can display these 30 video frames in 1 second.

[0054] Vsync (Vertical Synchronization) signal: refers to a synchronization pulse signal sent by the electronic device before the display screen of the electronic device refreshes a frame of image. In some embodiments, the electronic device can send a Vsync signal based on the refresh rate, for example, the refresh rate of the electronic device is 60 Hz, and the electronic device can send 60 Vsync signals per second.

[0055] Display period: refers to the time length during which the display screen of the electronic device displays between the time points corresponding to two consecutive Vsync signals received by the electronic device.

[0056] In the related art, the refresh rate of the electronic device can be the same as the frame rate, and the display screen of the electronic device can display a new image frame based on the refresh rate, which can provide a smoother visual experience. However, the frame rate of the electronic device can be lower than the refresh rate.

[0057] In scenarios such as the electronic device being in a static desktop, an application interface of an e-book application, an application interface of a browser application, and the like, the display screen of the electronic device can display static pictures for a long time, that is, display repeated image frames for a long time, and the electronic device does not generate new image frames for a long time or generates image frames at a very low frame rate.

[0058] As shown in FIG. 1, the electronic device displays image frame 0 in the first display period, and the electronic device can generate image frame 1 in the first display period. The process of generating image frame 1 includes that the GPU of the electronic device can first render each layer of image frame 1, and the CPU of the electronic device can then synthesize each layer of image frame 1 to obtain image frame 1. The electronic device receives a Vsync signal and enters the second display period, and the display screen LCD refreshes and displays image frame 1. Similarly, the electronic device can generate image frame 2 in the second display period, and the electronic device can display image frame 2 in the third display period. After the third display period, no new image frame is generated, and the display screen of the electronic device refreshes and repeatedly displays image frame 2 based on the pre-set refresh rate.

[0059] Based on the above-mentioned scenario, it is shown that the display screen of the electronic device refreshes the display picture based on the refresh rate, and the repeated picture may be displayed after refreshing multiple times. For the same image frame, the display screen is refreshed multiple times, resulting in unnecessary power consumption of the electronic device and power loss.

[0060] When the electronic device is in a scenario of playing a video, the display screen of the electronic device will continuously update the picture and display a new image frame. However, the frame rate of the video may be less than the refresh rate, resulting in that the repeated picture is displayed after the display screen is refreshed.

[0061] As shown in FIG. 2, for example, the frame rate of the video is 30 fps, and the refresh rate of the electronic device is 60 Hz. The electronic device displays the image frame 0 in the first display period, and the electronic device can generate the image frame 1 in the first display period. The electronic device receives the Vsync signal and can enter the second display period, and the display screen can refresh and display the image frame 1. The electronic device can generate the image frame 2 in the second display period. The electronic device receives the Vsync signal and can enter the third display period, and the display screen can refresh and display the image frame 2. The electronic device does not generate a new image frame in the third display period. The electronic device receives the Vsync signal and can enter the fourth display period, and the display screen will refresh and display the repeated image frame 2. The electronic device can generate the image frame 3 in the fourth display period. In this way, the electronic device displays the same picture twice for the same image frame in the subsequent display period.

[0062] Based on the above-mentioned scenario, it is shown that the display screen of the electronic device refreshes the display picture based on the refresh rate, and the repeated picture may be displayed after refreshing two times or even multiple times. For the same image frame, the display screen is refreshed twice or even multiple times, also resulting in unnecessary power consumption of the electronic device and power loss.

[0063] Therefore, in order to solve the above problems, the embodiments of the present application provide a display screen refresh method. When the electronic device does not generate a new image frame in the last display period, the electronic device can not refresh and display the repeated image frame on the display screen in the current display period, which is also called performing a frame skipping operation, thereby reducing power loss.

[0064] First, the refresh rate mode of the electronic device is introduced, including an idle mode and an adaptive refresh rate mode provided by the embodiments of the present application.

[0065] In the adaptive refresh rate mode, the display screen of the electronic device can refresh the display image frame based on the preset refresh rate when a new image frame is generated in each display period of the electronic device, and the display screen can not refresh the display, that is, perform the frame skipping operation when no new image frame is generated in the display period of the electronic device. In the first embodiment shown in FIG. 3a, the adaptive refresh rate flag is True or 1, indicating that the electronic device is in the adaptive refresh rate mode.

[0066] In the idle mode, the display screen will refresh the repeated image frame based on the refresh rate when no new image frame is generated in the display period of the electronic device, and the frame skipping operation cannot be performed. In the third embodiment shown in FIG. 10, the adaptive refresh rate flag is False or 0, indicating that the electronic device is in the idle mode.

[0067] It should be noted that the idle mode flag can be False, indicating that the electronic device is in the adaptive refresh rate mode, and the idle mode flag can be True, indicating that the electronic device is in the idle mode, which is not limited in the present application.

[0068] Next, the refresh method of the display screen provided in the embodiments of the present application will be described in detail in combination with FIGS. 3a-11.

[0069] Embodiment one:

[0070] In the following, the refresh method of the display screen in the current display period is introduced by taking the electronic device in the adaptive refresh rate mode and the electronic device generating a new image frame in the last display period as an example.

[0071] As shown in FIG. 3b, taking the operating system of the electronic device as an Android system as an example. The Android system can adopt a layered architecture, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the system is divided into five layers, from top to bottom, the application program (Application, APP) layer, the application program framework layer (also referred to as the native framework layer), the hardware abstraction layer (Hardware Abstraction Layer, HAL), the driver layer (also referred to as the kernel layer), and the hardware layer. It should be noted that the mobile phone can also run an iOS operating system, which is not limited in the present application.

[0072] In some embodiments, the application layer includes the first application, the Native layer includes a display engine service SurfaceFlinger, the HAL layer includes a compositor Hardware Composer (HWC for short), the Kernel layer includes a display driver, and the hardware layer includes the display screen.

[0073] As shown in FIG. 3a, in combination with the software structure of the electronic device shown in FIG. 3b, the refresh method of the display screen can include the following steps:

[0074] S301: The first application stores image data in a rendering buffer.

[0075] The image data is used to describe the attributes of an image frame to be generated, such as pixel values, colors, transparency, and the like. The rendering buffer is used to temporarily store the image data.

[0076] In some embodiments, the image data can be drawn by the first application. For example, the first application is a social communication application, a gallery application, a consultation reading application, and the like. The first application can draw image data of an application interface. For example, the consultation reading application can draw text of an electronic book in response to a user's viewing operation on the electronic book. For another example, the social communication application can draw pinyin characters and emoticons in response to a user's triggering operation on a chat box.

[0077] In some embodiments, the image data can also be decoded by the first application. For example, the first application can be a video playback application. The video playback application can decode a video to obtain image data in response to a user's playing operation on the video.

[0078] S302: The SurfaceFlinger reads the image data from the rendering buffer.

[0079] In some embodiments, the SurfaceFlinger can read the image data from the rendering buffer for rendering based on a refresh rate. For example, the refresh rate is 60 Hz. The SurfaceFlinger can read the image data from the rendering buffer for rendering 60 times within 1 second, i.e., once every 16.7 ms.

[0080] The mipi driver can send an APP_Vsync signal to the SurfaceFlinger based on the refresh rate. For example, the refresh rate is 60 Hz. The mipi driver can send an APP_Vsync signal to the SurfaceFlinger once every 16.7 ms. The SurfaceFlinger can read the image data from the rendering buffer for rendering in response to the APP_Vsync signal.

[0081] As shown in FIG. 3b, the mipi driver, which can also be referred to as a Display Serial Interface (DSI) driver, the display driver includes the DSI driver, the DSI driver can call the DSI interface of the hardware layer to send an APP_Vsync signal to the SurfaceFlinger.

[0082] S303: The SurfaceFlinger renders a plurality of layers based on the image data.

[0083] In some embodiments, the SurfaceFlinger can call a Graphics Processing Unit (GPU) to render a plurality of layers based on the image data.

[0084] Exemplarily, taking a first application as a video playing application as an example, the plurality of layers can include a video frame, a progress bar, a comment area, and the like.

[0085] It should be noted that the SurfaceFlinger rendering a plurality of layers based on the image data is only an example, and the SurfaceFlinger can also render one layer based on the image data, which is not limited in the present application.

[0086] S304: The SurfaceFlinger calls the HWC to synthesize the plurality of layers to obtain an image frame.

[0087] In some embodiments, the SurfaceFlinger can also call the HWC to synthesize the plurality of layers to obtain an image frame based on a refresh rate.

[0088] For example, the mipi driver can send an SF_Vsync signal to the SurfaceFlinger based on the refresh rate, for example, the refresh rate is 60Hz, the mipi driver can send an SF_Vsync signal to the SurfaceFlinger once every 16.7ms, and the SurfaceFlinger can call the HWC to synthesize the plurality of layers to obtain an image frame in response to the APP_Vsync signal.

[0089] As shown in FIG. 3b, the DSI driver can call the DSI interface of the hardware layer to send an SF_Vsync signal to the SurfaceFlinger.

[0090] S305: The SurfaceFlinger sends a commit to the display driver through the HWC.

[0091] The commit is used to indicate that the display driver has a new image frame synthesized.

[0092] In some embodiments, the commit can carry a preset refresh rate, for example, a refresh rate of displaying a video frame.

[0093] S306: In response to the commit, the display driver updates the composition flag bit to 1 and the idle flag bit to 0.

[0094] The composition flag bit is used to indicate the composition state of the image frame, for example, the composition flag bit being 1 indicates that there is a new image frame being composed, and the composition flag bit being 0 indicates that there is no new image frame being composed.

[0095] It should be noted that the composition flag bit being 1 or 0 is only an example, and can be other values, as long as it can distinguish whether there is a new image frame being composed.

[0096] The commit is sent by the surfaceFlinger to the display driver through the HWC after the image frame is composed, so the display driver can update the composition flag bit to 1 in response to the commit.

[0097] Idle means that the electronic device is in a low-power state, for example, the electronic device does not generate a new image frame for a long time, or generates a new image frame at a very low frame rate.

[0098] To solve this problem, when the electronic device is in idle, the electronic device can enter the idle mode and reduce the refresh rate, which can also be called pulling down the refresh rate.

[0099] The idle flag bit is used to count the display period without generating a new image frame. The idle flag bit being equal to M indicates that the electronic device has not generated a new image frame for M-1 consecutive display periods (which can also be called the number of consecutive display periods without generating an image frame reaching a second threshold), and it can be considered that the electronic device is in a low-power state, and the electronic device will enter the idle mode. The idle flag bit being less than M indicates that the electronic device will not enter the idle mode. M can be any value greater than 1 preset.

[0100] The display driver receives the commit, indicating that a new image frame is generated, and the electronic device does not need to enter the idle mode, so the idle flag bit can be re-counted, and the display driver can update it to 0.

[0101] It should be noted that the display driver updates the idle flag bit to 0 in response to the commit is only an example, and it can also be updated to other values, which can indicate that the display period in which the electronic device does not receive the commit is re-counted.

[0102] The introduction of the idle mode can be referred to the detailed introduction of Embodiment Three below, which is not expanded here.

[0103] S307: SurfaceFlinger stores the image frame in the display buffer.

[0104] The rendering buffer is used to temporarily store the image frame.

[0105] SurfaceFlinger stores the synthesized image frame in the display buffer through HWC.

[0106] It should be noted that when SurfaceFlinger renders a layer based on image data, SurfaceFlinger can also call HWC to store the image frame in the display buffer without performing S304.

[0107] S308: The display driver reads the image frame synthesized by HWC from the display buffer.

[0108] In some embodiments, the display driver can read the image frame in response to the commit. Accordingly, S307 can be performed before S305.

[0109] S309: The display driver receives a Vsync signal.

[0110] In some embodiments, S301-S308 described above can be performed in the last display period, and the display driver receives the Vsync signal, indicating that the last display period ends and the current display period will be entered.

[0111] In combination with FIG. 1, for example, the electronic device generates a new image frame 2 in the second display period, and after receiving the Vsync signal, it indicates that the second display period ends and the third display period will be entered.

[0112] In some embodiments, the mipi driver can send the Vsync signal to the display driver based on the refresh rate, for example, the refresh rate is 120Hz, and the mipi driver can send the Vsync signal to the display driver every 8.3ms.

[0113] As shown in FIG. 3b, the mipi driver can call the DSI interface of the hardware layer to send the Vsync signal to the display driver.

[0114] The Vsync signal, the APP_Vsync signal and the SF_Vsync signal introduced above are all sent based on the refresh rate, but there are some differences in the phase. For example, after the mipi driver sends the APP_Vsync signal to the SurfaceFlinger, it sends the SF_Vsync signal to the SurfaceFlinger again after 2ms, and the display driver sends the Vsync signal to the display driver again after 2ms.

[0115] S310: The display driver increments the idle flag bit by 1 in response to the Vsync signal.

[0116] Based on the introduction of S306 above, the idle flag bit is used to count the display period in which no new image frame is generated. After receiving the Vsync signal, the display driver can increment the idle flag bit by 1. When the idle flag bit is 1, it indicates that a new image frame is generated in the last period, and the idle mode does not need to be entered in the next period.

[0117] It should be noted that the idle flag bit is incremented by 1, which is only an example. Other values can also be added, as long as the counting can be achieved.

[0118] S311: The display driver determines whether the idle flag bit is equal to M, otherwise S312 is executed.

[0119] Based on the introduction of S310, the idle flag bit is 1, and M is a value greater than 1. Therefore, the display driver can determine that the idle flag bit is not equal to M, and S312 can be continued.

[0120] It should be noted that the example in which the idle flag bit is equal to M can be referred to the description of Embodiment Three below.

[0121] It should be emphasized that S311 is an optional execution step, which can not be executed when the composition flag bit is 1.

[0122] S312: The display driver determines that the composition flag bit is 1, and sends the image frame and the clock signal to the display screen.

[0123] It should be understood that the time at which the display driver sends the image frame is usually fixed. In the remaining time of a display period, the display driver can send the clock signal to the display screen to fill the display period. The clock signal has the same number of rows and columns as the resolution of the image frame. The clock signal is non-display data, and the display screen does not need to respond to the display after receiving the clock signal.

[0124] As shown in FIG. 4, the time at which the display driver sends the image frame to the display screen is fixed, for example, 7 ms. The refresh rate of the electronic device is 120 Hz, and the time length of a display period is about 8.3 ms. The remaining 1.3 ms is used by the display driver to send the clock signal to the display screen. The refresh rate of the electronic device is 60 Hz, and the time length of a display period is about 16.7 ms. The remaining 9.7 ms is used by the display driver to send the clock signal to the display screen. The refresh rate of the electronic device is 30 Hz, and the time length of a display period is about 26.7 ms. The remaining 19.7 ms is used by the display driver to send the clock signal to the display screen.

[0125] Based on the introduction of S306, the composition flag is updated to 1, indicating that a new image frame is generated in the last display period, and the current display period can display the new image frame, so the display driver can send the image frame and the clock signal to the display screen based on the pre-set refresh rate.

[0126] S313: The display screen refreshes the display picture based on the pre-set refresh rate in response to receiving the image frame and the clock signal.

[0127] The display screen receives the image frame and can refresh the display picture based on the pre-set refresh rate to show the user the content corresponding to the image frame.

[0128] S314: The display driver updates the composition flag to 0.

[0129] The new image frame has been sent to the display screen, and in the case where there is no newly generated image frame, the display driver can reset the composition flag and update it to 0.

[0130] In combination with FIG. 3b, the HWC can include a commit module, and the SurfaceFlinger can send a commit to the display driver through the commit module, that is, execute S305 described above. The display driver includes a judgment driver and a DSI driver, the judgment driver can execute S306, S308, S310-S312, S314 described above, and the DSI driver can execute S309 described above.

[0131] In combination with FIG. 5, the electronic device includes an AP (indicating a part of the electronic device other than the display screen) and a module (including the display screen panel), and the DSI can send an APP_Vsync signal, render a layer, send an SF_Vsync signal to synthesize an image frame, and then the DSI interface can send the image frame to the panel. For details, please refer to Embodiment I, which will not be repeated here.

[0132] In addition, it should be understood that in the embodiments of the present application, the electronic device can not generate a new image frame in a display period, and the display screen can not refresh in the next display period to perform frame skipping to reduce power loss (for details, please refer to Embodiment II). However, assuming that the electronic device does not generate a new image in a plurality of consecutive display periods, continuous frame skipping can easily cause the display screen to appear flashing and other problems, so a frame skipping number can be pre-set to avoid excessive frame skipping of the display screen.

[0133] Therefore, in order to solve the problem, the display driver can calculate the number of times of frame skipping. In some embodiments, the number of times of frame skipping can be calculated based on the current refresh rate of the electronic device (which can also be referred to as the refresh rate of the second image frame, i.e., the refresh rate of the newly generated image frame of the first application) and the minimum refresh rate. In the display period in which a new image frame is generated, the display driver can determine the current refresh rate based on the refresh rate carried by the commit, and in the display period in which a new image frame is not generated, the display driver can determine the current refresh rate based on the refresh rate carried by the commit in the previous display period, and the number of times of frame skipping is the integer part of the ratio of the current refresh rate to the minimum refresh rate minus 1.

[0134] For example, the current refresh rate is 120Hz, and the minimum refresh rate is 30Hz, and the number of times of frame skipping is calculated to be 3; the current refresh rate is 60Hz, and the minimum refresh rate is 30Hz, and the number of times of frame skipping is calculated to be 1; the current refresh rate is 40Hz, and the minimum refresh rate is 30Hz, and the number of times of frame skipping is calculated to be 0.

[0135] In some embodiments, the display driver can calculate the number of times of frame skipping once after receiving a Vsync signal, i.e., the number of times of frame skipping can be calculated once in each display period, which is not limited in the present application.

[0136] In the embodiments of the present application, considering that the number of times of frame skipping is related to the current refresh rate, the display driver can calculate the number of times of frame skipping once after obtaining the refresh rate carried by a commit, for use in the display period in which frame skipping will be performed. For example, the number of times of frame skipping can be calculated after performing S312, which is not limited in the present application. The number of times of frame skipping can also be calculated once in each display period, or the number of times of frame skipping can be calculated in the display period in which a new image frame is not generated.

[0137] In this way, when the electronic device is in the adaptive refresh rate mode and a new image frame is generated, the electronic device can normally display the new image frame, thereby avoiding affecting the normal display of the new image frame.

[0138] It should be noted that, in the process of performing S312, even if the number of times of frame skipping is greater than 0, the electronic device will refresh the display screen when the synthesis flag bit is 1, i.e., when the first application generates a new image frame, which means that the display screen is refreshed to display the picture corresponding to the new image frame (which can also be referred to as displaying the image frame), which can be seen from the related description of FIG. 7 in Embodiment 2.

[0139] Embodiment 2

[0140] The following describes a refresh method of the display screen in the current display period and the next display period, with the electronic device in the adaptive refresh rate mode, the electronic device not generating a new image frame in the previous display period, the current display period and the next display period, normally displaying the image frame in the previous display period, and the number of times of frame skipping being 1.

[0141] As shown in FIG. 6, in combination with the software structure of the electronic device shown in FIG. 3b, the refresh method of the display screen can include the following steps.

[0142] S601: The display driver receives the Vsync signal.

[0143] The electronic device does not generate a new image frame in the previous display period, and the display driver receives the Vsync signal, indicating that the previous display period ends and the current display period starts.

[0144] In combination with FIG. 7, for example, the previous display period of the second embodiment is the third display period, in the second display period, the first application generates the image frame 2 (also referred to as the second image frame), the display screen displays the image frame 1 (also referred to as the first image frame), and then at the end of the second display period, the display driver receives the Vsync signal (also referred to as the electronic device obtains the first Vsync signal at the first time), indicating that the third display period starts, and the electronic device can refresh and display the image frame 2 on the display screen. In the third display period, the electronic device does not generate a new image frame (also referred to as the first application does not generate an image frame between the first time and the second time), and displays the image frame 2 on the display screen. After the display driver receives the Vsync signal at the end of the third display period (that is, S601 is performed, also referred to as at the second time, the electronic device obtains the second Vsync signal), it indicates that the third display period ends and the fourth display period starts.

[0145] It should be noted that other implementation manners of S601 can refer to the description of S309 of the first embodiment, which will not be described here.

[0146] S602: The display driver increments the idle flag bit by 1 in response to the Vsync signal.

[0147] S603: The display driver determines whether the idle flag bit is equal to M, and if not, performs S604.

[0148] It should be noted that the implementation manners of S602-S603 can refer to the description of S309-S310 of the first embodiment, which will not be described here.

[0149] With reference to FIG. 7, assuming that M is equal to 5, the last display period of the second embodiment is the third display period, the electronic device generates a new image frame 2 in the second display period, the idle flag bit is updated to 1 at the end of the second display period based on the received Vsync signal, the electronic device does not generate a new image frame in the third display period, indicating that no commit is received in the third display period, the idle flag bit is still 1 and is not set to 0, at the end of the third display period, the idle flag bit + 1 is equal to 2 based on the received Vsync signal, in the fourth display period, the display driver can determine that the idle flag bit is not equal to M, and the fourth display period does not need to enter the idle mode.

[0150] S604: The display driver determines that the composition flag bit is not 1, the number of skipped frames is not 0, and the flag bit of the adaptive refresh rate is True, and sends the clock signal to the display screen.

[0151] In some embodiments, the number of skipped frames can be calculated based on the current refresh rate and the minimum refresh rate, which can be referred to the introduction of the number of skipped frames in the first embodiment. In the last display period, no new image frame is generated, and the number of skipped frames calculated based on the display period in which the last new image frame is generated can be used for determination.

[0152] With reference to FIG. 7, the last display period of the second embodiment is the third display period, the electronic device generates a new image frame 2 in the second display period, and the number of skipped frames is calculated to be 1. The electronic device does not generate a new image frame in the third display period, indicating that no commit is received in the third display period. In the fourth display period, the current refresh rate can be obtained in the second display period, and the number of skipped frames is still 1.

[0153] In the second embodiment, no new image frame is generated in the last display period, the composition flag bit is not 1 in the current display period, the number of skipped frames is 1 and is not 0, the next display period does not enter the idle mode, the flag bit of the adaptive refresh rate is still True, indicating that the electronic device is in the adaptive refresh rate mode and can skip frames, so the display driver can send the clock signal to the display screen without sending the repeated image frame to the display screen.

[0154] S605: The display screen receives the clock signal.

[0155] The display screen does not receive an image frame in the current display period and only receives the clock signal, and can not refresh and does not perform a display response. Based on the example of FIG. 7 of S601, the electronic device does not perform a refresh action on the display screen in response to the second Vsync signal, and maintains the display of the second image frame.

[0156] Exemplarily, after receiving the clock signal, the display screen can ignore the clock signal and not respond, or can detect errors in the data transmission process by using the clock signal and take corresponding measures for recovery, which is not limited in the application.

[0157] In this way, in a case where the electronic device is in the adaptive refresh rate mode, no new image frame is generated, and the number of times of frame skipping is not 0, the display screen of the electronic device can not refresh the display, and the power consumption of the electronic device can be reduced.

[0158] S606: The display driver decrements the number of times of frame skipping by 1.

[0159] In the second embodiment, the number of times of frame skipping is 1, and after the display screen skips a frame, the display driver can decrement the number of times of frame skipping by 1 to obtain 0.

[0160] S607: The display driver receives the Vsync signal.

[0161] The electronic device also does not generate a new image frame in the current display period, and the display driver receives the Vsync signal, indicating that the current display period ends and the next display period will be entered.

[0162] Based on the example of S601, combined with FIG. 7, for example, the current display period of the second embodiment is the fourth display period, and the electronic device also does not generate a new image frame in the fourth display period. The display screen still displays the image frame 2 in the fourth display period, but the display screen is not refreshed and is an empty frame. Subsequently, after receiving the Vsync signal, it is indicated that the fourth display period ends and the fifth display period will be entered.

[0163] It should be noted that other implementation manners of S607 can refer to the introduction of S309 of the first embodiment, which will not be described here.

[0164] S608: The display driver increments the idle flag bit by 1 in response to the Vsync signal.

[0165] S609: The display driver determines whether the idle flag bit is equal to M, and otherwise, S609 is executed.

[0166] Based on the example of S603, combined with FIG. 7, it is assumed that M is equal to 5, the idle flag bit +1 is equal to 2 (see S602 described above) based on the received Vsync signal at the end of the third display period, no new image frame is generated in the fourth display period, and the idle flag bit +1 is equal to 3 (see S608 described above) based on the received Vsync signal at the end of the fourth display period. The display driver can determine that the idle flag bit is not equal to M, and the fifth display period does not need to enter the idle mode.

[0167] S610: The display driver determines that the number of times of frame skipping is 0, and sends the repeated image frame and the clock signal to the display screen.

[0168] In the current display period, the display screen has been frame skipped so that the number of times of frame skipping becomes 0, in the next display period, the display driver can determine that the number of times of frame skipping is 0 (also can be referred to as the number of times of the refresh action performed by the display screen reaches a first threshold value, the value of the number of times of frame skipping is the first threshold value), indicating that the display screen does not perform frame skipping in the next display period, and thus the image frame displayed in the last display period is sent to the display screen as the repeated image frame and the clock signal.

[0169] S611: The display screen refreshes the repeated image frame based on the pre-set refresh rate in response to receiving the repeated image frame and the clock signal.

[0170] As shown in FIG. 7, it is assumed that the next display period of the second embodiment is the fifth display period (also can be referred to as the end time of the fourth display period is the fourth time, and the display driver receives the fourth Vsync signal), in the fifth display period, the display screen also displays the image frame 2 (also can be referred to as the second image frame), but the image frame 2 is repeatedly sent to the display screen, and the display screen refreshes the repeated image frame 2 based on the pre-set refresh rate.

[0171] In addition, in some embodiments, after the display screen refreshes the repeated image frame, the number of times of frame skipping can be calculated again, because a new image frame has not been generated, it indicates that the current refresh rate is unchanged (can be referred to as the introduction of S604), and the number of times of frame skipping can be calculated to be still 1.

[0172] Continuing to refer to FIG. 7, for example, the next display period of the second embodiment is the fifth display period, in the fifth display period, the display screen refreshes the repeated image frame 2, and in the fifth display period, no image frame is generated, S601-605 can be repeatedly executed, the synthesis flag bit is 0, the sixth display period does not enter the idle mode, and the number of times of frame skipping is not 0, and thus in the sixth display period, the display screen only receives the clock signal, and the display screen does not refresh.

[0173] Continuing to refer to FIG. 7, in the sixth display period, the image frame 2 (also can be referred to as the second image frame) is displayed on the display screen, the first application can generate the image frame 3 (can be referred to as the third image frame), that is, at the end time of the sixth display period (can be referred to as the third time), the display driver can receive the Vsync signal (can be referred to as the third Vsync signal), indicating that the seventh display period is entered, the display driver determines that the synthesis flag bit is 1 in response to the Vsync signal, and can send the image frame 3 and the clock signal to the display screen, and then the image frame 3 can be refreshed on the display screen. The detailed steps can be referred to the first embodiment, and thus the description is omitted.

[0174] In the case that a new image frame is generated, SurfaceFlinger can send a commit (also referred to as AtomicCommit) to the display driver through HWC, as shown in FIG. 8. The driver can determine whether a commit is received between a Vsync signal and a previous Vsync signal, or whether the number of times of frame skipping is 0, or whether the idle mode is entered, after receiving the Vsync signal. In the case that any of the above three conditions is met, the display screen cannot perform frame skipping, but performs a refresh operation (also referred to as refresh action). In the case that none of the above three conditions is met, the display screen can perform frame skipping. In the case that the idle flag bit is determined to be equal to M, the idle mode is determined to be entered, and the refresh rate is reduced.

[0175] As shown in FIG. 9, after the display driver receives a Vsync signal, the display driver can first calculate the number of times of frame skipping, and then determine whether a commit is received (for example, whether the composition flag bit is 1), or whether the number of times of frame skipping is 0, or whether the idle mode is entered (for example, whether the idle flag bit is equal to M). In the case that any of the above three conditions is met, the display screen cannot perform frame skipping, and in the case that none of the above three conditions is met, the display screen can perform frame skipping.

[0176] In this way, on the one hand, in the case that a new image frame is not generated, the display screen can not be refreshed, and power consumption loss is reduced. On the other hand, by limiting the number of times of frame skipping, the problem of screen flashing caused by long-time non-refreshing of the display screen can be avoided, and the performance of the electronic device is maintained.

[0177] Embodiment Three

[0178] Hereinafter, a refresh method of a display screen in a current display period is introduced, taking the case that an electronic device is in an adaptive refresh rate mode in a previous display period, a new image frame is not generated in the previous display period, the idle flag bit is 3, M is 4, and the current display period enters the idle mode as an example.

[0179] As shown in FIG. 10, in combination with the software structure of the electronic device shown in FIG. 3b, the refresh method of the display screen can include the following steps:

[0180] S101: The display driver receives a Vsync signal.

[0181] The electronic device does not generate a new image frame in a previous display period, and the display driver receives a Vsync signal, indicating that the previous display period ends and the current display period is entered.

[0182] In combination with FIG. 11, it is assumed that the last display period of the third embodiment is the fifth display period, no new image frame is generated in the fifth display period, after receiving the Vsync signal, it is indicated that the fifth display period ends, and the sixth display period is entered, and the sixth display period is the current display period of the third embodiment.

[0183] In S102, the display driver updates the idle flag bit to +1 in response to the Vsync signal.

[0184] The display driver updates the idle flag bit to +1 in response to the Vsync signal, the idle flag bit is 3, and updating the idle flag bit to +1 is equal to 4.

[0185] In S103, the display driver determines whether the idle flag bit is equal to M. If yes, S104 is executed.

[0186] The idle flag bit being equal to M is used to indicate that the display driver has not received commit in the last M-1 display periods, which means that no new image frame is generated in the last M-1 display periods.

[0187] In the third embodiment, M is 4, updating the idle flag bit to +1 is equal to 4, and the display driver determines that the idle flag bit is equal to M, which means that the display driver can determine that the idle flag bit will enter the idle mode.

[0188] As shown in FIG. 11, it is assumed that M is 4, the sixth display period is the current display period of the third embodiment, in the first display period, the GPU of the electronic device renders and the CPU synthesizes to obtain image frame 1, in the second display period, the GPU of the electronic device renders and the CPU synthesizes to obtain image frame 2, no new image frame is generated in the last three display periods from the third display period to the fifth display period, and the idle mode is entered in the sixth display period.

[0189] In S104, the display driver updates the flag bit of the adaptive refresh rate to False.

[0190] It should be understood that in the case of frame skipping of the electronic device (see S604-S605 described above), the display screen of the electronic device does not refresh the display, which essentially lowers the refresh rate. If the frame skipping and the idle mode are entered in a display period, the refresh rate will be lowered again on the basis of the lowered refresh rate, the display screen will not refresh the display for a longer time, and the refresh rate is likely to be lower than the minimum refresh rate supported by the electronic device, which causes the screen to flash. Therefore, in order to avoid this situation, the frame skipping is not performed when the electronic device is about to enter the idle mode.

[0191] Referring to FIG. 11, it is assumed that the sixth display period enters the idle mode and that the sixth display period will be skipped. This means that the display screen will only receive the clock signal in the sixth display period. In the case where the number of times of skipping is 1, the display screen is refreshed once from the fifth display period and is refreshed again only when the sixth display period ends. Thus, the display screen can easily flicker.

[0192] Therefore, in the case where the electronic device will enter the idle mode, the display driver updates the flag bit of the adaptive refresh rate to False, indicating that the electronic device does not skip in the idle mode. That is, even if the number of times of skipping in the current display period is not 0, the display screen is still refreshed.

[0193] S105: The display driver sends the repeated image frame and more clock signals to the display screen.

[0194] In the case where the electronic device is in the idle mode, the display driver can send the repeated image frame and more clock signals to the display screen to reduce the refresh rate.

[0195] For example, in combination with FIG. 4 and FIG. 11, the electronic device can enter the idle mode in the sixth display period (the sixth display period can also be referred to as a second period between the fifth time and the sixth time, the fifth time obtains the fifth Vsync signal, and the sixth time obtains the sixth Vsync signal). The display driver can send the repeated image frame 2 and more clock signals to the display screen to reduce the refresh rate. For example, in the first display period to the fifth display period, the refresh rate of the electronic device is 120 Hz. In the fifth display period, the display driver can send 1.3 ms of clock signals to the display screen after sending the image frame to the display screen. In the sixth display period, the refresh rate of the electronic device is reduced to 60 Hz. The display driver can send 9.7 ms of clock signals to the display screen after sending the image frame to the display screen.

[0196] In combination with FIG. 11, the electronic device can display the image frame 2 (which can also be referred to as a second image frame) in the third display period. The third display period can also be referred to as a first period between the first time and the second time. The first time obtains the first Vsync signal, and the second time obtains the second Vsync signal.

[0197] S106: The display screen refreshes the repeated image frame based on the reduced refresh rate in response to receiving the repeated image frame and more clock signals.

[0198] In addition, in the case that the electronic device is in the idle mode, the display driver receives the commit in a display period, indicating that a new image frame is generated in the display period, the electronic device can exit the idle mode in the next display period, and the electronic device can refresh the display screen based on the previously set refresh rate, and the refresh rate can be increased to the previously set refresh rate.

[0199] In addition, in some embodiments, in the case that the electronic device is in the idle mode, the display driver receives the commit in a display period, and the flag bit of the adaptive refresh rate can be recorded as True again, indicating that the electronic device exits the idle mode and enters the adaptive refresh rate mode, and the electronic device can perform frame skipping again when frame skipping is needed. For example, in embodiment one, the flag bit of the adaptive refresh rate can be updated to True while S306 is performed.

[0200] As shown in FIG. 11, in the seventh display period, the GPU of the electronic device renders and the CPU of the electronic device synthesizes to obtain the image frame 3, the electronic device can exit the idle mode in the eighth display period, and the refresh rate is increased, for example, the refresh rate of the electronic device is restored from 60 Hz to the previously set 120 Hz in the adaptive refresh rate mode. The display screen of the electronic device can still refresh the display screen based on 120 Hz, and can perform frame skipping again when frame skipping is needed.

[0201] In this way, in the case that the electronic device will enter the idle mode, the electronic device is prevented from performing the frame skipping operation, thereby preventing the display screen from not being refreshed for a long time and causing flickering, and further maintaining the performance of the electronic device.

[0202] Based on the introduction of embodiments one to three, it can be known that in the case that the synthesis flag bit is 1, or the frame skipping number is 0, or the idle flag bit is M, any one of the three conditions is met, the display screen will refresh the display image frame, and the case that any two or three of the above conditions are met can also occur. It is indicated that in the case that a new image frame is generated, or the frame skipping number reaches the limit, or the idle mode is entered, the display screen will refresh the display image frame.

[0203] In the case that the synthesis flag bit is 0, the frame skipping number is not 0, and the idle flag bit is not equal to M, the idle flag bit is not equal to M, indicating that the flag bit of the adaptive refresh rate is also True, the display screen can not refresh the display, that is, the frame skipping operation can be performed, and the display driver only sends the clock signal (which can also be called as the empty frame) to the display screen, thereby reducing the power consumption loss.

[0204] For example, as shown in FIG. 11, at the end of the third display period (also referred to as the seventh time), the electronic device obtains a Vsync signal (also referred to as the seventh Vsync signal), and the electronic device determines, in response to the Vsync signal, that the first application does not generate an image frame between the end of the second display period (also referred to as the second time) and the end of the third display period; for example, the second threshold is 3, and the number of display periods in which the first application does not generate an image frame consecutively is 1, which does not reach the second threshold; for example, the first threshold is 1, and the number of times that the display screen does not perform a refresh action is 0, which does not reach the first threshold, and the electronic device can perform a frame skipping operation (also referred to as not performing a refresh action) on the display screen to maintain the display of the image frame 2 (also referred to as the second image frame).

[0205] For another example, as shown in FIG. 11, at the end of the seventh display period (also referred to as the eighth time), the electronic device obtains a Vsync signal (also referred to as the eighth Vsync signal), and the electronic device determines, in response to the Vsync signal, that the first application generates the image frame 3 between the end of the sixth display period (also referred to as the second time, or also referred to as a time between the second time and the eighth time) and the end of the seventh display period, and the display screen can refresh the display of the image frame 3 (refresh the display of the newly generated image frame of the first application).

[0206] For another example, as shown in FIG. 11, assuming that the second threshold is 3, at the end of the fifth display period (also referred to as the eighth time), the electronic device obtains a Vsync signal (also referred to as the eighth Vsync signal), and the electronic device determines, in response to the Vsync signal, that the first application does not generate an image frame in the third display period to the fifth display period, indicating that the electronic device determines that the number of display periods in which the first application does not generate an image frame consecutively reaches the second threshold 3, and the electronic device can refresh the display of the image frame 2 on the display screen.

[0207] For another example, as shown in FIG. 11, assuming that the first threshold is 1, at the end of the fourth display period (also referred to as the eighth time), the electronic device obtains a Vsync signal (also referred to as the eighth Vsync signal), and the electronic device determines, in response to the Vsync signal, that the first application performs a frame skipping operation (also referred to as not performing a refresh action) in the fourth display period, indicating that the electronic device determines that the number of times that the display screen does not perform a refresh action reaches the first threshold 1, and the electronic device can refresh the display of the image frame 2 on the display screen.

[0208] It should be noted that the electronic device is a mobile phone in the above embodiments, which is merely an example. In some embodiments, the electronic device can be a terminal device such as a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and the like. The specific form of the electronic device is not specially limited in the present application.

[0209] The embodiments of the present application further provide a computer readable storage medium storing a computer program, and the computer program can implement one or more steps in the display screen refreshing method when executed by a computer.

[0210] The computer readable storage medium can be a non-transitory computer readable storage medium, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0211] The embodiments of the present application further provide a computer program product containing instructions, and the computer program product can implement one or more steps in the display screen refreshing method when executed by a computer.

[0212] The electronic device, the computer readable storage medium, and the computer program product provided by the embodiments of the present application are all used to execute the display screen refreshing method provided above, and thus the beneficial effects achieved thereby can refer to the beneficial effects of the display screen refreshing method provided above, which will not be described herein again.

[0213] The terms "first", "second", and "third" and the like in the specification of the present application, the claims, and the drawings are used to distinguish different objects, and are not used to limit a specific sequence.

[0214] In the embodiments of the present application, the words "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design presented as "exemplary" or "for example" in the embodiments of the present application should not be construed as being preferred or superior over other embodiments or design solutions. Rather, the use of the words "exemplary" or "for example" is intended to present concepts in a particular manner.

[0215] The above-described embodiments are only used to illustrate the technical solutions of the present application, and 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 they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of refreshing a display screen, characterized by, The method is applied to an electronic device, the electronic device comprising a first application and a display screen, and the method comprises: In a process in which the display screen displays a first image frame, the first application generates a second image frame; At a first time, the electronic device, in response to a first Vsync signal, refreshes the display screen to display the second image frame; the first Vsync signal is obtained at the first time; At a second time, the electronic device, in response to a second Vsync signal, does not perform a refresh action on the display screen, and maintains the display of the second image frame; the second Vsync signal is obtained at the second time; the second time is later than the first time; and the first application does not generate an image frame between the first time and the second time.

2. The method of claim 1, wherein, Further comprising: In a process in which the display screen maintains the display of the second image frame, the first application generates a third image frame; At a third time, the electronic device, in response to a third Vsync signal, refreshes the display screen to display the third image frame; the third Vsync signal is obtained at the third time.

3. The method of claim 1, wherein, Further comprising: At a fourth time, the electronic device, in response to a fourth Vsync signal, refreshes the display screen to display the second image frame; the fourth Vsync signal is obtained at the fourth time; The first application does not generate an image frame between the first time and the fourth time.

4. The method of claim 3, wherein, Before the electronic device, in response to the fourth Vsync signal, refreshes the display screen to display the second image frame, further comprising: Determining that the number of times that the display screen does not perform a refresh action reaches a first threshold value.

5. The method of claim 1, wherein, In a first period between the first time and the second time, the display screen continuously displays the second image frame; the method further comprises: At a fifth time, the electronic device, in response to a fifth Vsync signal, refreshes the display screen to display the second image frame; the fifth Vsync signal is obtained at the fifth time; At a sixth time, the electronic device obtains a sixth Vsync signal; In a second period between the fifth time and the sixth time, the display screen continuously displays the second image frame; the length of the first period is less than the length of the second period; and the first application does not generate an image frame between the first time and the fifth time.

6. The method of claim 5, wherein, Before the electronic device, in response to the fifth Vsync signal, refreshes the display screen to display the second image frame, further comprising: Determining that the number of display periods in which the first application continuously does not generate an image frame reaches a second threshold value, the display period referring to the length of time between two Vsync signals that are continuously obtained by the electronic device.

7. The method of claim 1, wherein, Further comprising: At the seventh moment, the electronic device, in response to a seventh Vsync signal, determines that the first application does not generate image frames between the second moment and the seventh moment, determines that the number of display periods in which the first application continuously does not generate image frames does not reach a second threshold, and determines that the number of times that the display screen does not perform a refresh action does not reach a first threshold, and does not perform a refresh action on the display screen to maintain display of the second image frame; The seventh Vsync signal is obtained at the seventh moment; and the display period refers to a time length between two Vsync signals obtained by the electronic device in succession.

8. The method of claim 1, wherein, Further comprising: At an eighth moment, the electronic device, in response to an eighth Vsync signal, determines that the first application generates image frames between the second moment and the eighth moment, or determines that the number of display periods in which the first application continuously does not generate image frames reaches the second threshold, or determines that the number of times that the display screen does not perform a refresh action reaches the first threshold, and refreshes display of image frames on the display screen; the eighth Vsync signal is obtained at the eighth moment. The display period refers to a time length between two Vsync signals obtained by the electronic device in succession.

9. The method according to claim 4, 7 or 8, characterized in that, Further comprising: The first threshold is calculated based on a ratio of a refresh rate of the second image frame to a minimum refresh rate.

10. An electronic device, comprising: The electronic device comprises a memory and a processor; The memory is coupled to the processor, and the memory is configured to store computer program code, the computer program code comprising computer instructions, and one or more processors invoke the computer instructions to cause the electronic device to perform the refresh method of the display screen according to any one of claims 1-9.

11. A computer readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium, and the computer program is executed by the processor to implement the refresh method of the display screen according to any one of claims 1-9.

12. A computer program product, characterised in that, The computer program code is executed by the electronic device to implement the steps of the refresh method of the display screen according to any one of claims 1-9.

Citation Information

Patent Citations

  • Rendering method based on dynamic VSYNC signal, mobile terminal and storage medium

    CN107220019A

  • Display screen frequency conversion method, DDIC chip, display screen module and terminal

    CN111968582A

  • Display refreshing control method, terminal and computer readable storage medium

    CN112612562A

  • Control method based on vertical synchronization signal and electronic equipment

    CN114531519A

  • Screen refresh rate switching method and electronic equipment

    CN116052618A