Display control method and device and storage medium

By executing the initialization and screen-lit instructions issuance process in parallel in electronic devices, the problem of the time-consuming conversion of electronic devices from black screen to bright screen is solved, and a faster screen-lit process is achieved, improving device performance and user experience.

CN119252160AActive Publication Date: 2025-01-03HONOR DEVICE CO LTD

Patent Information

Application Number
CN202410546975.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2025-01-03
Estimated Expiration
2044-04-30

AI Technical Summary

Technical Problem

In the prior art, electronic devices take a long time to switch from black screen to bright screen, which affects the performance and user experience of the device.

Method used

Two processes are performed in parallel when receiving user operations by Power Management Service (PMS): immediately light up the screen event to the display driver for initialization in advance, and light up the screen command according to the Android native process, and reach the display driver after the screen command is brightened. When you don’t need to wait for the initialization to complete, you will return to the initialization completion message. Set the screen status to enable, so that the picture is sent in advance.

Benefits of technology

The starting time node for the picture is advanced by about 50ms, and the overall screen-brightening process is shortened by about 50ms, improving the performance and user experience of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119252160A_ABST
    Figure CN119252160A_ABST
Patent Text Reader

Abstract

The invention provides a display control method and device and a storage medium, and relates to the technical field of terminals. When the display screen is in a screen-off state and receives a screen-on operation of a user, the PMS executes two processes in parallel: the PMS immediately issues a screen event to the display driver, and if the display driver determines that the event is an event triggering screen-on, the display driver and the display screen are initialized; meanwhile, the PMS waits for a preset time length according to an Android native process, if it is determined that the event is a screen-on event, a screen-on instruction is issued, when the screen-on instruction passes through a SurfaceFlinger and an HWC and reaches a display driver, the display driver immediately returns an initialization completion message to the HWC without waiting for initialization completion, the HWC sets a global variable'display state 'as'on', and the PMS is triggered to send a picture in advance. Therefore, the overall time consumption of the screen-on process is shortened by about 50ms, the screen-on display becomes faster, the performance of the electronic equipment is improved, and the use experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a display control method, device and storage medium. Background Art

[0002] With the rapid development of terminal technology, electronic devices such as mobile phones and tablet computers are becoming more and more intelligent. Taking a mobile phone as an example, when the display screen is in a black screen state, the user can trigger the mobile phone to execute the display screen power-on process and turn on the display screen backlight by lifting the phone, pressing the power button, or touching the display screen, so that the display screen enters the display state, meeting the user's demand for the display screen.

[0003] However, when the display screen of the electronic device is in a black screen state, if the screen lighting solution of the related art is adopted, the electronic device will take a long time to display the picture after the user operates, thereby affecting the performance of the electronic device. Summary of the invention

[0004] The present application provides a display control method, device and storage medium, which are used to solve the problem of long time consumption in the screen lighting solution of the related art.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] In a first aspect, an embodiment of the present application provides a display control method. The method can be applied to an electronic device, and the electronic device may include a display screen and a processor, and the processor may include a power management service PMS, a display driver, and a hardware synthesizer HWC. The method may include:

[0007] When the display screen is in the screen-off state, it receives user operations; in response to the user operations, the PMS sends a first event to the display driver; in response to the first event being a screen-on event, the display driver initializes the display screen; the PMS sends a screen-on instruction to the display driver; in response to the screen-on instruction, the display driver returns an initialization completion message to the HWC; in response to the initialization completion message, the HWC sets the screen state to on; in response to the screen state being on, the PMS sends a refresh instruction and backlight parameters to the display driver.

[0008] In the above scheme, when receiving the user's operation, PMS can execute two processes in parallel: one process is that PMS immediately sends the first event to the display driver. If the display driver determines that the first event is an event that triggers the screen to light up, it starts to initialize the display driver and the display screen, so that the start time of initialization is advanced; the other process is that PMS sends the screen light up instruction according to the Android native process. When the screen light up instruction reaches the display driver, there is no need to wait for the initialization to be completed. The display driver immediately returns the initialization completion message to the HWC. The HWC sets the screen state to on and triggers PMS to send the picture in advance. In this way, the start time node of the picture refresh can be advanced by about 50ms, and the overall time consumption of the screen light up process is finally shortened by about 50ms. The screen light up display becomes faster, which improves the performance of the electronic device and the user experience.

[0009] In one possible implementation, the above-mentioned user operation is a screen-lighting operation. For example, the screen-lighting operation may include pressing the power button on the electronic device, raising the hand, clicking the display screen, double-clicking the display screen, moving away from the sensor set on the inside of the display screen, or unblocking the sensor set on the inside of the display screen. The display control method provided in the present application can be applied to screen-lighting scenarios in response to the above-mentioned various screen-lighting operations, such as conventional sleep wake-up, sleep wake-up with screen-off display function, sleep wake-up with fingerprint function, sleep wake-up with fingerprint function, sleep wake-up in multi-screen collaboration scenarios, sleep wake-up in projection scenarios, car-machine interaction scenarios and other screen-lighting scenarios. In any screen-lighting scenario, the user can trigger the electronic device to execute the display control method provided in the present application through the above-mentioned screen-lighting operation.

[0010] In a possible implementation, the processor may further include an input driver. In response to a user operation, the PMS sends a first event to the display driver, which may include: in response to the user operation, the input driver reports the first event corresponding to the user operation to the PMS; after receiving the first event, the PMS immediately sends the first event to the display driver.

[0011] Exemplarily, the processor may further include a touch screen driver. The PMS immediately sends the first event to the display driver, which may specifically include: the PMS immediately sends the first event to the touch screen driver; and the touch screen driver transmits the first event to the display driver.

[0012] In the above scheme, the input driver can trigger PMS to execute a parallel initialization process by reporting the first event to PMS. In addition, in the initialization process based on the Android native process, after receiving the event corresponding to the user operation, PMS first waits for a preset time, and then determines the specific type of the event. Only when it is determined that the event is a screen-on event, it will issue a screen-on instruction, which results in a late start time of initialization; while in the customized initialization process provided by the present application, after receiving the event corresponding to the user operation, PMS does not need to wait for a preset time, nor does it need to determine the specific type of the event, but immediately sends the event to the TP driver or display driver to trigger initialization in advance.

[0013] In a possible implementation, the method may further include: after receiving the first event, the PMS starts timing; in response to the timing duration reaching a preset duration, and the first event being a screen-on event, the PMS issues a screen-on instruction.

[0014] In the above scheme, after PMS receives the user operation input by the user, PMS will still execute the Android native process and issue a screen light instruction, so as to trigger HWC to execute the process of setting the screen status to on, thereby triggering PMS to start the process of sending pictures.

[0015] In a possible implementation, the processor may further include a surface drawing service module SurfaceFlinger, and the screen light instruction is transmitted to the display driver via SurfaceFlinger and HWC.

[0016] In the above scheme, each layer of the Android software architecture includes functional modules corresponding to user operations, and the layers communicate with each other through software interfaces. During the screen-on process, after the PMS issues a screen-on command, the command can be passed to the display driver through SurfaceFlinger and HWC in turn.

[0017] In a possible implementation, in response to the screen-on instruction, the display driver returns an initialization completion message to the HWC, which may include: in response to the screen-on instruction, and the display driver and the display screen have started initialization, the display driver immediately returns the initialization completion message to the HWC. The time when the display driver returns the initialization completion message to the HWC is earlier than the time when the display driver and the display screen complete the initialization.

[0018] It can be understood that in the initialization process based on the Android native process, after the display driver receives the screen-on command, the display driver needs to wait for the initialization to be completed before returning the initialization completion message to the HWC, which makes the start time of sending the image later. In the custom initialization process provided by this application, after the display driver receives the screen-on command, since the display driver and the display screen have started to initialize, there is no need to wait for the initialization to be completed. The display driver immediately returns the initialization completion message to the HWC, and the HWC modifies the global variable "display state" to "on", and triggers the PMS to send the image in advance.

[0019] In a possible implementation, in response to the initialization completion message, the HWC sets the screen state to on, which may include: in response to the initialization completion message, the HWC sets the first global variable to a first flag, where the first flag represents that the screen state is on.

[0020] Exemplarily, the first global variable is "display state". In the off-screen state, the global variable "displaystate" defaults to "off", and "display state off" represents that the display screen is off or powered off. After the display screen is powered on during the initialization phase, the HWC needs to modify the global variable "display state" to "on". "Displaystate on" represents that the display screen is about to be powered on or is already powered on.

[0021] It can be understood that the global variable "display state" is a general interface. Modules such as PMS can determine whether the display screen is powered on by the value of the global variable "display state" being "off" or "on". When PMS reads that the global variable "display state" is set to "on", it can be assumed that initialization has been completed and the display screen is in the powered-on state.

[0022] In a possible implementation, the start time of initializing the display driver and the display screen is earlier than the time when the display driver obtains the screen-on instruction.

[0023] It can be understood that since the starting time of initialization of the display driver and the display screen is earlier than the time when the display driver obtains the screen-on instruction, when the display driver receives the screen-on instruction, the display driver can immediately return an initialization completion message to the HWC, thereby facilitating the HWC to set the global variable "display state" to "on" and start sending images in advance.

[0024] In a possible implementation, the time when the PMS transmits the first event to the display driver through the touch screen driver is earlier than the time when the PMS issues a screen-lighting instruction.

[0025] It can be understood that in the initialization process based on the Android native process, after receiving the event corresponding to the user operation, the PMS first waits for a preset time, then determines the specific type of the event, and only sends the screen-on instruction after determining that the event is a screen-on event, which results in a late start time for the display screen initialization. In the customized initialization process provided by the present application, after receiving the event corresponding to the user operation, the PMS does not need to wait for a preset time, nor does it need to determine the specific type of the event, but immediately sends the event to the TP driver.

[0026] In one possible implementation, in response to the screen status being on, the PMS sends a refresh instruction and backlight parameters to the display driver, which may include: in response to the screen status being on, the PMS sends a refresh instruction to SurfaceFlinger; SurfaceFlinger renders and draws a pattern based on the refresh instruction; HWC synthesizes the drawn pattern and passes the synthesized pattern to the display driver; after the display driver controls the display screen to display the pattern, the PMS sends the backlight parameters to the display driver through SurfaceFlinger and HWC, and the display driver controls the display screen to light up based on the backlight parameters.

[0027] It can be understood that after the display driver and the display screen are initialized, the display screen is already powered on, and the electronic device can send images to the display screen. When the display screen starts to refresh, although the display screen is powered on, the backlight setting is not completed at this moment, so the user's vision is still in a black screen state and the pattern cannot be seen. Therefore, the electronic device can also control the display screen to light up based on parameters so that the user can see the pattern.

[0028] In a second aspect, the present application provides a device, which includes a unit for executing the method in the first aspect. The device may correspond to executing the display control method described in the first aspect. For the relevant description of the unit in the device, please refer to the description of the first aspect, which will not be repeated here for the sake of brevity.

[0029] In a third aspect, the present application provides an electronic device, the electronic device comprising a memory and one or more processors. The memory is used to store computer program code, and the computer program code comprises computer instructions. When the computer instructions are called by the processor, the electronic device executes the display control method provided in any one of the first aspects.

[0030] In a fourth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the display control method provided in the first aspect and any possible implementation thereof.

[0031] In a fifth aspect, the present application provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the display control method provided in the first aspect and any possible implementation thereof.

[0032] In a sixth aspect, the present application provides a chip. The chip is coupled to a memory, and the chip is used to read and execute a computer program stored in the memory to implement the display control method provided in the first aspect and any possible implementation thereof.

[0033] It can be understood that the beneficial effects that can be achieved by the above-mentioned device of the second aspect, the electronic device of the third aspect, the computer-readable storage medium of the fourth aspect, the computer program product of the fifth aspect and the chip of the sixth aspect can be referred to as the beneficial effects in the first aspect and any possible implementation method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic diagram of screen-on / screen-off scenarios performed by an electronic device under different triggering conditions provided in an embodiment of the present application;

[0035] Figure 2 A schematic diagram of an operation of a screen-on scenario provided in an embodiment of the present application;

[0036] Figure 3 A schematic diagram of another screen-lit scenario operation provided in an embodiment of the present application;

[0037] Figure 4 A schematic diagram of another screen-lit scenario operation provided in an embodiment of the present application;

[0038] Figure 5 A schematic diagram of the screen-on process and screen-off process provided in an embodiment of the present application;

[0039] Figure 6 A software structure block diagram of an electronic device provided in an embodiment of the present application;

[0040] Figure 7 This is a timing diagram of the screen lighting process based on the native solution;

[0041] Figure 8 The embodiments of the present application provide Figure 7 A schematic diagram of a specific method flow chart corresponding to the timing diagram;

[0042] Fig. 9 A timing diagram of a display control method provided in an embodiment of the present application;

[0043] Fig.10 The embodiments of the present application provide Fig. 9 A schematic diagram of a specific method flow chart corresponding to the timing diagram;

[0044] Fig.11 A schematic diagram comparing the time consumption of the screen-on process based on the Android native process and the time consumption of the screen-on process provided by this application;

[0045] Fig.12 A timing diagram of a display control method in a sleep-wake-up scenario with an AOD function provided by an embodiment of the present application;

[0046] Fig.13 The embodiments of the present application provide Fig.12 A schematic diagram of a specific method flow chart corresponding to the timing diagram;

[0047] Fig.14 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions 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 only part of the embodiments of the present application, not all of the embodiments.

[0049] In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B. In the description of this application, "and / or" is only a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0050] The terms "first" and "second" in the specification and claims of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects. For example, a first operation and a second operation are used to distinguish different operations, rather than to describe a specific order of operations. In the embodiments of this application, "plurality" refers to two or more.

[0051] 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.

[0052] References to "some embodiments" and the like described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in some embodiments", "in other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0053] With the rapid development of terminal technology, mobile phones, tablet computers and other electronic devices are becoming more and more intelligent and have become indispensable tools for people's lives and work. Take mobile phones as an example. When users are not using their mobile phones, the mobile phone turns off the display backlight, executes the display power-off process, and the display enters the off state, thereby saving power and reducing the power consumption of electronic devices; when users are using their mobile phones, the mobile phone executes the display power-on process, turns on the display backlight, and the display enters the display state, thereby meeting the user's needs to check the time, notifications, etc. through the display.

[0054] In the embodiment of the present application, the screen-off state is also referred to as the black screen state, which means that the backlight is turned off, the display screen is completely powered off, and no content is displayed. The screen-on state means that the display screen is powered on, the backlight is turned on, and content is displayed in all or part of the display screen.

[0055] Combine the following Figure 1 The following examples illustrate the screen turning on and off scenarios executed by electronic devices under different trigger conditions.

[0056] Scenario 1: Normal sleep and wake-up [screen on and off].

[0057] When the display screen is on, the display screen displays content such as the desktop and chat interface. If the user presses the power button set on the electronic device, or the user does not touch the display screen within a preset time, or the user's hand, face or other objects block the sensor set on the inside of the display screen (such as a proximity light sensor or an ultrasonic sensor), or the user approaches the sensor set on the inside of the display screen, the electronic device enters sleep mode, turns off the display backlight, executes the power-off process, and the display screen switches from the on state to the off state.

[0058] When the display screen is off, the electronic device is in sleep mode and nothing is displayed on the display screen. If the user presses the power button set on the electronic device, or the user picks up the electronic device (called a hand-raising operation), or the user single-clicks the display screen, or the user double-clicks the display screen, or the user moves away from the sensor set on the inside of the display screen, or the user's hand, face or other objects unblock the sensor set on the inside of the display screen, the electronic device enters the wake-up mode, executes the power-on process, turns on the display backlight, and displays content on the display screen.

[0059] As an example, Figure 2 As shown, when the display screen is off, if the user wants to use the mobile phone, the user can press the power button set on the electronic device. The mobile phone executes the power-on process, turns on the display backlight, and displays the lock screen interface on the display. After the mobile phone successfully recognizes the user's face through the camera, the mobile phone updates the lock screen interface to the unlock interface. Then, the user can trigger the mobile phone to unlock the display screen by sliding on the display screen. After that, the mobile phone displays the desktop and other interfaces.

[0060] As an example, during a meeting, if the user puts his ear close to the receiver, the proximity light sensor set inside the display screen detects the user's proximity operation, and the mobile phone controls the display screen to turn off to save the phone's power. Figure 3 As shown, the user moves his ear away from the handset. The proximity light sensor detects the user's moving away operation, and the mobile phone performs a power-on process, turns on the display backlight, and displays the conference interface on the display, so that the user can operate the interface.

[0061] Scenario 2: Wake up from sleep mode with the always on display (AOD) function [screen on and off].

[0062] The principle of the off-screen display function is that when the electronic device is off, some pixels of the display screen can be lit up to display information such as the clock, date, battery level, and / or message reminders, while other pixels of the display screen are always off, for example, these off pixels are black, so that users can conveniently view the above information without lighting up the entire display screen of the electronic device, and the power consumption of the electronic device can be reduced. Electronic devices usually turn on the off-screen display function by default.

[0063] For example, the electronic device may support triggering the screen off display in the following scenarios:

[0064] When the display screen is on, the display screen displays content such as the desktop and chat interface. If the user no longer needs to use the display screen, the user can press the power button set on the electronic device. Or if the user does not touch the display screen within a preset time, the electronic device triggers the screen off display, that is, lights up some pixels of the display screen and displays the AOD pattern. For example, the AOD pattern includes information such as clock, date, notification and / or fingerprint unlock pattern, which is convenient for users to view commonly used information, thereby reducing power consumption of the electronic device.

[0065] When the display screen is off, the display screen does not display anything. If the user moves away from the sensor set on the inside of the display screen, or the user's hand, face or other objects unblock the sensor set on the inside of the display screen, the electronic device enters the wake-up mode, executes the power-on process, turns on the display backlight, lights up some pixels of the display screen, and displays the AOD pattern, thereby reducing the power consumption of the electronic device. Then, the user can trigger the mobile phone to unlock the display screen and display the desktop through the fingerprint unlocking operation acting on the display screen.

[0066] For example, the electronic device may support stopping the screen display from being turned off in the following scenarios:

[0067] When the AOD pattern is displayed, if the user presses the power button set on the electronic device, or the user does not touch the display screen within a preset time, or the user's hand, face or other objects block the sensor set on the inside of the display screen, or the user approaches the sensor set on the inside of the display screen, the electronic device turns off the display backlight, executes the power-off process, and the display screen switches to the off state.

[0068] When the AOD pattern is displayed, if the user single-clicks or double-clicks the display screen, the electronic device cancels the AOD pattern and displays the desktop and other contents on the entire display screen.

[0069] Scene 3: Sleep wake-up with fingerprint function [screen on and off] [no screen off display].

[0070] The implementation principle of the fingerprint function is: a fingerprint sensor is set in the fingerprint unlocking area of ​​the display screen, which can read and identify the user's fingerprint information and unlock the display screen after completing the identity authentication.

[0071] When the electronic device does not have the AOD function or the AOD function is turned off, if the display screen is off, the user can click the unlock area with a finger. The fingerprint sensor can read and identify the user's fingerprint information, and directly unlock the display screen and display the desktop after completing the identity authentication.

[0072] Scene 4: Sleep wake-up with fingerprint function [screen on and off] [screen off display].

[0073] As an example, Figure 4 As shown, when the AOD function is turned on in an electronic device, if the display screen is off, the user can click any area of ​​the display screen with a finger, and the electronic device will display an AOD pattern on the display screen. For example, the AOD pattern includes information such as clock, date, and fingerprint icon. The user can press the area where the fingerprint icon is located with a finger, and the fingerprint sensor can read and identify the user's fingerprint information. After completing the identity authentication, the electronic device unlocks the display screen and displays the desktop.

[0074] As an example, when the AOD function of an electronic device is turned on, if the display screen is off, the user can single-click the unlocking area with his finger, and the fingerprint sensor can read and identify the user's fingerprint information. After completing the identity authentication, the electronic device displays the AOD pattern on the display screen. For example, the AOD pattern includes clock, date and other information. The user can trigger the electronic device to display the desktop by single-clicking, double-clicking, sliding, etc.

[0075] It should be noted that the above scenarios 3 and 4 are only examples of some implementation methods of dormancy wakeup with fingerprint function. In actual implementation, you can also refer to Figure 1 Other implementations shown control the on / off of the fingerprint icon or the display screen, which will not be described in detail here.

[0076] Scene 5: Sleep and wake-up in multi-screen collaboration scene [screen on and off].

[0077] The multi-screen collaboration function is a distributed technology. After connecting the mobile phone to the computer or tablet, it can realize cross-system and cross-device resource sharing and collaborative operation.

[0078] Take the example of a mobile phone and a computer establishing a multi-screen collaborative connection based on Bluetooth, near field communication (NFC) or wireless fidelity (Wi-Fi) technology. After the multi-screen collaborative connection is established for a period of time, if the user does not operate the mobile phone and computer for a long time, the mobile phone and computer will enter sleep mode and execute the power-off process. Then, the user can wake up the mobile phone and computer by operating any device and execute the power-on process.

[0079] Scene 6: Sleep and wake up in the projection scene [turn the screen on and off].

[0080] The screen projection function can project the display content of one electronic device to another electronic device.

[0081] Take the example of a mobile phone projecting a video to a TV. After the TV finishes playing a video projected by the mobile phone, if the mobile phone does not project the next video to the TV, the TV will enter sleep mode after a preset time and perform a power-off process to reduce the power consumption of the TV. Then, the user can select the next video on the mobile phone and project it to the TV. The TV will perform a power-on process and start playing the next video.

[0082] The above embodiments introduce the screen-on / off process of the electronic device in 6 scenarios, which does not limit the present application. It is understandable that the electronic device can also perform the screen-on / off process based on various conditions in other scenarios such as the vehicle-machine interaction scenario.

[0083] At present, mobile phone device manufacturers have strict hardware requirements for display integrated circuits (ICs) and modules, as follows:

[0084] 1. There are specification requirements for display timing.

[0085] For example, Figure 5 The display screen lighting process and screen off process are shown.

[0086] like Figure 5 As shown in the figure, when the display screen is in the black screen state, if the screen light condition is met, the mobile phone will sequentially execute the following screen light process: set the three-way power of the display screen vci / vddio / dvdd, enable (reset), initialize the configuration (init code), lock the screen, and turn on the backlight. When the display screen is in the bright screen state, if the screen off condition is met, the mobile phone will sequentially execute the following screen off process: turn off the backlight, initialize the configuration (init code), enable (reset), set the three-way power of the display screen vci / vddio / dvdd, and lock the screen.

[0087] 2. There are specification requirements for the IC parameter configuration of the display screen.

[0088] For example, the configuration parameter requirements of a certain IC provided by a hardware manufacturer are: the initialization configuration requires 170ms in the screen-on process and 150ms in the screen-off process. Different hardware manufacturers may have different IC parameter configuration specification requirements.

[0089] For any of the above screen-on scenarios, the research found that the screen-on process based on the native solution takes too long. Take a display IC chip provided by a hardware manufacturer as an example. Based on the hardware requirements of the IC chip, the display initialization, image refresh and screen-on processes take a long time, which gives users a feeling that the screen is slow to turn on.

[0090] In order to solve the above-mentioned problem of slow screen display, an embodiment of the present application provides a display control method. The method can be applied to an electronic device including a display screen. When the display screen is in the off state and receives the user's screen light operation, the power management service (power manager service, PMS) immediately sends a screen event to the display driver. If the display driver determines that the event is an event that triggers the screen light, it starts to initialize the display driver and the display screen. In addition, when the screen light instruction issued by the PMS reaches the display driver, there is no need to wait for the initialization to end. The display driver directly returns the initialization completion message to the hardware synthesizer (hwcomposer, HWC), and the HWC sets the global variable "display state (screen state)" to "on". In this way, the start time node of the image refresh can be advanced by about 50ms, which ultimately shortens the overall time consumption of the screen light process by about 50ms, and the screen light display becomes faster, which improves the performance of the electronic device and improves the user experience.

[0091] The electronic devices are also referred to as terminals or user equipment (UE). For example, the electronic devices may be personal computers (PC), mobile phones, smart screens, smart TVs, tablet computers (Pad), wearable devices, computers with wireless transceiver functions, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, or wireless terminals in smart homes, etc., or may be other devices or apparatuses equipped with display screens.

[0092] In order to better understand this application, the following Figures 6 to 11 , a comparative description is given of the screen lighting process based on the native solution and the display control method provided in this application.

[0093] For example, Figure 6 It is a software structure block diagram of the electronic device according to an embodiment of the present application.

[0094] 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: the application (APP) layer, the application framework (FWK) layer, the system library (called the Native layer), the hardware abstraction layer (HAL) and the kernel layer. The above software architecture runs on top of the hardware layer. For ease of explanation, Figure 6 The hardware layer that interacts with the above software structure is also reflected in the figure. The hardware layer may include a graphics processing unit (GPU), a display screen, a power button, etc.

[0095] It should be noted that the Android system is an operating system based on Linux. The development of upper-layer applications (such as the application layer and the application framework layer) in the Android system is generally completed based on Java. Since some tasks at the bottom layer (such as the kernel layer) are not easy to implement in Java, when tasks involving local services, link libraries or hardware drivers are involved, it is usually necessary to allow C programs to implement them, and C programs run in the system library. The system library includes an interface for Java to call C++ code.

[0096] The application layer, referred to as the application layer, can include a series of applications, such as multi-screen collaborative applications, AOD applications, etc. When these applications are running, they can access the various service modules provided by the application framework layer through the application programming interface (API) and perform corresponding intelligent services. In addition, the APP layer can also include Android core applications such as the application monitoring process (apTouchDaemon), the desktop launcher (launcher) and the system user interface (systemUI).

[0097] The application framework layer, referred to as the framework layer, can provide APIs and programming frameworks for applications in the application layer. The programming framework includes some pre-defined functions, such as the system service (systemserver) process. The systemserver process can provide almost all system services for the APP in the application layer, such as power management service (powermanager service, PMS), window management service (window manager service, WMS) and input method management service (input manager service, IMS), etc. These system services can reside in the systemserver process in the form of threads. Among them, the power management service module is used to manage the power on and off of the display screen. In addition, the application framework layer can also include an AOD service module and a drawing module. The AOD service module is used to provide off-screen display services for AOD applications, and the drawing module is used to provide AOD patterns for off-screen display.

[0098] The Native layer can include multiple functional modules. For example, the Native layer includes a surface drawing (SurfaceFlinger, SF) service module. The function of the SurfaceFlinger service module is to receive graphic display data from multiple sources, synthesize them, and then send them to the display device. The image display can be completed by multiple classes such as SurfaceFlinger, HWC, display driver and display screen. In addition, the Native layer can also include an input subsystem. The input subsystem is one of the important system services in the Android operating system, which is dedicated to processing various external input signals of input devices. Input devices can include: display screen, power button, keyboard, mouse, etc. Taking the user input as a touch display screen as an example, after the display screen is touched, the corresponding hardware driver (such as input driver) will be triggered. After the input driver receives the touch screen event, the input driver will write the touch screen event to the corresponding input device node, and then the input management service will read the touch screen event from the device node, and then pass the touch screen event to the corresponding activity.

[0099] The HAL layer may include HWC, which has the function or ability to combine and display image data using hardware, providing hardware support for the SurfaceFlinger service.

[0100] The kernel layer is the layer between hardware and software. Its function is to pass the application's request to the hardware. The kernel layer provides the most basic functions of the operating system. Usually the kernel layer provides system services such as process management, interrupt response, memory management, network and inter-process communication. The kernel layer is the layer between hardware and software.

[0101] In some embodiments, the kernel layer may include a display driver. The display driver may be combined with a display integrated circuit or chip (integrated circuit, IC) to jointly control the display function of the display screen. For example, the display driver and the display screen IC, in a combination of software and hardware, jointly implement the off-screen display function. The display driver can also be used to set the backlight parameters of the display screen. Among them, when the backlight parameter of the display screen is set to 0, the display screen is in an off-screen state; when the backlight parameter of the display screen is set to any value in the range of [1, 255], the display screen is in a bright screen state. As an example, the display driver may be a liquid crystal display (LCD) driver.

[0102] In some embodiments, the kernel layer may further include an input driver, which receives touch screen events from a touch screen sensor, or press events from a power button, or distance events from a proximity light sensor, or hand-raising events from a gyroscope sensor, and then reports these events to the PMS.

[0103] In some embodiments, the core layer may further include a touch panel (TP) driver.

[0104] It should be noted that in the screen-on process based on the native solution, PMS sends screen-on instructions to the display driver through SurfaceFlinger and HWC in sequence, and the display driver triggers the display screen to power on and initialize; different from the screen-on process based on the native solution, in the screen-on solution provided in the present application, the display driver includes an event processing module. After PMS receives a touch screen event, a press event, a distance event or a hand-raising event, PMS sends the event to the TP driver, and the TP driver forwards the event to the display driver. The display driver determines whether it is an event that triggers the screen to turn on through the event processing module. If it is determined that the event is an event that triggers the screen to turn on, the display driver and the display screen are controlled to initialize.

[0105] For the sake of convenience, the process of powering on and initializing the display screen is referred to as the initialization process below.

[0106] The hardware layer may include a display screen, and a display screen IC is provided corresponding to the display screen. The hardware layer also includes a touch screen sensor. When a user clicks or touches on the display screen, the touch screen sensor of the display screen can sense the user's touch screen operation and determine that there is a touch screen event. The touch screen sensor of the display screen can send the touch screen event to the TP driver.

[0107] It should be noted that although the embodiments of the present application are described using the Android system as an example, the basic principles are also applicable to electronic devices based on operating systems such as iOS or Windows. Figure 6The layers in the software structure shown and the components contained in each layer do not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more layers than shown. Each layer may include more or fewer components than shown. In addition, the above-mentioned functional modules may also be combined into one functional module, and one functional module may also be composed of multiple functional modules.

[0108] The execution subject of the display control 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 control method, and the present application scheme can be implemented in hardware and / or software, which can be determined according to actual use requirements. The following takes an electronic device as an example and combines the accompanying drawings to exemplarily illustrate the display control method provided in the embodiment of the present application.

[0109] In order to highlight the improvements of this application over the related art, Figure 6 Based on the software architecture provided, the screen lighting process based on the native solution is compared with the timing diagram, specific method flow diagram and time consumption of the display control method provided in this application. Figures 7 and 8 Describe the timing diagram and specific method flow diagram of the screen lighting process based on the native solution, and then combine Figures 9 and 10 Describe the timing diagram and specific method flow chart of the display control method provided by this application, and then combine Fig.11 The time consumption of the two solutions is compared.

[0110] It should be noted that the display control method provided in the present application can be used to solve the problem of long screen light-up process based on native solutions in conventional sleep-wake-up scenarios, sleep-wake-up scenarios with AOD functions, sleep-wake-up scenarios with fingerprint functions, sleep-wake-up scenarios in projection scenarios, sleep-wake-up scenarios in multi-screen collaboration scenarios, sleep-wake-up scenarios in vehicle-computer interaction, or other scenarios.

[0111] Related technology-screen lighting process:

[0112] For example, Figure 7 This is a timing diagram of the screen lighting process based on the native solution.

[0113] like Figure 7 As shown, the screen lighting process based on the native solution can be divided into four stages: the first stage, event reporting; the second stage, initialization; the third stage, image sending; the fourth stage, sending backlight parameters.

[0114] Phase 1: Incident reporting.

[0115] like Figure 7As shown in ①, when the electronic device is in the screen-off state, if the user wants to use the electronic device, the user can turn on the screen of the electronic device, such as pressing the power button, or moving away from the sensor set on the inner side of the display screen, or touching the display screen, etc., then the input driver of the electronic device will report the event corresponding to the screen-on operation to the PMS.

[0116] The second stage is initialization.

[0117] like Figure 7 As shown in ②, after receiving the screen light event, PMS waits for a preset time and then issues a screen light command. The screen light command passes through SurfaceFlinger and HWC in turn to the display driver, and is passed to the display IC by the display driver. After the display driver and the display IC complete initialization, the display driver returns a message to the HWC that initialization has been completed. Based on the message that initialization has been completed, the HWC changes the global variable "display state" from "off" to "on". Among them, when the global variable "display state" is "off", it means that the display is not powered on or has completed initialization; when the global variable "display state" is "on", it means that the display is powered on or has not completed initialization.

[0118] The third stage: sending pictures.

[0119] like Figure 7 As shown in ③, after PMS determines that the display is powered on by setting the global variable "display state" to "on", PMS can send a refresh instruction to SurfaceFlinger. SurfaceFlinger draws the pattern. HWC synthesizes the drawn pattern and sends it to the display driver. The display driver controls the display to refresh the image. It should be noted that when the display starts to refresh the image, since the backlight setting is not completed at this moment, the user's vision is still in a black screen state and the pattern cannot be seen.

[0120] The fourth stage is to issue backlight parameters.

[0121] After the image refresh is completed, the display driver returns a message of image refresh completion to the upper layer (such as PMS), so that Figure 7 As shown in ④, PMS can send backlight parameters based on the message that the image has been refreshed. The backlight parameters are transmitted through SurfaceFlinger and HWC in turn, reach the display driver, and are passed to the display IC by the display driver. The display IC controls the display screen to light up according to the backlight parameters, thereby completing the pattern display.

[0122] In the screen-on process based on the native solution, the process goes through the event reporting stage, initialization stage, image sending stage, and backlight parameter sending stage in sequence. If any of these stages takes a long time, it will affect the start event of the next stage, making the overall screen-on process take a long time. The study found that in the screen-on process based on the native solution, the native process in the initialization stage causes the overall screen-on process to take a long time. Figure 7 Based on the combination Figure 8 Describe the specific cause of the problem.

[0123] For example, Figure 8 For Figure 7 A schematic diagram of the specific method flow chart corresponding to the timing diagram.

[0124] like Figure 8 As shown, the method includes S101 to S107.

[0125] S101, when the display screen is in an off state, the input driver receives a screen-on operation input by a user.

[0126] The above-mentioned screen-off state is also called a black screen state, which means that the backlight is turned off, the display screen is completely powered off, and no content is displayed.

[0127] The above-mentioned screen lighting operation is an operation to trigger the electronic device to light up the screen and display an interface, which may be an unlocking interface, an AOD interface, a desktop or other interface. For example, the user may press the power button, or the user may move away from the sensor disposed inside the display screen, or the user may single-click or double-click the display screen, or the user may raise the hand to operate the electronic device, or the user may wake up the language assistant to light up the screen, etc., and the description of the above-mentioned embodiments may be referred to, and will not be repeated here.

[0128] S102: The input driver reports an event corresponding to the screen-lighting operation to the PMS.

[0129] For example, the screen-on operation is the pressing of the power button. The event corresponding to the screen-on operation is the pressing event of the power button. After the input driver receives the pressing event of the power button, the input driver writes the event to the corresponding input device node, and then the input management service reads the event from the device node and passes the event to the PMS.

[0130] S103, after receiving the event corresponding to the screen-on operation, the PMS waits for a preset time, and if it determines that the event is a screen-on event, it issues a screen-on instruction. The screen-on instruction is transmitted to the display driver through SurfaceFlinger and HWC in sequence.

[0131] The above-mentioned preset duration may be equal to the life cycle duration of the PMS plus the life cycle duration of other modules. Other modules may be other functional modules other than the PMS, such as a lock screen module.

[0132] The input driver can not only report events corresponding to the screen-on operation to the PMS, but also events corresponding to the screen-off operation or other events to the PMS, or the PMS can receive multiple events corresponding to the screen-on operation in a short period of time. In order to ensure the accuracy of the event characterization, after the PMS obtains the reported event from the input driver, the PMS starts timing. After the timing reaches about 20 to 30 milliseconds, if the PMS determines that the event is a screen-on event, it will wait for other modules to complete the processing operation before issuing a screen-on instruction; or, if the PMS determines that the event is a screen-off event, it will wait for other modules to complete the processing operation before issuing a screen-off instruction; or, if the PMS determines that the event is a screen-off event, it will wait for other modules to complete the processing operation before issuing a screen-off instruction; or, if the PMS determines that the event is an accidental touch event, no instruction needs to be issued.

[0133] It should be noted that when the screen-on command reaches HWC through SurfaceFlinger, the global variable "display state" is set to "off", indicating that the display is not powered on. According to the native process of Android, HWC passes the screen-on command to the display driver, and the display driver triggers the initialization of the display.

[0134] S104, in response to the screen light up instruction, the display driver triggers the initialization of the display screen.

[0135] It should be noted that the initialization process of the present application includes: display driver initialization and display screen initialization. After the display driver obtains the screen-on instruction, the display driver is initialized and the display screen is initialized.

[0136] The display driver can respond to the screen light command to trigger the display screen to power on, and then the display driver sends the 11th command to the display screen, where the 11th command is equivalent to the start command, which is used to instruct the display screen IC parameter configuration to be initialized. When the 11th command has been issued, after an interval of 120ms, the display driver sends the 29th command to the display screen, where the 29th command is equivalent to the ready command, which is used to instruct the display screen IC to complete the parameter configuration initialization. It can be understood that after the display screen IC is powered on and initialized, the display screen IC is ready to execute the display tasks issued by the display driver, such as lighting the screen and displaying content.

[0137] S105, after completing the initialization, the display driver returns a message indicating that the initialization has been completed to the HWC, and the HWC modifies the global variable "display state" to "on" based on the message.

[0138] Usually, it takes a long time to initialize the display screen, for example, it takes about 120ms. After the display driver sends the 11 instruction to the display screen, the display driver starts timing and determines whether the timing duration reaches 120ms. If the timing duration does not reach 120ms (that is, the timing duration is less than 120ms), the display driver continues to wait. If the timing duration reaches 120ms (that is, the timing duration is greater than or equal to 120ms), the display driver sends the 29 instruction to the display screen IC and returns a message to the HWC that the initialization has been completed.

[0139] The global variable "display state" is a common interface. By setting the global variable "display state", related applications or functional modules can be conveniently informed of the status of the display screen. In the screen-off state, the global variable "display state" defaults to "off", and "display state off" means that the display screen is off or powered off. In the screen-lighting process based on related technologies, during the display initialization phase, if the display driver returns a message to the HWC that initialization has been completed, the HWC modifies the global variable "display state" to "on", that is, "display state on" means that the display screen has entered the powered-on state. Modules such as PMS can determine whether the display screen is powered on by the value of the global variable "display state". When PMS reads that the global variable "display state" is set to "on", it can be determined that the display screen is in the powered-on state.

[0140] S106, PMS notifies the display driver to refresh the image through SurfaceFlinger and HWC. The display driver controls the display screen to refresh the image.

[0141] Specifically, PMS sends a refresh instruction to SurfaceFlinger. SurfaceFlinger renders and draws patterns based on the refresh instruction. HWC synthesizes the drawn pattern and passes the synthesized pattern to the display driver. The display driver controls the display screen to display the pattern, that is, the display screen starts to refresh. It can be understood that in different screen-on scenarios, the pattern sent by PMS may be different. For example, in a regular sleep wake-up scenario, the unlock interface includes the following: Figure 2 The status bar, wallpaper, time, swipe up to unlock, and other information shown. For example, in the video call wake-up scenario, the conference interface includes the following Figure 3 The status bar, avatar, meeting time, chat content and other information shown. For another example, in the sleep wake-up light-off screen with the screen-off display function, the AOD pattern can include the following: Figure 4 The clock, date and fingerprint pattern information shown.

[0142] It should be noted that when the display starts to refresh, although the display is powered on, the backlight setting is not completed at this moment. Therefore, from the user's perspective, the display is still in a black screen state and the pattern cannot be seen.

[0143] S107, after the image is refreshed, the PMS sends backlight parameters to the display driver through SurfaceFlinger and HWC. The display driver controls the display screen to light up based on the backlight parameters.

[0144] Specifically, after the image refresh is completed, the display driver can return an "OK" message to the upper layer (such as PMS), which is used to indicate that the image refresh has been completed. Based on this message, the PMS can send backlight parameters to control the display screen to light up, thereby lighting up the screen. At this moment, the user can see the pattern on the display screen.

[0145] The above backlight parameters are used to light up all or part of the display screen. For example, in a regular sleep wake-up scenario, the entire display screen can be lit up. For another example, in a sleep wake-up with a screen-off display function, only the display area that needs to display a pattern can be lit up.

[0146] Based on the above analysis, it can be seen that in the screen-on process based on the native solution, the following reasons cause the overall screen-on process to take a long time: on the one hand, after receiving the screen-on event, the PMS needs to wait for a preset time before issuing the screen-on command, which makes the start time of the display initialization late; on the other hand, the display initialization usually takes a long time. After the display is initialized, the HWC will change the global variable "display state" to "on", which affects the start time of sending pictures, making the overall screen-on process take a long time. From the user's perspective, it may take a long time to see the display screen turn on after pressing the power button, and during this time the display screen is in a black screen state, so the user feels that the operation waiting time is long, which reduces the operation experience when the screen is turned on.

[0147] In view of the above problems, the embodiment of the present application improves the screen-on process based on the native solution and provides an optimized display control method. In this method, after the PMS receives the event corresponding to the screen-on operation, the PMS executes two processes in parallel: one process is that the PMS immediately sends a screen event to the display driver. If the display driver determines that the event is an event that triggers the screen-on, it starts to initialize the display driver and the display screen; the other process is that the PMS waits for a preset time according to the Android native process. If the event is determined to be a screen-on event, a screen-on instruction is issued. When the screen-on instruction reaches the display driver through SurfaceFlinger and HWC, there is no need to wait for the initialization to be completed. The display driver immediately returns an initialization completion message to the HWC, and the HWC modifies the global variable "display state" to "on" and triggers the PMS to send the picture in advance. In this way, the starting time node of the picture refresh can be advanced by about 50ms, which ultimately shortens the overall time consumption of the screen-on process by about 50ms, and the screen display becomes faster, which improves the performance of the electronic device and the user experience.

[0148] This application-screen lighting process:

[0149] For example, Fig. 9 It is a timing diagram of the display control method provided in an embodiment of the present application.

[0150] like Fig. 9 As shown, the screen lighting process provided in the embodiment of the present application can be divided into four stages: the first stage, event reporting; the second stage, initialization; the third stage, image sending; and the fourth stage, sending backlight parameters.

[0151] Phase 1: Incident reporting.

[0152] like Fig. 9 As shown in ①, when the electronic device is in the screen-off state, if the user wants to use the electronic device, the user can turn on the screen of the electronic device, such as pressing the power button, or moving away from the sensor set on the inner side of the display screen, or touching the display screen, etc., then the input driver of the electronic device will report the event corresponding to the screen-on operation to the PMS.

[0153] The second stage is initialization.

[0154] The initialization phase includes two parallel execution processes: process ② and process ③.

[0155] like Fig. 9As shown in ②, after the PMS receives the event corresponding to the screen-on operation (referred to as the screen-on event), the PMS immediately sends the screen event to the TP driver, and the TP driver passes the event to the display driver. If the display driver determines that the event is a screen-on event through the internal event processing module, the display driver starts to initialize the display driver and the display screen.

[0156] like Fig. 9 As shown in ③, after receiving the event corresponding to the screen-on operation, PMS waits for a preset time and then issues a screen-on command. The screen-on command reaches the display driver through SurfaceFlinger and HWC. When the screen-on command reaches the display driver, the display driver is already in the initialization process and there is no need to wait for the initialization to be completed. The display driver immediately returns an initialization completion message to the HWC, and the HWC changes the global variable "display state" to "on". It can be understood that since PMS can read in advance that the global variable "display state" has been set to "on", PMS can send the image in advance without having to wait for the display to complete initialization before starting to send the image.

[0157] The third stage: sending pictures.

[0158] like Fig. 9 As shown in ④, after PMS determines that the display is powered on by setting the global variable "display state" to "on", PMS can send a refresh instruction to SurfaceFlinger. SurfaceFlinger draws the pattern. HWC synthesizes the drawn pattern and sends it to the display driver. The display driver controls the display screen to refresh the image. It should be noted that when the display screen starts to refresh the image, since the backlight setting is not completed at this moment, the user's vision is still in a black screen state and the pattern cannot be seen.

[0159] The fourth stage is to issue backlight parameters.

[0160] After the image refresh is completed, the display driver returns a message of image refresh completion to the upper layer (such as PMS), so that Fig. 9 As shown in ⑤, PMS can send backlight parameters based on the message that the image has been refreshed. The backlight parameters are transmitted through SurfaceFlinger and HWC in turn, reach the display driver, and are transmitted to the display IC by the display driver. The display IC controls the display screen to light up according to the backlight parameters, thereby completing the pattern display.

[0161] In the screen-on process provided in the embodiment of the present application, the event reporting stage, initialization stage, image sending stage and backlight parameter sending stage are sequentially experienced. Since the initialization stage includes two parallel execution processes, the time consumption of the initialization stage is shortened, and the overall screen-on process consumption is shortened by about 50ms. Fig. 9 Based on the combination Fig.10 Explain the specific reasons for reducing the time consumption.

[0162] For example, Fig.10 For Fig. 9 A schematic diagram of the specific method flow chart corresponding to the timing diagram.

[0163] like Fig.10 As shown, the method includes S201 to S211.

[0164] S201, when the display screen is in an off state, the input driver receives a screen-on operation input by a user.

[0165] For the implementation of S201, reference may be made to the description of S101 in the above embodiment, which will not be repeated here.

[0166] S202: The input driver reports an event corresponding to the screen-lighting operation (referred to as a first event) to the PMS.

[0167] For example, if the screen-on operation is a power button press operation, the event corresponding to the screen-on operation is a power button press event. After the input driver receives the power button press event, the input driver writes the event to the corresponding input device node, and then the input management service reads the event from the device node and passes the event up layer by layer until it reaches the PMS.

[0168] Referring to the description of S103 to S105 in the above embodiment, after the PMS receives the first event, the electronic device will execute the initialization process based on the Android native process. Different from the screen-on process based on the native solution, in the optimized display control method provided by the present application, the PMS executes two processes in parallel: one is the initialization process based on the Android native process, as shown in S207 to S209; the other is the customized initialization process provided by the present application, as shown in S203 to S206.

[0169] S203: After receiving the first event, the PMS immediately sends the first event to the TP driver of the kernel layer.

[0170] Referring to the description of S103 in the above embodiment, in the initialization process based on the Android native process, after receiving the first event, the PMS first waits for a preset time, and then determines the specific type of the first event. Only when it is determined that the first event is a screen-on event, the screen-on instruction is issued, which results in a late start time of display initialization. In the customized initialization process provided by the present application, after receiving the event corresponding to the screen-on operation, the PMS immediately issues the event to the TP driver.

[0171] It should be noted that the "immediately" in "the PMS immediately sends the first event to the TP driver of the kernel layer" can be interpreted as a very short time interval from the PMS receiving the event to sending the event to the TP driver. For example, the time interval is less than the first duration, and the first duration is much less than the life cycle duration of the PMS. For example, the life cycle duration of the PMS is about 20 to 30 milliseconds, and the first duration can be 1ms.

[0172] S204: The TP driver forwards the first event to the display driver of the kernel layer.

[0173] After the TP driver receives the first event sent by the PMS, the TP driver transmits the first event to the display driver through the interface thp_lcd_status_notifier(), and then the display driver determines whether the first event is a screen-on event.

[0174] The above S202 to S204 are an implementation method provided by the present application for notifying the display driver of the first event. In actual implementation, the electronic device may also use other implementation methods to notify the display driver of the first event. For example, after the input driver reports the first event to the PMS, the PMS directly sends the first event to the display driver without going through the TP driver. For another example, after the input driver receives the screen-on operation input by the user, the input driver directly notifies the display driver of the first event without going through the PMS and TP driver.

[0175] S205: The display driver determines whether the first event is a screen-on event.

[0176] The display driver can call the interface panel_thp_notify_lcd_by_typer() to receive and process the first event to determine whether the first event is a screen-on event. If the first event is a screen-on event, the display driver executes the following S206. If the first event is not a screen-on event, the display driver executes other processes. For example, when the first event is a screen-off event, the display driver notifies the HWC to execute the screen-off process.

[0177] S206: The display driver initializes the display driver and the display screen.

[0178] Specifically, the display driver can call the interface lcdkit_event_panel_on through the interface panel_thp_notify_pwr() to process the screen-on event. Then, the display driver can initialize the display driver and trigger the initialization of the display screen (panel).

[0179] Exemplarily, the display driver can trigger the display screen to power on, and then the display driver sends 11 instructions to the display screen to instruct the display screen IC parameter configuration to be initialized. When the 11 instructions have been sent, after an interval of 120ms, the display driver sends 29 instructions to the display screen to instruct the display screen IC to complete the parameter configuration initialization.

[0180] The difference between the initialization process based on the Android native process and the custom initialization process provided in the present application is that: referring to the description of S104, in the initialization process based on the Android native process, the HWC will initialize the display driver and the display screen based on the Android native program; and referring to the description of S206, in the custom initialization process provided in the present application, after the display driver determines the screen-on event, it does not call the Android native program through the HWC, but initializes the display driver and the display screen based on the custom program.

[0181] It should be noted that in order to reduce the probability of errors or failures when the display driver is initialized based on a custom program, the present application needs to initialize all drivers related to the display driver.

[0182] S207, after receiving the first event, the PMS waits for a preset time, and if it is determined that the first event is a screen-on event, the PMS issues a screen-on instruction, which is sequentially transmitted through SurfaceFlinger and HWC to the display driver.

[0183] The above-mentioned preset duration may be equal to the life cycle duration of the PMS plus the life cycle duration of other modules. Other modules may be other functional modules other than the PMS, such as a lock screen module.

[0184] The input driver can not only report the first event to the PMS, but also report events corresponding to the screen-off operation or other events to the PMS, or the PMS can receive multiple events corresponding to the screen-on operation in a short period of time. In order to ensure the accuracy of the event characterization, after the PMS obtains the first event reported by the input driver, the PMS starts timing. After the timing reaches about 20 to 30 milliseconds, if the PMS determines that the first event is a screen-on event, it waits for other modules to complete the processing operation before issuing a screen-on instruction; or, if the PMS determines that the first event is a screen-off event, it waits for other modules to complete the processing operation before issuing a screen-off instruction; or, if the PMS determines that the first event is a screen-off event, it waits for other modules to complete the processing operation before issuing a screen-off instruction; or, if the PMS determines that the first event is an accidental touch event, no instruction needs to be issued.

[0185] S208, in response to the screen light up instruction, the display driver reports an initialization completion message to the HWC.

[0186] S209, HWC sets the global variable "display state" to "on" based on the initialization completion message.

[0187] In the Android native process, it usually takes time a from when the PMS receives the first event to when the screen-on instruction reaches the display driver, that is, S207 takes time a; in the screen-on solution provided in the present application, it usually takes time b from when the PMS receives the first event to when the display driver and the display screen start to initialize, that is, it takes time b from S204 to S206. Since time b is less than time a, when the screen-on instruction in S209 is passed through SurfaceFlinger and HWC to reach the display driver, the display driver and the display screen have already started to initialize. The display driver does not need to wait for the initialization to be completed, and can immediately return an initialization completion message to the HWC, and the HWC changes the global variable "display state" to "on".

[0188] Referring to the description of the above embodiment S105, the global variable "display state" is a universal interface. In the screen-on process based on the relevant technology, during the display screen initialization phase, if the display driver returns a message to the HWC that the initialization has been completed, the HWC modifies the global variable "display state" to "on", that is, "display state on" represents that the display screen has entered the power-on state. Different from the screen-on process based on the relevant technology, in the custom initialization process provided in the present application, after the screen-on instruction reaches the display driver, in response to the display driver having started initialization, the display driver immediately reports an initialization completion message to the HWC without waiting for the initialization to be completed, so that the HWC can respond to the initialization completion message and set the global variable "display state" to "on". "Display state on" has two meanings: one meaning is that "display state on" represents that the display screen is being powered on or is about to complete initialization; the other meaning is that "displaystate on" represents that the display screen has entered the power-on state or has completed initialization. Regardless of the meaning of "display state on", when the PMS and other modules read the global variable "display state" as "on", the display screen can be assumed to be in the power-on state and trigger the subsequent image refresh process and screen light process.

[0189] The PMS can determine whether the display screen is powered on by whether the value of the global variable "display state" is "off" or "on". When the PMS reads that the global variable "display state" is "on", the display screen can be assumed to be powered on and the following S210 is executed.

[0190] S210, PMS notifies the display driver to refresh the image through SurfaceFlinger and HWC. The display driver controls the display screen to refresh the image.

[0191] Specifically, PMS sends a refresh instruction to SurfaceFlinger. SurfaceFlinger renders and draws the pattern based on the refresh instruction. HWC synthesizes the drawn pattern and passes the synthesized pattern to the display driver. The display driver controls the display screen to display the pattern, that is, the display screen starts to refresh the image.

[0192] For the implementation of S210, reference may be made to the description of S106 in the above embodiment, which will not be repeated here.

[0193] S211, after completing the image refresh, PMS sends backlight parameters to the display driver through SurfaceFlinger and HWC. The display driver controls the display screen to light up based on the backlight parameters.

[0194] For the implementation of S211, reference may be made to the description of S107 in the above embodiment, which will not be repeated here.

[0195] Based on the above analysis, it can be known that in the screen-lighting process provided by the present application, after PMS receives the event corresponding to the screen-lighting operation, PMS executes two processes in parallel: one process is that PMS immediately sends the event to the display driver. If the display driver determines that the event is an event that triggers the screen-lighting, it starts to initialize the display driver and the display screen, so that the start time of initialization is advanced; the other process is that PMS waits for a preset time according to the Android native process. If it is determined that the event is a screen-lighting event, it sends a screen-lighting instruction. When the screen-lighting instruction reaches the display driver through SurfaceFlinger and HWC, there is no need to wait for the initialization to be completed. The display driver immediately returns an initialization completion message to HWC, and HWC modifies the global variable "display state" to "on", and triggers PMS to send the image in advance. In this way, the starting time node of the image refresh can be advanced by about 50ms, which ultimately shortens the overall time consumption of the screen-lighting process by about 50ms, and the screen-lighting display becomes faster, which improves the performance of the electronic device and the user experience.

[0196] Combine the following Fig.11, a comparative description is given of the time consumption of the screen-on process based on the Android native process and the time consumption of the screen-on process provided by this application.

[0197] like Fig.11 As shown, in the schematic diagram of the time-consuming situation of the screen-on process based on the Android native process, the execution actions of some modules in the software layer and the hardware layer at the critical moment are shown. At time t1, the user presses the power button, at time t2, the input driver reports the event corresponding to the pressing operation to the PMS, at time t5, the PMS sends a screen-on instruction, at time t6, the HWC passes the screen-on instruction to the display driver, at time t9, the display driver determines that the initialization is completed so that the upper layer (such as PMS) starts to refresh the picture, and at time t10, the picture is refreshed so that the upper layer (such as PMS) starts to send backlight parameters. Among them, from time t2 to time t5 is called the preset duration. It can be seen that in the initialization process based on the Android native process, each step is executed sequentially, and it takes a long time from time t2 to time t5 and from time t6 to time t9, which makes the time t9 when the picture is sent later, so that the overall process of the screen-on process takes a long time.

[0198] like Fig.11 As shown, the schematic diagram of the time consumption of the screen-on process provided in the present application shows the execution actions of some modules in the software layer and the hardware layer at the critical moment. At time t1, the user presses the power button, at time t2, the input driver reports the event corresponding to the pressing operation to the PMS, at time t3, the PMS sends the event corresponding to the pressing operation to the TP driver, between time t3 and time t4, the display driver determines that the event is a screen-on event, at time t4, the display driver starts to initialize, at time t5, the PMS sends a screen-on instruction, at time t6, the screen-on instruction reaches the display driver, at time t7, the HWC sets the global variable "display state" to "on", at time t7, the PMS sends a pattern, at time t8, the display driver determines that the image refresh is completed, so that the upper layer (such as PMS) starts to send backlight parameters.

[0199] In addition, in the schematic diagram of the time consumption of the screen-on process based on the Android native process and in the schematic diagram of the time consumption of the screen-on process provided in this application, a progress bar for representing the display screen status is shown. Fig.11As shown, both progress bars include four states: black screen, initialization, image refresh and screen on. Specifically, before the display driver starts to control the initialization of the display screen, the display screen is in a black screen state; from the time the display driver starts to control the initialization of the display screen to the time the display driver starts to control the image refresh of the display screen, the display screen is in an initialization state; from the time the display driver starts to control the image refresh of the display screen to the time the display driver starts to control the screen on the display screen, the display screen is in an image refresh state; for a period of time after the display driver starts to control the screen on the display screen, the display screen is in an image refresh state. It can be understood that it takes some time for the screen-on instructions, events, notifications or parameters issued by the FWK layer to reach the display screen IC. Before the content used to trigger the display screen to enter the next stage reaches the display screen IC, the state of the display screen has not changed. For example, in the screen-on process based on the Android native process: at time t5, PMS issues a screen-on instruction, but the display screen is still in the black screen stage; at time t9, PMS starts to refresh the image, but the display screen is still in the initialization stage; at time t10, PMS starts to issue backlight parameters, but the display screen is still in the image refresh stage.

[0200] Combined with the above description, it can be seen that in the screen-on process provided by the present application, after PMS receives the event corresponding to the screen-on operation, PMS executes two processes in parallel: one is an initialization process based on the Android native process, and the other is a custom initialization process provided by the present application. On the one hand, the moment t4 when the display driver starts initialization in the screen-on process provided by the present application is earlier than the moment t6 when the screen-on instruction reaches the display driver in the screen-on process provided by the present application and in the screen-on process based on the Android native process, so the moment when the display starts power-on initialization is advanced (t6-t4). On the other hand, in the screen-on process provided by the present application, since the display driver has started initialization before the moment t6, when the screen-on instruction reaches the display driver at the moment t6, there is no need to wait for the initialization to be completed, and the display driver immediately returns the initialization completion message to the HWC, and the HWC modifies the global variable "display state" to "on", and triggers the PMS to send the picture in advance, which makes the moment t7 when the PMS sends the pattern in the screen-on process provided by the present application earlier than the moment t9 when the PMS sends the pattern in the screen-on process based on the Android native process, so that the moment of starting to brush the picture is advanced (t9-t7).

[0201] After verification by experimental data, the screen-lighting process provided in this application can advance the starting time node of the image refresh by about 50ms, and ultimately shorten the overall time consumption of the screen-lighting process by about 50ms. The screen display becomes faster, which improves the performance of the electronic device and improves the user experience.

[0202] With reference to the description of the above embodiments, the display control method provided by the present application can be used in various scenarios. The following will take the sleep wake-up scenario with the AOD function as an example to introduce the specific screen lighting process in this scenario.

[0203] For example, Fig.12 This is a timing diagram of the display control method in the sleep-wake-up scenario with the AOD function provided by the embodiment of the present application. In the sleep-wake-up scenario with the AOD function, the AOD is started first when the screen is turned on, and then the AOD application sends the screen-off display pattern (referred to as the AOD pattern) and the AOD backlight parameters (referred to as the AOD backlight).

[0204] like Fig.12 As shown, in the sleep and wake-up scenario with AOD function, the screen light-up process provided by the embodiment of the present application can be divided into five stages: the first stage, event reporting; the second stage, initialization; the third stage, AOD startup; the fourth stage, picture sending; the fifth stage, sending backlight parameters.

[0205] Phase 1: Incident reporting.

[0206] like Fig.12 As shown in ①, when the electronic device is in the screen-off state, if the user wants to use the electronic device, the user can turn on the screen of the electronic device. Then, the input driver of the electronic device will sense the event corresponding to the screen-on operation and report the screen-on event to the PMS and AOD applications respectively.

[0207] The second stage is initialization.

[0208] The initialization phase includes two parallel execution processes: process ② and process ③.

[0209] like Fig.12 As shown in ②, after the PMS receives the event corresponding to the screen-on operation, the PMS immediately sends the screen event to the TP driver, and the TP driver passes the event to the display driver. If the display driver determines that the event is a screen-on event through the internal event processing module, the display driver initializes the display driver and the display screen.

[0210] like Fig.12As shown in ③, after PMS receives the event corresponding to the screen-on operation, PMS waits for a preset time and then issues a screen-on command. The screen-on command reaches the display driver through SurfaceFlinger and HWC. When the screen-on command reaches the display driver, the display driver is already in the initialization process and there is no need to wait for the initialization to be completed. The display driver immediately returns an initialization completion message to HWC, and HWC changes the global variable "display state" to "on". It can be understood that since PMS can read in advance that the global variable "display state" has been set to "on", PMS can send the image in advance without having to wait for the display to complete initialization before starting to send the image.

[0211] The third stage: AOD is launched.

[0212] like Fig.12 As shown in ④, after the AOD application receives the screen-on event, the AOD application sends an AOD startup command. The screen-on command passes through PMS and SurfaceFlinger to HWC in turn. HWC determines whether the display has completed initialization based on the global variable "display state". If the global variable "display state" is set to "on", HWC can determine that the display has completed initialization, and report the completed initialization message to the AOD application through SurfaceFlinger and PMS.

[0213] It should be noted that, since the events in ① are reported to the PMS and AOD applications almost simultaneously, the initialization phase and the AOD phase are executed in parallel.

[0214] The fourth stage: sending pictures.

[0215] like Fig.12 As shown in ⑤, after the display is powered on by setting the global variable "display state" to "on", the AOD application can send the AOD refresh command to SurfaceFlinger through PMS. SurfaceFlinger draws the pattern. HWC synthesizes the drawn pattern and sends it to the display driver. The display driver controls the display screen to refresh the image.

[0216] The fifth stage is to issue backlight parameters.

[0217] After the image refresh is completed, the display driver returns a message of image refresh completion to the upper layer (such as PMS and AOD application), so that Fig.12As shown in ⑥, the AOD application can send the AOD backlight parameters through the PMS based on the message that the image has been refreshed. The backlight parameters are transmitted through SurfaceFlinger and HWC in turn, reach the display driver, and are passed to the display IC by the display driver. The display IC controls the display screen to light up according to the backlight parameters, thereby completing the pattern display.

[0218] For example, Fig.13 For Fig.12 A schematic diagram of the specific method flow chart corresponding to the timing diagram.

[0219] like Fig.13 As shown, the method includes S301 to S312.

[0220] S301, when the display screen is in an off state, the input driver receives a screen-on operation input by a user.

[0221] For the implementation of S301, reference may be made to the description of S101 in the above embodiment, which will not be repeated here.

[0222] S302: The input driver reports an event (which may be referred to as a first event) corresponding to the screen-lighting operation to the PMS and the AOD application.

[0223] The difference from 202 is that in S302, the input driver not only reports the event corresponding to the screen-on operation to the PMS, but also reports the event to the AOD application. Since the present application can implement the initialization process (i.e., S303 to S309 described below) and the AOD startup process (i.e., S310 described below) in parallel, the overall time consumption of the screen-off display process is reduced.

[0224] For the initialization process, PMS will also execute two processes in parallel: one is an initialization process based on the Android native process, as shown in S307 to S309; ​​the other is a customized initialization process provided by this application, as shown in S303 to S306.

[0225] S303: After receiving the event corresponding to the screen light up operation, the PMS immediately sends the event corresponding to the screen light up operation to the TP driver of the kernel layer.

[0226] S304: The TP driver forwards the event corresponding to the screen light operation to the display driver of the kernel layer.

[0227] S305: The display driver determines whether the event is a screen-on event.

[0228] S306: If it is a screen-on event, the display driver initializes the display driver and the display screen.

[0229] S307, after receiving the event corresponding to the screen-on operation, the PMS waits for a preset time, and if it is determined that the event is a screen-on event, the PMS issues a screen-on instruction. The screen-on instruction is transmitted to the display driver through SurfaceFlinger and HWC in sequence.

[0230] S308, in response to the screen light up instruction, the display driver reports an initialization completion message to the HWC.

[0231] S309, HWC sets the global variable "display state" to "on" based on the initialization completion message.

[0232] For the specific implementation of S303 to S309, reference may be made to the description of S203 to S209 in the above embodiment.

[0233] S310, the AOD application sends an AOD startup instruction to the HWC through the PMS and SurfaceFlinger. The HWC determines whether the display screen has completed initialization based on the global variable "display state". If the global variable "display state" is set to "on", the HWC reports the startup completion message to the AOD application through SurfaceFlinger and PMS.

[0234] It should be noted that when the AOD start command reaches the HWC, the display screen may still be in the initialization process.

[0235] S311, the AOD application notifies the display driver to refresh the image through PMS, SurfaceFlinger, and HWC. The display driver controls the display screen to refresh the image.

[0236] Specifically, the AOD application sends an AOD refresh instruction to SurfaceFlinger through PMS. SurfaceFlinger renders and draws the AOD pattern based on the AOD refresh instruction. HWC synthesizes the drawn AOD pattern and passes the synthesized AOD pattern to the display driver. The display driver controls the display screen to display the AOD pattern, that is, the display screen starts to refresh.

[0237] For the implementation of S311, reference may be made to the description of S106 in the above embodiment, which will not be repeated here.

[0238] S312, after the image is refreshed, the AOD application sends backlight parameters to the display driver through PMS, SurfaceFlinger, and HWC. The display driver controls the display screen to light up based on the backlight parameters.

[0239] For the implementation of S312, reference may be made to the description of S107 and S211 in the above embodiments, which will not be repeated here.

[0240] For example, Fig.14 The hardware structure diagram of an electronic device provided in an embodiment of the present application is shown in FIG. Fig.14 As shown, 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. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L and a bone conduction sensor 180M, etc.

[0241] 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 processor (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. For example, the processor 110 is used to execute the display control method in the embodiment of the present application.

[0242] 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.

[0243] 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.

[0244] 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.

[0245] 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.

[0246] 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.

[0247] The touch sensor 180K is also called a "touch panel" or a touch screen 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.

[0248] 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.

[0249] 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 a light-on state, if the user presses the power button, the display screen state changes from the light-on state to the light-off state.

[0250] 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.

[0251] 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.

[0252] 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.

[0253] 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.

[0254] This embodiment further 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 control method in the above-mentioned embodiment.

[0255] 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 control method in the above-mentioned embodiment.

[0256] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer 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 control method in the above-mentioned method embodiments.

[0257] 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.

[0258] 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.

[0259] 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 control method, characterized in that: The method is applied to an electronic device, the electronic device includes a display screen and a processor, the processor includes a power management service PMS, a display driver and a hardware synthesizer HWC, and the method includes: When the display screen is in the off state, receiving user operations; In response to the user operation, the PMS sends a first event to the display driver; In response to the first event being a screen-on event, the display driver initializes the display screen; The PMS sends a screen-lighting instruction to the display driver; In response to the screen-on instruction, the display driver returns an initialization completion message to the HWC; In response to the initialization completion message, the HWC sets the screen state to on; In response to the screen status being turned on, the PMS sends a refresh instruction and backlight parameters to the display driver.

2. The method according to claim 1, characterized in that The processor further includes an input driver; in response to the user operation, the PMS sends a first event to the display driver, including: In response to the user operation, the input driver reports the first event corresponding to the user operation to the PMS; After receiving the first event, the PMS immediately sends the first event to the display driver.

3. The method according to claim 2, characterized in that The processor also includes a touch screen driver; The PMS immediately sends the first event to the display driver, including: The PMS immediately sends the first event to the touch screen driver; The touch screen driver transmits the first event to the display driver.

4. The method according to claim 2, characterized in that: The method further comprises: After receiving the first event, the PMS starts timing; In response to the timing duration reaching a preset duration and the first event being the screen-on event, the PMS issues the screen-on instruction.

5. The method according to claim 4, characterized in that The processor also includes a surface drawing service module SurfaceFlinger, and the screen-on instruction is transmitted to the display driver via the SurfaceFlinger and the HWC.

6. The method according to any one of claims 1 to 5, characterized in that In response to the screen-on instruction, the display driver returns an initialization completion message to the HWC, including: In response to the screen-on instruction, and the display driver and the display screen have started initialization, the display driver immediately returns the initialization completion message to the HWC.

7. The method according to claim 6, characterized in that The time when the display driver returns the initialization completion message to the HWC is earlier than the time when the display driver and the display screen complete the initialization.

8. The method according to any one of claims 1 to 7, characterized in that In response to the initialization completion message, the HWC sets the screen state to on, including: In response to the initialization completion message, the HWC sets a first global variable to a first flag, where the first flag represents that the screen status is on.

9. The method according to any one of claims 1 to 8, characterized in that The start time of initialization of the display driver and the display screen is earlier than the time when the display driver obtains the screen-lighting instruction.

10. The method according to any one of claims 1 to 9, characterized in that The time when the PMS sends the first event to the display driver is earlier than the time when the PMS sends the screen-lighting instruction.

11. The method according to any one of claims 1 to 10, characterized in that In response to the screen state being turned on, the PMS sends a refresh instruction and backlight parameters to the display driver, including: In response to the screen state being turned on, the PMS sends a refresh instruction to SurfaceFlinger; The SurfaceFlinger renders and draws a pattern based on the brush instruction; The HWC synthesizes the drawn pattern and transmits the synthesized pattern to the display driver; The display driver controls the display screen to display the pattern; After the display driver controls the display screen to display the pattern, the PMS sends backlight parameters to the display driver through the SurfaceFlinger and the HWC; The display driver controls the display screen to light up based on the backlight parameters.

12. The method according to any one of claims 1 to 11, characterized in that The user operation is a screen-lighting operation.

13. The method according to claim 12, characterized in that The screen lighting operation includes pressing the power button on the electronic device, raising the hand, single-clicking the display screen, double-clicking the display screen, moving away from the sensor set on the inner side of the display screen, or unblocking the sensor set on the inner side of the display screen.

14. 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 configured to execute the computer program so that the electronic device implements the method according to any one of claims 1 to 13.

15. 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 13.

Citation Information

Patent Citations

  • Screen brightening method and relevant equipment

    CN108762814A

  • Face unlocking initialization method and device and computer readable storage medium

    CN110413330A

  • Screen-off control method, terminal device, storage medium and program product

    CN116263650A

  • Screen-on control method, electronic equipment and computer readable storage medium

    CN117008854A

  • Method for controlling screen-off display, electronic equipment and storage medium

    CN117707320A

Cited By

  • Device control method, storage medium, main control device and device control system

    CN120743077A