Display screen awakening method, electronic equipment and storage medium
By starting the Worker thread in the display driver and performing the power-on, initialization, sending pictures and issuing backlight parameters at the same time, the problem of long-term wake-up of the display screen is solved, and the speed of quick wake-up and highlighting of the screen is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202310803507.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
The display screen of existing electronic devices takes a long time to wake up from the sleep state, and the screen light is slow, which affects the user experience.
By starting the Worker thread in the display driver and executing the picture and sending backlight parameters while powering on and initializing, the time spent on the display screen is shortened and the screen brightening speed is improved.
It significantly reduces the display wake-up time, improves the screen brightness speed, and improves the user experience.
Smart Images

Figure CN119225505A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a display screen wake-up method, an electronic device and a storage medium. Background Art
[0002] With the rapid development of electronic technology, electronic devices such as smart phones and tablets have more and more functions and have become indispensable tools for people's lives and work. Taking mobile phones as an example, users can turn on or off the display of their mobile phones at any time according to actual usage needs. For example, when the screen of the mobile phone is off, the user can trigger the mobile phone to light up the display by pressing the power button, double-clicking the screen, etc. The display is awakened from the sleep state and switched to the bright screen state, at which time all pixels of the display are illuminated. After the display is awakened, the display can display the lock screen interface or the system desktop.
[0003] Currently, when the display screen of an electronic device is awakened from a sleep state, there are problems such as a long awakening time and a slow screen lighting. Summary of the invention
[0004] The present application provides a display screen wake-up method, an electronic device, and a storage medium, which shortens the time consumption of the display screen wake-up process, increases the screen lighting speed, and thus improves the user experience.
[0005] In a first aspect, the present application provides a display screen wake-up method, which is applied to an electronic device, the electronic device includes a processor and a display screen, the processor includes a display driver and a power management service module, and the display screen is correspondingly provided with a display screen IC, the method comprising:
[0006] When the screen-on triggering condition is met, the display driver receives a power-on instruction from the power management service module;
[0007] In response to the power-on instruction, the display driver starts a Worker thread, and the Worker thread is used to trigger the display IC to power on and initialize;
[0008] The display driver returns a power-on completion message to the power management service module;
[0009] The display driver receives a picture sending instruction and sends the picture sending instruction to the display screen IC, wherein the picture sending instruction includes a screen lighting pattern;
[0010] The display driver receives a backlight instruction, wherein the backlight instruction includes a backlight parameter;
[0011] When the Worker thread is completed, the display driver sends a backlight instruction to the display IC;
[0012] When the Worker thread is not completed, the display driver sends the backlight instruction to the display IC until the Worker thread is completed;
[0013] Wherein, the backlight instruction is used to trigger: the display screen IC lights up the display screen according to the backlight parameters and controls the display screen to display the bright screen pattern.
[0014] Through the display screen wake-up method provided by the embodiment of the present application, after the screen light triggering condition is met, the display driver starts a Worker thread, powers on and initializes the display screen, and immediately returns the power-on completion message, triggering the image sending and backlight instruction process. Then, the display driver determines whether the Worker thread is completed. If the Worker thread is completed, the display driver sends a backlight instruction to the display screen to trigger the screen light; if the Worker thread is not completed, the display driver waits for the Worker thread to complete before sending a backlight instruction to the display screen, thereby waking up the display screen. The present application scheme starts the powered-on Worker thread through the display driver and performs a screen light logic judgment based on whether the powered-on Worker thread is completed, so that the image sending and backlight instruction can be executed while the display screen is powered on and initialized, shortening the time-consuming display screen wake-up process and improving the screen light speed.
[0015] Compared with the related art that uses power-on instructions to complete the process of powering on and initializing the display screen, the difference of the present application scheme is that after the display driver receives the notification to execute the power-on process, the display driver starts the power-on Worker thread, triggers the display screen to power on and start initialization.
[0016] Unlike the related technology, which returns to complete the power-on message after the display driver completes the power-on process (which takes a preset time T1), and then triggers the image sending process and the backlight parameter sending process, the optimized steps of the present application are: after starting the power-on Worker thread, immediately return to complete the power-on message, and then start the image sending process and the backlight parameter sending process. Therefore, the improved solution of the present application will perform the power-on and initialization, image sending and backlight parameter sending steps simultaneously to save the time of waking up the display.
[0017] Since the process of powering on and initializing the display screen in the present application is carried out simultaneously with the process of sending images and sending backlight parameters, the time consumption is greatly reduced, thereby achieving rapid wake-up of the display screen, accelerating the screen lighting speed, and improving the user experience.
[0018] For example, in the related art, based on the hardware requirements of the screen chip specifications, it takes about 150ms to 170ms to power on and initialize the display IC; the image sending process and the backlight parameter sending process take about 60ms. Since the present application solution executes the image sending process and the backlight parameter sending process while the display IC is powered on and initialized, it can save about 60ms. Therefore, the time required to wake up the display is greatly reduced.
[0019] In some possible implementations, the display driver returns a power-on completion message to the power management service module, including: when the Worker thread is started but not completed, the display driver returns a power-on completion message to the power management service module.
[0020] Compared with the related art in which the display driver can only return the power-on completion message after the display screen is powered on and initialized, the difference of the present application scheme is that after the display driver starts the power-on Worker thread, it immediately returns the power-on completion message to the upper layer without waiting for the display screen to be powered on and initialized.
[0021] That is to say, when the Worker thread is started but not completed, the display driver immediately returns to the display driver, triggering the start of the image sending process and the backlight parameter sending process, thereby realizing power-on and initialization, image sending and backlight parameter sending steps at the same time, thereby saving the time of waking up the display.
[0022] In some possible implementations, the method further includes: when the display driver receives the backlight instruction, the display driver determines whether the Worker thread is completed.
[0023] What needs to be explained is that after the display driver receives the backlight parameters, the display driver will determine whether the power-on Worker thread is completed. If the power-on Worker thread is completed, it means that the display screen has completed initialization, that is, the display task issued by the display driver can be executed. The display driver then sends the backlight parameters to the display screen to trigger the display screen to light up according to the backlight parameters. If the power-on Worker thread is not completed, it means that the display screen has not completed initialization. The display driver then waits for the power-on Worker thread to complete, and the display driver then sends the backlight parameters to the display screen to trigger the screen to light up. In actual implementation, the display driver sends the backlight parameters and the lock screen interface to the display IC. The display IC lights up the display screen according to the backlight parameters and controls the display screen to display the lock screen interface, thereby waking up the display screen.
[0024] In some possible implementations, the screen light pattern and the backlight parameter are respectively sent to the display driver under the triggering of the power-on completion message. In some embodiments, the power-on completion message may be a message indicating that the display screen has completed powering on and initialization. In other embodiments, the power-on completion message may be a message indicating that the display screen has completed powering on.
[0025] In some possible implementations, the processor further includes a drawing module. The screen-lighting pattern is transmitted to the display IC by the drawing module receiving an instruction from the power management service module after the power management service module receives the power-on completion message.
[0026] The screen-lit pattern may be a lock screen interface or a system desktop.
[0027] In some possible implementations, the screen-lighting pattern is drawn by the drawing module immediately notified by the power management service module when the screen-lighting triggering condition is met.
[0028] In some possible implementations, the processor further includes a backlight module. The backlight parameters are transmitted to the display IC by the backlight module receiving an instruction from the power management service module after the power management service module receives the power-on completion message.
[0029] In some possible implementations, the backlight parameter is determined according to the ambient light brightness of the environment in which the electronic device is located. For example, the value range of the backlight parameter is [0, 255].
[0030] In some possible implementations, the processor further includes a surface mapping SurfaceFlinger service module and a hardware synthesis module HWC. The power-on instruction is sent by the power management service module, transmitted through the SurfaceFlinger service module and the HWC, and reaches the display driver.
[0031] In some possible implementations, the power-on completion message sent by the display driver is transmitted through the HWC and the SurfaceFlinger service module and reaches the power management service module.
[0032] In some possible implementations, the screen-lighting trigger condition is: when the display screen is in an off state, receiving an operation of the user pressing the power button; or, when the display screen is in an off state, receiving a preset operation of the user on the display screen.
[0033] In a second aspect, the present application provides a display screen wake-up device, the device comprising a unit for executing the method in the first aspect. The device may correspond to executing the method described in the first aspect, and the relevant description of the unit in the device can refer to the description of the first aspect, which will not be repeated here for the sake of brevity.
[0034] The method described in the first aspect above can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a processing module or unit, a display module or unit, etc.
[0035] In a third aspect, the present application provides an electronic device comprising a display screen, a processor, a computer program or instructions stored in the processor and a memory, wherein the processor is used to execute the computer program or instructions so that the method in the first aspect is executed.
[0036] In a fourth aspect, the present application provides a computer-readable storage medium on which a computer program (also referred to as instructions or codes) for implementing the method in the first aspect is stored. For example, when the computer program is executed by a computer, the computer can perform the method in the first aspect.
[0037] In a fifth aspect, the present application provides a chip, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof. Optionally, the chip also includes a memory, and the memory is connected to the processor via a circuit or wire.
[0038] In a sixth aspect, the present application provides a chip system, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof. Optionally, the chip system also includes a memory, and the memory is connected to the processor via a circuit or wire.
[0039] In a seventh aspect, the present application provides a computer program product, which includes a computer program (also referred to as instructions or codes). When the computer program is executed by an electronic device, the electronic device implements the method in the first aspect.
[0040] It can be understood that the beneficial effects of the second to seventh aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of an application scenario of the display screen wake-up method provided in an embodiment of the present application;
[0042] Figure 2A schematic diagram of an improved process in a display screen wake-up method provided in an embodiment of the present application;
[0043] Figure 3 A schematic diagram of the time consumption for powering on and initializing a display screen in a display screen wake-up method provided in an embodiment of the present application;
[0044] Figure 4 A schematic diagram comparing the display screen wake-up method provided in an embodiment of the present application with related technologies;
[0045] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0046] Figure 6 A schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application;
[0047] Figure 7 A flowchart of a display screen wake-up method provided for related technologies;
[0048] Figure 8 A timing diagram of a display screen wake-up method provided for related technologies;
[0049] Fig. 9 A schematic diagram of the time consumption of a display screen wake-up method provided by the related technology;
[0050] Fig.10 A schematic diagram of a process for waking up a display screen provided in an embodiment of the present application;
[0051] Fig.11 A timing diagram of a display screen wake-up method provided in an embodiment of the present application;
[0052] Fig.12 A schematic diagram of the time consumption of the display screen wake-up method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.
[0055] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of objects. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two, for example, multiple processing units refer to two or more processing units, etc.; multiple elements refer to two or more elements, etc.
[0056] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0057] With the rapid development of electronic technology, electronic devices such as smart phones and tablets have more and more functions and have become indispensable tools in people's lives and work. Taking mobile phones as an example, users can turn on or off the display of their mobile phones at any time according to actual usage needs. For example, when the screen of the mobile phone is off, the user can trigger the mobile phone to light up the display by pressing the power button or double-clicking the screen.
[0058] For example, Figure 1 As shown in (a) in the figure, the display screen of the mobile phone is in a sleep state. When the mobile phone receives an operation of the user pressing the power button (POWER button), the mobile phone can light up the display screen (referred to as turning on the screen).
[0059] For example, Figure 1 As shown in (b), the display screen of the mobile phone is in a dormant state. When the mobile phone receives an operation of double-clicking the display screen by the user, the mobile phone can light up the display screen.
[0060] The display screen is awakened from the sleep state and switched to the bright screen state, at which time all pixels of the display screen are lit. After the display screen is awakened, the display screen can display the lock screen interface or the system desktop.
[0061] Currently, when the display screen of an electronic device is awakened from a sleep state, there are problems such as a long awakening time and a slow screen lighting.
[0062] In order to solve the problem of long wake-up time and slow screen lighting, the embodiment of the present application provides a display screen wake-up method, which shortens the display screen wake-up process time by improving the mobile phone software system to improve the user experience. The optimization solution for quickly waking up the display screen described in the embodiment of the present application can support all current products and adapt to all domestic and overseas versions, with universality and versatility.
[0063] This application mainly studies and improves how to shorten the display screen wake-up process.
[0064] The inventor of the present application has found that the power management service module (PMS module for short) in the electronic device takes a long time to process the display screen wake-up process. Figure 2 As shown in (a), in the display wake-up process, the power management service module takes about 150ms. The reason is:
[0065] 1) It takes about 100ms for the PMS module to process events such as pressing the power button.
[0066] 2) The PMS module notifies the display driver to execute the display power-on process, which takes about 50ms.
[0067] After research and analysis, it was found that the process corresponding to the above-mentioned "PMS module notifies the display driver to execute the display power-on process" can be optimized to shorten the wake-up time and increase the screen lighting speed.
[0068] In addition, the inventor of the present application has also found that the display screen in the electronic device takes a long time to process the display screen wake-up process. Figure 2 As shown in (b), in the display wake-up process, the integrated circuit (IC) of the display takes about 135ms. The reason is:
[0069] 1) The display IC has strict timing requirements for accessing three power lines and resetting, which takes 35ms.
[0070] 2) Display IC parameter configuration initialization requires about 120ms.
[0071] Among them, the display IC is one of the main control components of the display (also called display panel), and is also called the "brain" of the display. The main function of the display IC is to control the brightness and color of the display, send drive signals and image data to display panels such as LEDs in the form of electrical signals, and control the display to display image data through the drive signal. In other words, the display IC is an integrated circuit that controls the pixels on the display, enabling the display to display images and videos.
[0072] Among them, the three circuits connected to the display IC are power input, display data output and control signal output. Power input refers to converting the power into the voltage required by the display for use by the display; display data output refers to outputting display data to the display; control signal output refers to outputting control signals to the display in order to control the brightness, contrast and other parameters of the display.
[0073] Through research and analysis, it is found that the process corresponding to the above-mentioned "display IC parameter configuration initialization" can be optimized to shorten the display wake-up time and increase the screen lighting speed.
[0074] It should be noted that, with respect to “the PMS module notifies the display driver to execute the display screen power-on process” and “display screen IC parameter configuration initialization”, the embodiment of the present application provides corresponding process optimization solutions.
[0075] For ease of understanding, the following first describes the specified completion time involved in the power-on and initialization process of the display screen in the embodiment of the present application. The protocol stipulates that it takes a preset time (recorded as T1) to power on and initialize the display screen. In other words, after the preset time T1, the display screen completes the initialization and is ready to execute the display task issued by the display driver.
[0076] After the display driver triggers the display screen to power on, the display driver needs to wait for a preset time T1, that is, until the display screen is initialized, before returning the power-on completion message to the upper layer to further trigger the screen to light up. Figure 3 As shown, the preset time required for the display screen to power on and initialize is T1. For example, the preset time T1 can be 120ms. The preset time is for example only and can be set according to actual use requirements, and is not limited in the present application embodiment.
[0077] In order to better understand the optimization scheme provided in the embodiments of the present application, Figure 4 The solution of the embodiment of the present application is compared with the related technology:
[0078] Figure 4 (a) in FIG. 1 shows the display screen wake-up process in the related art. Figure 4 As shown in (a), in the display screen wake-up process of the related art, power is turned on and initialized first, then the image is sent, and finally the backlight parameters are sent.
[0079] Specifically, when the PMS module monitors the screen light trigger event, the PMS module broadcasts the screen light trigger event and notifies the display driver to execute the display power-on process, which takes about 50ms; then the display is powered on and initialized, which takes about 150ms to 170ms. Then, the picture sending process is notified to execute, and then the drawing (for example, drawing the lock screen interface) and the picture sending process are executed, and then the backlight parameters are notified to be sent, and then the backlight parameters are determined and sent, which takes about 60ms. Finally, the display is lit according to the backlight parameters and the lock screen interface (referred to as the screen light) is displayed on the display, thereby waking up the display.
[0080] It should be noted that in the related art, the display screen is powered on and initialized first, which takes a preset time T1. After the initialization is completed, the image sending process and the backlight parameter sending process are executed. In the display screen wake-up process of the related art, power is turned on and initialized first, and then the image is sent after initialization, and then the backlight parameters are sent. Each step is executed in sequence, which makes the display screen wake-up process take a long time.
[0081] Figure 4 (b) in FIG. 1 shows the display screen wake-up process in this application. Figure 4 As shown in (b), in the display screen wake-up process of the present application, the process of powering on and initializing the display screen is carried out simultaneously with the process of sending images and sending backlight parameters, thereby shortening the time required to wake up the display screen. The optimization solution provided by the present application for the display screen wake-up process includes the following three improvements:
[0082] Improvement point 1: The display driver starts a working thread (called Worker thread or Work thread) to power on and initialize the display.
[0083] In the present application, a new thread is opened to process data asynchronously, that is, a work.js script file is created, and asynchronous logic is executed on the new thread. Specifically, a Worker thread that runs independently can be created in the display wake-up process, and the display power-on and initialization can be processed through the Worker thread. In other words, the display power-on and initialization can be completed asynchronously on a dedicated thread, so that the display power-on and initialization process is executed in parallel with the process of sending images and sending backlight parameters.
[0084] The tasks of the Worker thread refer to the tasks of powering on and initializing the display screen.
[0085] If the Worker thread is started, the task of powering on and initializing the display screen begins to be executed; if the Worker thread ends or is completed, the task of powering on and initializing the display screen is completed.
[0086] For the sake of convenience, the Worker thread is also referred to as the powered-on Worker thread hereinafter.
[0087] Improvement point 2: When the PMS module monitors the screen-on trigger event, the PMS module immediately notifies the display driver to execute the display power-on process, so that the display driver will start the power-on process in advance.
[0088] Improvement point 3: When the PMS module monitors the screen-on trigger event, the PMS module notifies the drawing module in advance to execute the drawing process, so that the drawing module can draw the pattern displayed after the display screen wakes up in advance (taking the lock screen interface as an example), saving time.
[0089] Specifically, if Figure 4 As shown in (b), the PMS module notifies the display driver to execute the display screen power-on process. After the display driver receives the notification to execute the power-on process, the display driver starts the power-on Worker thread to trigger the display screen to power on and start initialization. Then the display driver immediately returns the power-on completion (OK) message to the PMS module. After the display screen receives the power-on instruction, the display screen starts to power on and initialize, where the display screen initialization includes the display screen IC initialization and the display panel initialization.
[0090] In addition, after the PMS module receives the power-on completion (OK) message, the PMS module notifies the drawing module and the backlight module (black light, BL) of the power-on completion message, the drawing module sends the drawn lock screen interface to the display screen, and then the backlight module obtains the backlight parameters and sends the backlight parameters to the display driver. Among them, the backlight parameters are determined according to the ambient light brightness. For example, the value range of the backlight parameters is [0, 255].
[0091] In the present application, the process of powering on and initializing the display screen is performed simultaneously with the process of sending images and issuing backlight parameters.
[0092] After the display driver receives the backlight parameters, it determines whether the power-on Worker thread is completed. If the power-on Worker thread is completed, it means that the display has been initialized, and the display driver sends the backlight parameters to the display to trigger the display to light up according to the backlight parameters. If the power-on Worker thread is not completed, it means that the display has not been initialized, and the display driver waits for the power-on Worker thread to complete, and then sends the backlight parameters to the display to trigger the screen to light up.
[0093] In actual implementation, the display driver sends the backlight parameters and the lock screen interface to the integrated circuit (IC) of the display screen. The display IC lights up the display screen according to the backlight parameters and controls the display screen to display the lock screen interface, thereby waking up the display screen.
[0094] In summary, in the present application, when the PMS module monitors the screen-on triggering event, the PMS module immediately notifies the display driver to execute the display screen power-on process, so that the display driver will start the power-on process in advance. The display driver starts the power-on Worker thread to trigger the display screen to power on and start initialization, and then the display driver immediately returns the power-on completion (OK) message to the PMS module. In this way, while the display screen is powered on and initialized, the image sending process and the backlight parameter sending process are executed. The display driver determines whether the power-on Worker thread is completed. If the power-on Worker thread is completed, the display screen is based on the backlight parameters. If the power-on Worker thread is not completed, the display screen is based on the backlight parameters after the power-on Worker thread is completed. Since in the display screen wake-up process of the present application, the power-on Worker thread is started by the display driver and the screen-on logic judgment is performed according to whether the power-on Worker thread is completed, so that the process of powering on and initializing the display screen is synchronized with the process of sending the image and sending the backlight parameters, the time-consuming display screen wake-up process is significantly shortened, and the screen-on speed is improved.
[0095] It should be noted that the above-mentioned screen lighting trigger event refers to pressing the power button to trigger the screen to light up, or double-clicking the screen to trigger the screen to light up, or an event that triggers the screen to light up in other ways, such as raising your hand above the screen to light up the screen. The specific event can be determined based on actual usage requirements and is not limited in the embodiments of this application.
[0096] The display screen wake-up method provided in the embodiment of the present application can be applied to the scenario where the screen is turned on by pressing the power button, or the scenario where the screen is turned on by double-clicking the screen. For the sake of convenience, the following embodiments will take the scenario where the screen is turned on by pressing the power button as an example to illustrate the implementation method of the display screen wake-up method. The implementation method adopted for the scenario where the screen is turned on by double-clicking the screen will not be described in detail. For details, please refer to the detailed description of the implementation method adopted for the scenario where the screen is turned on by pressing the power button.
[0097] It should be noted that the electronic device described in this application is an electronic device with a display screen, for example, the electronic device can be a smart terminal such as a mobile phone, a tablet computer, a smart watch, etc., and the specific technology and specific device form used by the electronic device are not limited here. For the convenience of description, the subsequent embodiments are all exemplified by the electronic device being a mobile phone.
[0098] See also Figure 5, is a structural diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a touch sensor 180K, an ambient light sensor 180L, and the like.
[0099] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. For example, the processor 110 is used to execute the display screen wake-up method in the embodiment of the present application.
[0100] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0101] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0102] The external memory 120 generally refers to an external memory. In the embodiment of the present application, the external memory refers to a memory other than the memory of the electronic device and the cache of the processor, and the memory is generally a non-volatile memory.
[0103] The internal memory 121, which may also be referred to as "memory", may be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
[0104] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel may be an organic light-emitting diode (OLED). In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0105] The touch sensor 180K is also called a "touch panel" or a touch screen (TP) sensor. The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect a touch operation acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194.
[0106] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0107] The button 190 includes a power button, which is used to trigger turning on or off the display screen. For example, when the display screen is in an off-screen state, if the user presses the power button, the display screen state changes from the off-screen state to the on-screen state.
[0108] The above is a specific description of the embodiment of the present application using the electronic device 100 as an example. It should be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. The electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.
[0109] In addition, an operating system is running on the above components, such as the iOS operating system developed by Apple, the Android open source operating system developed by Google, and the Windows operating system developed by Microsoft. Application programs can be installed and run on the operating system.
[0110] The operating system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
[0111] Figure 6 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0112] The layered architecture divides the software into several layers, each with 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 five layers, from top to bottom: application layer (applications), application framework layer (application framework), system Native library (called Native layer), hardware abstraction layer (HAL) and kernel layer (kernel). For ease of explanation, Figure 6 The hardware layer that interacts with the above software structure is also reflected.
[0113] It should be noted that the Android system is a Linux-based operating system, mainly used for portable devices. The development of upper-layer applications (such as the application layer and application framework layer) in the Android system is generally completed based on Java. Since some low-level tasks are not easy to implement in Java, when it comes to tasks such as local services, link libraries or hardware drivers, it is usually necessary to allow C programs to implement them, and C programs run in the system Native library. The system Native library includes an interface for Java to call C++ code.
[0114] The application layer may include a series of application packages. For example, the application layer may include AOD applications and other applications, and the embodiments of the present application do not impose any limitation on this.
[0115] The application framework layer provides an application programming interface (API) and a programming framework for the application of the application layer. The application framework layer includes some predefined functions. Exemplarily, the application framework layer may include a power management service (PMS) module, a backlight (BL) module, and a drawing module.
[0116] Among them, the power management service module can manage the power on and off of the display IC.
[0117] Among them, the backlight module can provide backlight parameters for the display driver, and the display IC lights up the display according to the backlight parameters, that is, wakes up the display. The backlight parameters are determined according to the ambient light brightness. In other words, the ambient light brightness is proportional to the brightness of the display when it is awakened. For example, the higher the ambient light brightness, the higher the brightness of the display when it is awakened. This ensures that the content displayed on the screen is clearly visible when the display is awakened and the screen is turned on, and it will not be affected by the ambient light; the lower the ambient light brightness, the lower the brightness of the display when it is awakened. This ensures that the content displayed on the screen is clearly visible when the display is awakened and the screen is turned on, and the screen light will not be dazzling.
[0118] Among them, the drawing module can provide a bright screen pattern for the display screen IC, and the display screen IC controls the display screen to display the bright screen pattern (such as a lock screen interface or a desktop) when the screen is turned on.
[0119] The Native layer can include multiple functional modules. For example, in the present application, the Native layer includes a surface drawing (SurfaceFlinger) service module. Among them, the function of the SurfaceFlinger service module is to accept graphic display data from multiple sources, synthesize them, and then send them to the display device. Image display can be specifically completed by multiple classes such as SurfaceFlinger, HWC, display screen, etc.
[0120] The HAL layer may include a hardware composition module (hwcomposer, HWC), which has the function or ability to use hardware to complete image data combination and display, and provide hardware support for the SurfaceFlinger service.
[0121] The kernel layer is the layer between hardware and software. The kernel layer includes the display driver. The display driver can work with the display IC to control the display screen from off to on. The display driver can also be used to set the backlight parameters of the display screen; when the backlight parameter of the display screen is set to 0, the display screen switches to the off state; when the backlight parameter of the display screen is set to any value in the range of [1,255], the display screen switches to the on state.
[0122] The hardware layer may include a display screen (such as OLED or LCD), and the display screen is provided with a display screen IC corresponding to the display screen. The display screen IC and the display screen may be provided independently or integratedly.
[0123] The hardware layer also includes a power button. When the display screen is in the off state, by pressing the power button, the display screen can be triggered to change from off (also called screen-off) to on, thereby waking up the display screen.
[0124] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to electronic devices based on operating systems such as iOS or Windows.
[0125] The execution subject of the display screen wake-up method provided in the embodiment of the present application can be the above-mentioned electronic device, or it can be a functional module and / or functional entity in the electronic device that can implement the display screen wake-up method, and the present application scheme can be implemented by hardware and / or software, which can be determined according to actual use requirements, and the embodiment of the present application is not limited. The following takes an electronic device as an example, and combines the accompanying drawings to exemplarily illustrate the display screen wake-up method provided in the embodiment of the present application.
[0126] In the embodiment of the present application, the display screen is awakened from the dormant state and switched to the bright screen state, at which time all pixels of the display screen are lit. After the display screen is awakened, the display screen can display the lock screen interface or the system desktop.
[0127] It should be noted that after the display screen is awakened, whether the display screen specifically displays the lock screen interface or the system desktop is determined by whether the display screen is set to a lock screen. That is to say, when the display screen is set to a lock screen, the display screen will display the lock screen interface after the display screen is awakened. When the display screen is not set to a lock screen, the display screen will display the system desktop after the display screen is awakened. For the sake of convenience, the following is an exemplary description of the display screen displaying the lock screen interface after the display screen is awakened.
[0128] It is understandable that after the display screen is powered on and initialized, the display screen is ready to execute the display task issued by the display driver. Specifically for the present application, when the display screen IC is in the powered-on state, the display screen IC can light up the display screen according to the backlight parameters and control the display screen to display the lock screen interface.
[0129] In order to highlight the improvements of the embodiments of the present application over the related art, the following compares the present application scheme with the related art display screen wake-up process, timing diagram and time consumption, and explains the improvements. Figures 7 to 9 Describe the display screen wake-up process, timing diagram and time consumption in the related technology, and then combine Figures 10 to 12 , the display screen wake-up method provided by the embodiment of the present application is described in terms of the display screen wake-up process, timing diagram, and time consumption. Here, the scenario of pressing the power button to trigger the screen to turn on is used as an example for exemplary description.
[0130] Related technologies-display wake-up process
[0131] Figure 7 The following is a software architecture diagram of the display screen wake-up process in the related technology. The display screen wake-up process can be divided into two stages: the first stage: the display screen power-on process, the second stage: the image sending process and the backlight parameter sending process. Figure 7 As shown, the display screen power-on process refers to the direction indicated by the dotted arrow, and the image sending process and backlight parameter sending process refer to the direction indicated by the solid arrow.
[0132] Phase 1: Display screen power-on process
[0133] When the electronic device is in the screen-off state, if the user presses the power button of the electronic device, the power management service module of the electronic device will receive the message that the user presses the power button to trigger the screen to turn on, and determine that a screen-on triggering event occurs.
[0134] It should be noted here that, for the sake of ease of explanation, it is schematically shown here that the message of the user pressing the power button to trigger the screen to turn on is directly transmitted from the power button to the power management service module; in actual implementation, the message of the user pressing the power button to trigger the screen to turn on may be transmitted through multiple modules in the software architecture and reach the power management service module. The specific details can be determined based on actual usage requirements and are not limited to the embodiments of the present application.
[0135] The power management service module sends a power-on instruction (also called a power-on notification) to the display driver, notifying the display driver to execute the display power-on process. The power-on instruction is transmitted to the display driver through the SurfaceFlinger service module and HWC in the software architecture in turn. The display driver responds to the power-on instruction and triggers the display power-on and parameter configuration initialization. It takes T1 time for the display to complete the power-on and parameter configuration initialization.
[0136] After T1 duration, the display driver returns a power-on completion message to the upper layer. The power-on completion message is transmitted to the power management service module through the HWC and SurfaceFlinger service modules in the software architecture in turn. After receiving the power-on completion message, the power management service module sends the power-on completion message to the graphics module and the backlight module.
[0137] Phase 2: Image submission process and backlight parameter distribution process
[0138] The drawing module listens to the power-on completion message sent by the power management service module and starts the drawing process. Specifically, the drawing module draws the lock screen interface, and transmits the lock screen interface through the SurfaceFlinger service module and HWC in the software architecture, and then transmits it to the display driver, which then sends the lock screen interface to the display screen.
[0139] The backlight module listens to the power-on completion message sent by the power management service module and starts the backlight parameter sending process. Specifically, the backlight module obtains the backlight parameters, and after the image sending process is completed, the backlight module transmits the backlight parameters in turn through the SurfaceFlinger service module and HWC in the software architecture, and then transmits them to the display driver. Among them, the backlight parameters are determined according to the brightness value of the environment in which the electronic device is located.
[0140] After the display driver receives the backlight parameters, it sends the backlight parameters to the display screen. The display screen lights up according to the backlight parameters and displays the lock screen interface.
[0141] In the display wake-up process, according to relevant technologies, when a screen-on trigger event occurs, the display needs to be powered on and initialized first, which takes about 150ms to 170ms. After the display is powered on and initialized, the image sending and backlight parameter sending processes are completed, which takes about 60ms.
[0142] exist Figure 7 On the basis of Figure 8 The timing diagram of the display screen wake-up process in the related art is shown. Figure 8 As shown, the method includes the following steps S101-S115.
[0143] S101, when the display screen is off, the electronic device receives an operation of a user pressing a power button.
[0144] Among them, the event that the power button is pressed when the display screen is off can be called a screen-on trigger event. It can be understood that the screen-on trigger event meets the screen-on trigger condition.
[0145] S102, the power button reports a screen-on triggering event to the power management service module.
[0146] S103, after monitoring the screen-on triggering event, the power management service module issues a power-on instruction to notify the display driver to execute the display screen power-on process. The power-on instruction is transmitted to the display driver through the SurfaceFlinger service module and the HWC in turn.
[0147] S104, the display driver sends a power-on instruction to the display screen.
[0148] S105, in response to the power-on instruction, the display screen is powered on and parameter configuration initialization begins.
[0149] S106, the display driver starts timing from the moment when the power-on instruction is issued.
[0150] It should be noted that the protocol stipulates that it takes a preset time T1 for the display screen to power on and initialize parameter configuration. After the preset time T1, the display screen completes the parameter configuration initialization.
[0151] S107, the display driver determines whether the timing duration T is greater than or equal to T1.
[0152] If the timing time T is greater than or equal to T1, then the following S108 is continued to be executed. If the timing time T is less than T1, then the process returns to continue to execute S107.
[0153] That is to say, in the related art, it is necessary to wait until the display screen is powered on and initialized before the display driver can return a power-on completion message to the upper layer.
[0154] S108, the display driver returns a power-on completion message to the upper layer, and the power-on completion message is transmitted to the power management service module through the HWC and SurfaceFlinger service modules in sequence.
[0155] The power-on completion message is used to indicate that the display screen has completed power-on and parameter configuration initialization.
[0156] S109, the power management service module broadcasts the power-on completion message.
[0157] S110, after the drawing module receives the power-on completion message, the drawing module draws a lock screen interface.
[0158] S111, the drawing module sends a drawing instruction to the display driver, and the drawing instruction includes a lock screen interface. The drawing instruction is transmitted to the display driver through the power management service module, the SurfaceFlinger service module, and the HWC in sequence, and then the display driver sends the lock screen interface to the display screen.
[0159] S112, the display driver reports a message that the drawing sending is completed to the drawing module.
[0160] S113, after the backlight module receives the power-on completion message, the backlight module obtains backlight parameters.
[0161] S114, after receiving the message of completing the image sending, the drawing module sends a backlight instruction to the display driver, and the backlight instruction includes backlight parameters. The backlight instruction is transmitted to the display driver through the power management service module, the SurfaceFlinger service module, and the HWC in sequence, and then the display driver sends the backlight instruction to the display screen.
[0162] S115, the display screen lights up according to the backlight parameters and displays the lock screen interface.
[0163] Specifically, the display driver sends the backlight parameters and the lock screen interface to the display IC, and the display IC lights up the display according to the backlight parameters and controls the display to display the lock screen interface.
[0164] Above through Figure 7 and Figure 8 The display screen wake-up process and timing diagram in the related technology are respectively described. Fig. 9 Analyze the time consumption of display screen wake-up in related technologies. Fig. 9 As shown, in the display screen wake-up process of the related technology, it is necessary to first complete the display screen power-on and initialization, which takes time T1; after completing the display screen power-on and initialization, the image is sent, which takes time T2; and the backlight parameters are sent, which takes time T3. In summary, it takes at least T1+T2+T3 to complete the display screen wake-up process. Therefore, the display screen wake-up process has the problem of being time-consuming.
[0165] This application - display wake-up process
[0166] In view of the time-consuming problem of the display screen wake-up process in the above-mentioned related technologies, the embodiment of the present application makes the following improvements in the process: when the PMS module monitors the screen-on trigger event, the PMS module immediately notifies the display driver to execute the display screen power-on process, so that the display driver will execute the display screen power-on process in advance. The display driver starts the power-on Worker thread to trigger the display screen to power on and start initialization, and then the display driver immediately returns a power-on completion (OK) message to the PMS module. In this way, while the display screen is powered on and initialized, the image sending process and the backlight parameter sending process are executed. The display driver determines whether the power-on Worker thread is completed. If the power-on Worker thread is completed, the display screen is lit based on the backlight parameters; if the power-on Worker thread is not completed, the display screen is lit based on the backlight parameters after the power-on Worker thread is completed.
[0167] In the display wake-up process of the present application, the power-on Worker thread is started by the display driver and the screen lighting logic judgment is performed based on whether the power-on Worker thread is completed, so that the display power-on and initialization process is synchronized with the process of sending pictures and sending backlight parameters, which significantly shortens the time consumption of the display wake-up process and improves the screen lighting speed.
[0168] In the present application, a new thread is opened to process data asynchronously, that is, a work.js script file is created to execute asynchronous logic on the new thread. Specifically, a Worker thread that runs independently can be created in the display wake-up process, and the display power-on and initialization process can be processed by the Worker thread, so that the display power-on and initialization process is executed in parallel with the process of sending images and sending backlight parameters.
[0169] The following describes the process of creating and using Worker threads in this application.
[0170] First, the main thread uses the new command to call the Worker() constructor to create a new Worker thread.
[0171] It should be noted that the parameter of the Worker() constructor is a script file, which is the task to be performed by the Worker thread. Specifically for this application, the tasks of the main thread refer to the various tasks of the display screen wake-up process, for example, the tasks of the main thread include the task of notifying the display screen to power on, the upper layer sending the lock screen interface to the display screen, and the upper layer sending the backlight parameters to the display screen. The tasks of the Worker thread refer to the tasks of powering on and initializing the display screen.
[0172] Among them, the independent Worker thread will not block the main thread. The independent Worker thread and the main thread can process different tasks asynchronously. Therefore, the process of powering on and initializing the display screen is executed in parallel with the process of sending images and sending backlight parameters.
[0173] Then, the main thread calls the worker.postMessage() method to send a message to the Worker thread.
[0174] The parameter of the worker.postMessage() method is the data sent from the main thread to the Worker thread. It can be of various data types, including binary data. Accordingly, there will be a listener function inside the Worker thread to listen for message events. The parameter of the listener function is an event object, whose data property contains the data sent by the main thread.
[0175] Next, the main thread specifies the listening function through worker.onmessage to receive the message sent back by the Worker thread.
[0176] Finally, after the Worker thread completes the tasks of powering on and initializing the display, the main thread can close the Worker thread. For example, self.close() is used to close the Worker thread inside the Worker.
[0177] In the present application scheme, if the power-on Worker thread is started, the task of powering on and initializing the display screen begins to be executed; if the power-on Worker thread ends, the task of powering on and initializing the display screen is completed.
[0178] It should be noted that a data structure (work_struct) can be used to describe a Worker thread. These tasks form a work queue (workqueue) in a queue structure, and the corresponding data structure is workqueue_struct. The Worker thread is responsible for executing the work in the work queue. These structures of the Worker thread are connected into a linked list. When a Worker thread is started, the Worker thread will execute all the work on its linked list. When the work is completed, the Worker thread removes the corresponding work_struct object from the linked list. When there are no more objects on the linked list, the Worker thread ends.
[0179] Fig.10 The software architecture diagram of the display screen wake-up process provided by the embodiment of the present application is shown. The display screen wake-up process can be divided into two stages: the first stage: the display screen power-on process, the second stage: the image sending process and the backlight parameter sending process, and the third stage: lighting the screen when the conditions are met.
[0180] Phase 1: Display screen power-on process
[0181] When the electronic device is in the screen-off state, if the user presses the power button of the electronic device, the PMS module of the electronic device will receive the message that the user presses the power button to trigger the screen to turn on, and determine that a screen-on trigger event has occurred. After the PMS module monitors the screen-on trigger event, the PMS module immediately notifies the display driver to execute the display screen power-on process, so that the display driver will start the power-on process in advance.
[0182] Different from Figure 8 The related technical process shown, in the embodiment of the present application, after the display driver receives the notification to execute the power-on process, the display driver starts the power-on Worker thread, triggers the display screen to power on and starts initialization, and then the display driver returns the power-on completion message to the PMS module, and then the PMS module broadcasts the power-on completion message, which will trigger the image sending process and the backlight parameter sending process.
[0183] Phase 2: Image submission process and backlight parameter distribution process
[0184] The drawing module listens to the power-on completion message broadcast by the power management service module and starts the drawing sending process. Specifically, the drawing module obtains the lock screen interface, and transmits the lock screen interface through the SurfaceFlinger service module and HWC in the software architecture, and then transmits it to the display driver, which then sends the lock screen interface to the display screen.
[0185] The backlight module listens to the power-on completion message broadcast by the power management service module and starts the backlight parameter delivery process. Specifically, the backlight module obtains the backlight parameters, and transmits the backlight parameters in turn through the SurfaceFlinger service module and HWC in the software architecture, and then transmits them to the display driver. Among them, the backlight parameters are determined according to the brightness value of the environment in which the electronic device is located.
[0186] Unlike the related technology which completes power-on and initialization (which takes a preset time T1) and then returns to complete the power-on message, thereby triggering the picture sending process and the backlight parameter sending process, the optimized steps of the present application are: after starting the power-on Worker thread, immediately return to complete the power-on message, and then start the picture sending process and the backlight parameter sending process. Therefore, the improved solution of the present application performs the steps of power-on and initialization, picture sending and backlight parameter sending at the same time to save the time of waking up the display.
[0187] Phase 3: Turn on the screen when conditions are met
[0188] After the display driver receives the backlight parameters, the display driver determines whether the power-on Worker thread is completed. If the power-on Worker thread is completed, it means that the display screen has completed initialization, that is, it can execute the display task issued by the display driver, and the display driver sends the backlight parameters to the display screen to trigger the display screen to light up according to the backlight parameters. If the power-on Worker thread is not completed, it means that the display screen has not completed initialization, and the display driver waits for the power-on Worker thread to complete, and the display driver sends the backlight parameters to the display screen to trigger the screen to light up.
[0189] In actual implementation, the display driver sends the backlight parameters and the lock screen interface to the display IC. The display IC lights up the display according to the backlight parameters and controls the display to display the lock screen interface, thereby waking up the display.
[0190] Since the process of powering on and initializing the display screen in the present application is carried out simultaneously with the process of sending images and sending backlight parameters, the time consumption is greatly reduced, thereby achieving rapid wake-up of the display screen, accelerating the screen lighting speed, and improving the user experience.
[0191] For example, in the related art, based on the hardware requirements of the screen chip specifications, it takes about 150ms to 170ms to power on and initialize the display IC; the image sending process and the backlight parameter sending process take about 60ms. Since the present application solution executes the image sending process and the backlight parameter sending process while the display IC is powered on and initialized, it can save about 60ms. Therefore, the time required to wake up the display is greatly reduced.
[0192] exist Fig.10 On the basis of Fig.11 FIG. 1 shows a timing diagram of the display screen wake-up process in an embodiment of the present application. Fig.11 As shown, the method includes the following steps S201-S217.
[0193] S201, when the display screen is off, receiving an operation of a user pressing a power button.
[0194] S202, the power button reports a screen-on triggering event to the power management service module.
[0195] S203, the power management service module sends a power-on notification, which is transmitted through the SurfaceFlinger service module and HWC in sequence and reaches the display driver.
[0196] S204, the power management service module notifies the drawing module to perform lock screen drawing.
[0197] Compared with the process in the related art in which the display driver is notified to power on, and the display driver returns the power-on completion message, and then the drawing module is notified to draw the lock screen, the present application solution immediately notifies the drawing module to draw the lock screen after the screen is turned on. Since the lock screen drawing is notified in advance, the drawing module can draw the lock screen interface in advance or obtain the lock screen interface in other ways, which can save time.
[0198] S205 , after receiving the power-on notification, the display driver starts an independent power-on Worker thread.
[0199] As described above, in the embodiment of the present application, the power-on Worker thread is responsible for completing the task of powering on and initializing the display screen. The power-on Worker thread can be implemented independently of the main thread and will not hinder the main thread. The tasks of the main thread include the task of notifying the display screen to power on, the upper layer sending the lock screen interface to the display screen, and the upper layer sending the backlight parameters to the display screen.
[0200] S206, the display driver triggers the display screen to power on and initialize by powering on the Worker thread.
[0201] S207, the display screen is powered on and starts initialization.
[0202] S208, the display driver immediately returns a power-on completion message to the upper layer, and the power-on completion message is transmitted to the power management service module through the HWC and SurfaceFlinger service modules in sequence.
[0203] Compared with the related art in which the display driver can only return the power-on completion message after the display screen is powered on and initialized, the difference of the present application scheme is that after the display driver starts the power-on Worker thread, it immediately returns the power-on completion message to the upper layer without waiting for the display screen to be powered on and initialized.
[0204] S209: The power management service module broadcasts the power-on completion message.
[0205] S210: After the drawing module receives the power-on completion message, the drawing module obtains a lock screen interface.
[0206] For example, the drawing module can directly obtain the lock screen interface drawn in advance.
[0207] S211, the drawing module sends a drawing instruction to the display driver, and the drawing instruction includes a lock screen interface. The drawing instruction is transmitted to the display driver through the power management service module, the SurfaceFlinger service module, and the HWC in sequence, and then the display driver sends the lock screen interface to the display screen.
[0208] S212, the drawing module receives a picture sending completion message reported by the display driver, and then sends the picture sending completion message to the backlight module.
[0209] S213: After the backlight module receives the power-on completion message, the backlight module obtains backlight parameters.
[0210] In actual implementation, the backlight parameter can be stored in the backlight register. For example, the backlight instruction can carry the backlight parameter 120, and 120 can be written into the backlight register. In this way, when the display screen IC receives the backlight instruction, the display screen IC can read the backlight parameter 120 from the backlight register and light up the display screen according to the backlight parameter 120.
[0211] S214, after the backlight module receives the message that the image transmission is completed, the backlight module sends a backlight instruction to the display driver, and the backlight instruction includes backlight parameters. The backlight parameters are transmitted to the display driver through the power management service module, the SurfaceFlinger service module, and the HWC in sequence.
[0212] S215, after the display driver receives the backlight parameters, the display driver determines whether the power-on Worker thread is completed.
[0213] Compared with the process in the related art in which the display driver receives the backlight instruction and then directly sends the backlight instruction to the display screen, the difference of the present application scheme is that after receiving the backlight instruction, the display driver first determines whether the power-on Worker thread is completed, and then determines whether to send the backlight instruction to the display screen based on the judgment result.
[0214] If the power-on Worker thread has been completed, the following S216 is continued to be executed, that is, a backlight instruction is sent to the display screen.
[0215] If the power-on Worker thread is not completed, the process returns to continue executing S215, that is, waits for the power-on Worker thread to be completed, and then sends a backlight instruction to the display screen.
[0216] S216, the display driver sends a backlight instruction to the display screen.
[0217] S219, the display screen lights up according to the backlight command and displays the lock screen interface.
[0218] Specifically, the display driver sends the backlight instruction to the display IC, and the display IC lights up the display according to the backlight instruction and controls the display to display the lock screen interface.
[0219] Above through Fig.10 and Fig.11 The display screen wake-up process and timing diagram in this application are respectively described. Fig.12Analyze the time consumption of display screen wake-up in this application.
[0220] refer to Fig.12 As shown in (a), in the display screen wake-up process of the related technology, it is necessary to first complete the display screen power-on and initialization, which takes T1, and return an OK message after T1. After the display screen is powered on and initialized, the image is sent, which takes T2; and the backlight command is sent, which takes T3. In summary, it takes at least T1+T2+T3 to complete the display screen wake-up process.
[0221] Refer to Fig.12 As shown in (b), in the display screen wake-up process of the present application, after the screen light trigger event occurs, the display driver immediately executes the power-on process, the display driver starts the power-on Worker thread to trigger the display screen to power on and initialize, and then the display driver immediately returns an OK message to trigger the process of sending the image and issuing the backlight instruction. In this way, the image sending process and the backlight instruction issuing process can be executed while the display screen is initialized.
[0222] In the present application, it takes T1 to complete the power-on and initialization of the display screen. In actual implementation, T1 is about 150ms to 170ms. While the display screen is powered on and initialized, the image is sent and the backlight parameters are sent. In actual implementation, the total time for sending the image and sending the backlight parameters is about 60ms. Overall, it takes at least T1, or slightly more than T1, to complete the display screen wake-up process. Compared with the related art, the present application can save about 60ms.
[0223] Since in the display screen wake-up process of the present application, the process of powering on and initializing the display screen is carried out simultaneously with the process of sending images and sending backlight parameters, the time consumption of the display screen wake-up process is significantly shortened. Therefore, the display screen wake-up method provided in the embodiment of the present application can greatly shorten the time required to wake up the display screen and improve the user experience.
[0224] It should be noted that, in the embodiments of the present application, "greater than" can be replaced by "greater than or equal to", "less than or equal to" can be replaced by "less than", or "greater than or equal to" can be replaced by "greater than", and "less than" can be replaced by "less than or equal to".
[0225] The various embodiments described herein may be independent solutions or may be combined according to internal logic, and all of these solutions fall within the protection scope of this application.
[0226] The present application also provides a chip, which is coupled to a memory and is used to read and execute computer programs or instructions stored in the memory to execute the methods in the above embodiments.
[0227] The present application also provides an electronic device, which includes a chip, and the chip is used to read and execute a computer program or instruction stored in a memory, so that the method in each embodiment is executed.
[0228] This embodiment also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the display screen wake-up method in the above-mentioned embodiment.
[0229] This embodiment further provides a computer program product, wherein the computer-readable storage medium stores program codes. When the computer program product is run on a computer, the computer executes the above-mentioned related steps to implement the display screen wake-up method in the above-mentioned embodiment.
[0230] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the chip executes the display screen wake-up method in the above-mentioned method embodiments.
[0231] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0232] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0233] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A display screen wake-up method, characterized in that: The method is applied to an electronic device, the electronic device includes a processor and a display screen, the processor includes a display driver and a power management service module, the display screen is correspondingly provided with a display screen integrated chip IC, and the method includes: When the screen-on triggering condition is met, the display driver receives a power-on instruction from the power management service module; In response to the power-on instruction, the display driver starts a Worker thread, and the Worker thread is used to trigger the display IC to power on and initialize; The display driver returns a power-on completion message to the power management service module; The display driver receives a picture sending instruction and sends the picture sending instruction to the display screen IC, wherein the picture sending instruction includes a screen lighting pattern; The display driver receives a backlight instruction, wherein the backlight instruction includes a backlight parameter; When the Worker thread is completed, the display driver sends a backlight instruction to the display IC; When the Worker thread is not completed, the display driver sends the backlight instruction to the display IC until the Worker thread is completed; Wherein, the backlight instruction is used to trigger: the display screen IC lights up the display screen according to the backlight parameters and controls the display screen to display the bright screen pattern.
2. The method according to claim 1, characterized in that The display driver returns a power-on completion message to the power management service module, including: When the Worker thread is started but not completed, the display driver returns the power-on completion message to the power management service module.
3. The method according to claim 1 or 2, characterized in that: The screen-lit pattern and the backlight parameter are respectively sent to the display driver under the triggering of the power-on completion message.
4. The method according to any one of claims 1 to 3, characterized in that The processor also includes a graphics module; The screen-lighting pattern is transmitted to the display IC by the drawing module after the power management service module receives the power-on completion message and the drawing module receives the instruction of the power management service module.
5. The method according to claim 4, characterized in that When the screen-lighting triggering condition is met, the screen-lighting pattern is drawn by the drawing module notified by the power management service module.
6. The method according to any one of claims 1 to 5, characterized in that The processor also includes a backlight module; The backlight parameters are transmitted to the display IC by the backlight module after the power management service module receives the power-on completion message and the backlight module receives an instruction from the power management service module.
7. The method according to any one of claims 1 to 6, characterized in that The backlight parameter is determined according to the ambient light brightness of the environment in which the electronic device is located.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: When the display driver receives the backlight instruction, the display driver determines whether the Worker thread is completed.
9. The method according to any one of claims 1 to 8, characterized in that The processor also includes a surface drawing SurfaceFlinger service module and a hardware synthesis module HWC; The power-on instruction is sent by the power management service module, transmitted through the SurfaceFlinger service module and the HWC, and reaches the display driver.
10. The method according to claim 9, characterized in that The power-on completion message is sent by the display driver, transmitted through the HWC and the SurfaceFlinger service module, and reaches the power management service module.
11. The method according to any one of claims 1 to 10, characterized in that The screen-lighting trigger condition is: when the display screen is in the off state, receiving an operation of the user pressing the power button; or, when the display screen is in the off state, receiving a preset operation of the user on the display screen.
12. An electronic device, characterized in that: The electronic device comprises a display screen, a processor, a memory and a computer program stored in the memory, wherein the processor is used to execute the computer program so that the electronic device implements the method as claimed in any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 11.
