Screen-on processing method and device, chip, electronic equipment and medium
By performing state switching and parallel processing of image drawing and backlight brightness distribution when the device requests screen lighting, the problem of long screen lighting time is solved, resulting in a faster screen lighting process and improved user experience.
Patent Information
- Application Number
- CN202511332710.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2026-01-13
AI Technical Summary
The device takes a long time to light up after the user presses the power button, resulting in a poor user experience.
By performing state switching processing in advance after receiving a device screen-on request, and switching the screen state parameters to the on state before the alignment process is completed, parallel processing of the upper and lower layers is achieved, including drawing images and sending backlight brightness.
It shortens the device's screen-on time, optimizes screen-on performance, and improves the user experience.
Smart Images

Figure CN121326421A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application filed with the Chinese Patent Office with application number 202410486749.5, application date April 22, 2024, entitled "Screen Brightness Processing Method, Apparatus, Chip, Electronic Device and Medium". Technical Field
[0002] This application relates to the field of electronic equipment technology, and in particular to a screen-on processing method, apparatus, chip, electronic device and medium. Background Technology
[0003] When the device system is in sleep mode, the device screen is off and displays a black screen. Users can wake up the device system by pressing the power button or other operations, and the device screen will light up and display the displayed information.
[0004] Currently, after a user performs operations such as pressing the power button, the device takes a relatively long time to turn on the screen, resulting in a poor user experience. Summary of the Invention
[0005] This application provides a screen-on processing method, apparatus, chip, electronic device, and medium that can shorten the screen-on time of the device.
[0006] In a first aspect, embodiments of this application provide a screen-on processing method, including: receiving a device screen-on request; responding to the device screen-on request, sequentially executing steps of issuing a screen-on command and alignment processing, wherein the alignment processing is used to synchronize the screen refresh rate and frame rate; and before the alignment processing step is completed, switching the information of the screen state parameters to first information to trigger an image sending process, wherein the first information is used to indicate that the display screen of the electronic device is in an on state.
[0007] Practically, a screen-on command can be sent to the display driver of the electronic device. The display driver can process the screen-on command to power on the display screen and begin initialization. For example, the steps of sending the screen-on command may include: Figures 5-7 The diagram shows that after a new thread is created in HWC, the thread triggers the power-on and initialization of the display screen via the display driver.
[0008] For example, the steps of performing alignment processing may include: Figures 5-6 The diagram shows the alignment process performed by a new thread after HWC is created, in order to avoid screen tearing issues through alignment.
[0009] Practically, the image delivery process may include drawing an image and delivering the drawn image to a display screen. For example, the image delivery process may include, as... Figures 5-7 The process shown illustrates how the application layer sends images to the display screen layer by layer.
[0010] Following the image delivery process, a backlight brightness delivery process can be executed to send the backlight brightness to the display screen. For example, the backlight brightness delivery process may include, as follows: Figures 5-7 The diagram illustrates the process by which the application layer sends backlight brightness information to the display screen layer by layer. Upon receiving the backlight brightness and image, the display screen can then illuminate and display accordingly.
[0011] In this application, upon receiving a screen-on request from the device, a state switching process is performed before the alignment process is completed, thus enabling the state switch to occur ahead of time. Since the application layer can perform image sending and backlight brightness determination after the state switch, the upper layer can correspondingly perform image sending and backlight brightness determination ahead of time due to the early execution of the state switch, without waiting for the lower layer to complete screen initialization before proceeding to the next step. In this way, the lower-layer and upper-layer processing can be executed in parallel. Compared to a serial screen-on process, this application, based on parallel processing of the upper and lower layers, can shorten the device screen-on time.
[0012] Optionally, before the alignment process is completed, the information of the screen state parameters is switched to the first information, including: before executing the step of issuing the screen-on command, the information of the screen state parameters is switched to the first information.
[0013] Compared to performing the state transition in advance after issuing the screen-on command, performing the state transition first and then issuing the screen-on command, that is, advancing the state transition to before issuing the screen-on command, can complete the state transition as early as possible, so as to start the upper-layer processing earlier, thereby helping to shorten the device's screen-on time to a greater extent.
[0014] Optionally, the electronic device includes an HWC; the screen-on processing method further includes: the HWC creating and starting a first thread (e.g., Figure 5 or Figure 7 (as shown in the new thread); where the first thread is used to execute the steps of issuing the screen-on command, alignment processing, and switching the screen state parameter information to the first information.
[0015] Conveniently, the HWC can create and start a thread after receiving a screen-on command, which can be obtained based on the device's screen-on request. For example, the electronic device may include a PMS and SurfaceFlinger; the PMS can issue a screen-on command to the HWC via SurfaceFlinger based on the device's screen-on request.
[0016] By implementing multi-threaded screen-on processing in HWC, parallelization between the upper and lower layers can be achieved, which can shorten the device's screen-on time and optimize the device's screen-on performance.
[0017] Optionally, the electronic device also includes SurfaceFlinger; the alignment process includes: a first thread reporting a first signal to SurfaceFlinger to trigger SurfaceFlinger to perform signal calibration based on the first signal; the first signal describes the screen refresh rate of the display screen, and the signal calibration is used to keep the screen refresh rate and frame rate synchronized; the first thread receives a completion message returned by SurfaceFlinger after performing signal calibration. Based on this, before the alignment process is completed, the screen state parameter information is switched to the first information, including: switching the screen state parameter information to the first information before the first thread receives the completion message. Feasibly, the first thread can receive the first signal reported by the display driver.
[0018] By switching screen state parameters at least before receiving the completion message, the first thread enables the upper layer to perform image sending and backlight brightness distribution in advance, thus helping to shorten the device's screen-on time.
[0019] Optionally, the electronic device also includes a PMS; receiving the device screen-on request includes: the PMS receiving the device screen-on request and sending a screen-on notification to the HWC to trigger the HWC to create the first thread.
[0020] For example, the PMS can receive a screen-on request from an input device node in an electronic device, and in response to the received screen-on request, send a screen-on notification to the HWC. In other examples, the PMS can also receive screen-on requests from other components.
[0021] Optionally, the display screen is a touch screen, and the electronic device also includes an input device node; the device screen-on method further includes: the input device node receiving a screen-on request event, the screen-on request event being an event of pressing a button on the electronic device or an event of displaying the screen; the input device node responding to the screen-on request event sending a device screen-on request to the PMS.
[0022] For example, when a user touches (or clicks) or double-clicks the display screen during a device's blackout period, the electronic device's touchscreen driver can write the corresponding touch event to the input device node. The input device node can then report a notification message of the touch event to the PMS. The PMS receiving this notification message can be interpreted as the PMS receiving a device screen-on request.
[0023] Based on device nodes and PMS, it can respond to screen-on requests issued by users through operating device buttons or device screens, thereby meeting users' device screen-on needs in corresponding usage scenarios.
[0024] Optionally, the aforementioned screen-on request event can be any of the following events: clicking the power button of the electronic device when the display screen is in sleep mode, touching the display screen, or double-tapping the display screen.
[0025] Optionally, the electronic device further includes: a first module located in the application framework layer; the steps of receiving a device screen-on request include: the first module detecting a screen-on request operation (which may indicate that the first module has received a device screen-on request), and sending a screen-on notification to HWC; the screen-on request operation is an operation that causes changes in the sensor data (such as a pose sensor, camera sensor, distance sensor, etc.) of the electronic device.
[0026] In one embodiment, the first module can be a PMS (Power Management System). For example, if a user performs an under-display fingerprint unlock operation or makes a gesture to request the screen to turn on when the device screen is off, the PMS can detect the changes in the corresponding sensor data.
[0027] In other embodiments, the first module may be a different functional module from PMS in the application framework layer.
[0028] It can be based on the application framework layer to respond to other types of screen-on requests issued by users without operating device buttons or the device screen, thereby meeting the user's device screen-on needs in the corresponding usage scenarios.
[0029] Optionally, the above-mentioned screen-on request operation includes at least one of the following operations: performing an under-display fingerprint unlock operation when the display screen is in a sleep state, performing a screen-on request gesture operation when the display screen is in a sleep state, lifting the display screen when the display screen is in a sleep state, moving the display screen away from the display screen when the display screen is in a sleep state, and not obstructing the display screen when the display screen is in a sleep state.
[0030] Optionally, the electronic device has a first application installed; the screen-on processing method further includes: when the information of the screen status parameters is switched to first information, the first application performs the step of drawing an image and sending the drawn image to the display screen.
[0031] Based on real-time monitoring of changes in screen status parameters, image rendering can be performed in advance, thus helping to shorten the device's screen-on time. See also Figure 5 The first application may include Figure 5 The image drawing module in the program is used to draw the screen image.
[0032] Secondly, embodiments of this application provide a screen-on processing apparatus, which includes a unit for performing the method described in the first aspect above. The method described in the first aspect can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the functions of the above method, such as processing modules or units.
[0033] Thirdly, embodiments of this application provide a chip, including: a processor, which is configured to execute computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the chip is triggered to execute the method as described in any of the first aspects.
[0034] Fourthly, embodiments of this application provide an electronic device, which includes one or more memories for storing computer program instructions and one or more processors, wherein when the computer program instructions are executed by one or more processors, the electronic device is triggered to perform the method as described in any of the first aspects.
[0035] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the method as described in any of the first aspects.
[0036] In a sixth aspect, embodiments of this application provide a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method as described in any of the first aspects.
[0037] The technical effects of the aforementioned aspects can be used for reference, and will not be elaborated further here. Attached Figure Description
[0038] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below.
[0039] Figure 1 A schematic diagram illustrating the screen-on process of a device system as an example;
[0040] Figure 2 A schematic diagram of the software architecture of an electronic device provided as an example;
[0041] Figure 3 A diagram illustrating the time consumption of one screen-on processing method for a single instance;
[0042] Figure 4 A schematic diagram illustrating a device system screen-on process provided in an embodiment of this application;
[0043] Figure 5A schematic diagram of the software architecture of an electronic device provided in an embodiment of this application;
[0044] Figure 6 A timing diagram of a screen-on processing method provided in an embodiment of this application;
[0045] Figure 7 A schematic diagram illustrating the time consumption of a screen-on processing method provided in an embodiment of this application;
[0046] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0047] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0048] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0049] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0050] It should be understood that the term "at least one" as used in this document refers to one or more, and "more than one" refers to two or more. The term "and / or" as used in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. A and B can be singular or plural. Additionally, the character " / " in this document generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0051] It should be understood that although the terms "first," "second," etc., may be used to describe the set thresholds in the embodiments of this application, these set thresholds should not be limited to these terms. These terms are only used to distinguish the set thresholds from each other. For example, without departing from the scope of the embodiments of this application, the first set threshold may also be referred to as the second set threshold, and similarly, the second set threshold may also be referred to as the first set threshold.
[0052] When a device's operating system (such as the Android system installed on a mobile phone) is in sleep mode, the device screen is off and displays a black screen. Specifically, when the device system is in sleep mode, the device's power supply module can cut off power to the screen, causing the individual pixels on the screen to not emit light and appear black, resulting in a black screen. Users can wake up the device system by pressing the power button or other operations to turn on the screen and display the displayed information.
[0053] In one example (referred to as Example 1), the screen-on process of the device system includes: when the device screen is off and displaying a black screen, if the user requests to wake up the device system, the screen is first initialized. After the underlying layer completes screen initialization and alignment, the upper layer sends the image and backlight command to the lower layer, thereby achieving screen-on display. For details, please refer to... Figure 1 The device system screen-on process in this example 1 may include the following steps 101 to 105.
[0054] Step 101: In response to the device's screen-on request, a screen-on command is sent to the display driver of the electronic device. By processing the screen-on command, the display driver can instruct the display screen to power on and initialize.
[0055] Step 102: Perform alignment processing to synchronize screen refresh rate and frame rate.
[0056] The screen refresh rate (or vertical refresh rate) represents the number of times the image displayed on the screen refreshes per second. A higher refresh rate results in smoother visuals. Frame rate represents the number of frames of images generated per second by the graphics card (graphics processor). A higher frame rate produces smoother, more realistic animations. However, if the frame rate exceeds the screen refresh rate, the two are out of sync. Because the display screen cannot update at the same speed, excessively high frame rates can cause screen tearing. By performing alignment processing to synchronize the screen refresh rate and frame rate, screen tearing can be avoided.
[0057] Step 103: Switch the screen status parameter information to information indicating the on / off state (e.g., switch from OFF to ON).
[0058] Figure 1 In Example 1 shown, the screen status parameters are switched to ON only after the screen initialization and alignment are completed. At this point, the screen has been initialized and can be considered ready to be lit up.
[0059] Step 104: Draw the image and send it to the display screen of the electronic device.
[0060] Step 105: Send the backlight brightness to the display screen. The display screen can then illuminate according to the backlight brightness and the image.
[0061] As can be seen, in the screen-on process of the device system in Example 1 above, the electronic device sequentially executes the following steps: issuing screen-on command, alignment processing, state switching, image sending, and issuing backlight brightness.
[0062] based on Figure 1 The device system screen-on process shown is as follows: Figure 2 The software architecture of an electronic device provided in Example 1 above is illustrated. For example... Figure 2 As shown, taking the Android operating system as an example, the Android system can be divided into multiple layers, from top to bottom: application layer (APP), application framework layer (FW), native service layer, hardware abstraction layer (HAL), and driver layer. The layer below the driver layer is the hardware layer (HW).
[0063] The application layer can include an image drawing module and a backlight brightness setting module; the application framework layer can include a power management service (PMS); the local service layer can include a surface drawing service (SurfaceFlinger, SF); the hardware abstraction layer can include a hardware composition module (hwcomposer, HWC); the driver layer includes device nodes (or input device nodes) and display drivers; and the hardware layer can include a display screen and buttons (such as a power button).
[0064] refer to Figure 2 Taking the example of a user pressing the power button to trigger the device screen to turn on, if the user presses the power button to request the device to turn on the screen while the device is off, the corresponding button press event can be written to the corresponding device node based on the button information. The device node can then report the notification information of the button press event to the PMS to report the device screen-on request to the PMS. The PMS can execute the logic processing corresponding to the button press event in response to the notification message, and send a screen-on notification to the HWC via the SF.
[0065] After receiving a screen-on notification, the HWC can send a screen-on command to the display driver. The display driver, by processing the screen-on command, can power on the display and begin initialization. Conveniently, the display driver can return a completion message to the HWC after initializing the display. Once the display is initialized, the HWC can perform alignment processing to synchronize the screen refresh rate and frame rate. After completing the alignment process, it can switch the display state by changing the screen status parameters to indicate the on / off state (e.g., from OFF to ON).
[0066] When the screen status parameters switch to indicate an on state, the application's image drawing module can draw a lit-up image, which the application then sends down layer by layer to the display screen. For example... Figure 2 As shown, the on-screen image can be transmitted to the display screen sequentially via PMS, SF, HWC, and display driver.
[0067] After sending the image to the display screen, the backlight brightness setting module can send the backlight brightness to the display screen layer by layer, so that the display screen lights up according to the backlight brightness and the image. For example... Figure 2 As shown, the backlight brightness can be transmitted to the display screen sequentially through PMS, SF, HWC, and display driver.
[0068] based on Figure 1 and Figure 2 The content shown is as follows. Figure 3 The time consumption of the screen-on processing method provided in Example 1 above is shown.
[0069] like Figure 3 As shown, users can request the device to turn on the screen by clicking a button (such as the power button) while the device screen is off. After the user clicks the button, the device node can report the button click event notification information to the PMS. The PMS can then execute button logic processing in response to the notification message to send a screen-on notification to the HWC via the SF.
[0070] After receiving a screen-on notification, HWC can send a screen-on command to the display driver, causing the display driver to process the command, power on the display screen, and begin initialization. After the display screen is initialized, HWC can perform alignment processing to synchronize the screen refresh rate and frame rate. After completing the alignment processing, it switches the screen status parameters to indicate the on state.
[0071] When the aforementioned switching scenario occurs, the application layer can draw a screen-on image and then progressively send the drawn screen-on image to the display screen. After sending the screen-on image to the display screen, the application layer progressively sends the backlight brightness to the display screen. The display screen then illuminates and displays the image based on the backlight brightness and the image.
[0072] refer to Figures 1-3 As can be seen, in Example 1 above, the screen-on process of the device system is a serial process (that is, the electronic device executes the steps of sending screen-on command, alignment processing, state switching, image sending, and backlight brightness sending in sequence). That is, after the user requests the device to turn on the screen, the upper layer will only take the next step after the lower layer completes screen initialization, in order to send the image and send the backlight brightness.
[0073] Thus, for reference Figure 3For a serial screen-on process, the electronic device sequentially goes through a black screen phase, an initialization phase, a refresh phase, and a screen-on phase. Therefore, the screen-on time is the time taken during the black screen phase after the user presses the button, plus the time taken during the initialization phase (e.g., ...). Figure 3 As shown in t1), and the total time spent in the map clearing phase (as shown in t1). Figure 3 As shown in t2, there is a problem with the device taking a long time to turn on the screen, resulting in a poor user experience.
[0074] To address the aforementioned issue of prolonged screen-on time, this application parallelizes the underlying screen initialization with the upper-layer drawing and backlight distribution processes. This parallel processing between the upper and lower layers shortens the device's screen-on time. Unlike Example 1, which involved "switching states after issuing the screen-on command and performing alignment processing," this application advances the state switching process to before the alignment process is complete. Since the application layer can execute image sending and backlight brightness distribution immediately after the state switch, the upper layer can correspondingly perform these processes earlier, without waiting for the lower layer to complete screen initialization. Thus, lower-layer and upper-layer processing can be executed in parallel.
[0075] Thus, the device system screen-on process provided in this application embodiment may include: responding to a device screen-on request, sending a screen-on command to the display driver of the electronic device; and after sending the screen-on command, performing alignment processing, which is used to synchronize the screen refresh rate and frame rate; before completing the alignment processing, switching the screen state parameter information to information indicating an on state; after the screen state parameter information is switched to information indicating an on state, drawing an image and sending the image to the display screen of the electronic device; and after sending the image to the display screen, sending the backlight brightness to the display screen. The display screen is used to illuminate and display the image based on the backlight brightness and the image.
[0076] By performing the state switch in advance, the lower-level screen initialization may not be complete after the state switch is finished, while the upper layer can already send images and distribute backlight brightness, enabling parallel processing between the lower and upper layers. Compared to the serial screen-on processing method, the parallel processing method provided in this application can shorten the screen-on time, optimize screen-on performance, and thus improve the user experience.
[0077] For example, the screen-on processing method provided in this application embodiment can be applied to simple sleep-wake scenarios, sleep-wake scenarios with always-on display function, sleep-wake scenarios with fingerprint function but no always-on display, sleep-wake scenarios with fingerprint function and always-on display, sleep-wake scenarios in multi-screen collaboration scenarios, sleep-wake scenarios in screen projection scenarios, sleep-wake scenarios in vehicle system scenarios, etc.
[0078] In one embodiment, when HWC receives a screen-on notification from an upper layer (such as PMS) based on a device screen-on request, it creates and starts a new thread. This new thread performs the following steps: sending a screen-on command to the display driver; performing alignment processing after sending the screen-on command; and switching the screen state parameters to indicate the on state before completing the alignment processing (e.g., before sending the screen-on command to the display driver). By performing multi-threaded screen-on processing in HWC, parallelization between the upper and lower layers can be achieved, shortening the device screen-on time and optimizing the device screen-on performance.
[0079] In one feasible implementation, the application framework layer of the device system can respond to the device's screen-on request by sending a screen-on notification to the HWC via SF.
[0080] For example, if a user requests the device to turn on its screen by pressing an operation button or displaying the screen (such as clicking the device's power button, clicking or double-clicking the touchscreen) when the device screen is off, the PMS in the application framework layer can receive notification information of the operation event (such as a power button click event, touchscreen event, etc.) reported by the device node in the driver layer, that is, it receives the device screen-on request. The PMS can perform logical processing in response to this notification information to send a screen-on notification to HWC via SF.
[0081] In other examples, the application framework layer can also send a screen-on notification to the HWC via the SF based on other types of screen-on request operations (such as fingerprint unlocking, screen-on request gestures, and raising, moving away from, or not obscuring the display screen). Feasibly, if a screen-on request gesture or in-display fingerprint unlocking operation occurs when the device screen is off, the PMS can send a screen-on notification to the HWC via the SF.
[0082] Compared to performing the state transition earlier after issuing the screen-on command, performing the state transition first and then issuing the screen-on command—that is, advancing the state transition to before issuing the screen-on command—allows for the state transition to be completed as early as possible. This allows for earlier initiation of upper-layer processing, thereby significantly reducing the device's screen-on time. Thus, refer to... Figure 4 This application provides a device system screen-on process, which may include the following steps 401 to 405.
[0083] Step 401: In response to the device's screen-on request, the screen status parameters are switched to indicate an on state, and steps 402 and 404 are executed. That is, after the user requests the device to turn on the screen, the state switch is performed first. After the state switch is completed, the lower layer can initialize the screen, and the upper layer can send images and send backlight brightness; the lower and upper layers process in parallel.
[0084] In one embodiment, the state switching purpose can be achieved by calling the operating system's native setPowerState interface to switch the display state.
[0085] For example, when the device system is in a sleep state, the user can request the device to turn on the screen by clicking the device power button, lightly touching the device touch screen, double-tapping the device touch screen, lifting the device screen (such as holding the device and performing a hand-raising action), fingerprint unlocking action, screen-on request gesture, moving away from the device screen (such as the user moving the phone screen away from their head during a call), or actions that do not obstruct the device screen (such as the user opening the flip case of the phone).
[0086] Feasibly, users can register their fingerprints via a touchscreen or a touch button, which can be the device's power button or a fingerprint registration button distinct from the power button.
[0087] For example, when a user requests the device screen to turn on, the device screen may be black.
[0088] Conveniently, screen status parameter information can be used to indicate the screen display status. When a user requests the device to turn on the screen, the screen status parameter information can be information indicating an off state (e.g., OFF). In response to the screen-on request, the electronic device can switch the screen status parameter information from information indicating an off state to information indicating an on state (e.g., ON).
[0089] Figure 1 In Example 1, when the screen status parameter information is switched to ON, the display screen has completed initialization. However, unlike this, Figure 4 In the embodiment shown in this application, a state switch is performed first, and then a screen-on command is issued to begin initializing the display screen. Therefore, when the screen state parameter information is switched to ON, the display screen has not yet completed initialization. That is, step 401 only switches the screen state parameter information to ON, but this does not mean that the display screen is already in the on state.
[0090] Step 402: Send a screen-on command to the display driver of the electronic device. By processing the screen-on command, the display driver can power on the display screen and begin initialization.
[0091] In one embodiment, the screen-on command can be sent by calling the operating system's native setPowerMode interface.
[0092] It is feasible to power on and initialize the display screen by controlling the power-on and initialization of the display IC (display driver integrated chip).
[0093] Step 403: Perform alignment processing to synchronize screen refresh rate and frame rate.
[0094] In practice, the process of displaying images on a device can involve APP drawing and rendering, SF compositing, and display screen refresh. By performing alignment processing, the APP drawing and rendering, SF compositing, and display screen refresh can be synchronized.
[0095] The display principle of the Android system is based on the Vertical Synchronization (Vsync) mechanism. Under the Vsync mechanism, the Android system can have two types of Vsync signals: hardware-generated Vsync signals (Vsync-HW signal) and software-simulated Vsync signals (Vsync-APP signal and Vsync-SF signal). The signal period of the Vsync-HW signal is equal to the reciprocal of the screen refresh rate. Specifically, APP drawing and rendering can be triggered by the Vsync-APP signal, SF compositing can be triggered by the Vsync-SF signal, and screen refresh can be triggered by the Vsync-HW signal.
[0096] Feasibly, based on the display screen's refresh rate, the display driver can periodically report the Vsync-HW signal to the HAL layer. The HAL layer can then report the received Vsync-HW signal to the SF, triggering the SF to perform signal calibration. The SF can perform Vsync signal calibration based on the Vsync-HW signal reported by the HAL layer, thereby periodically generating a software-simulated Vsync signal, ensuring that the two Vsync signals remain periodically synchronized, thus achieving alignment.
[0097] In one embodiment, alignment can be achieved by calling the Android system's native SetVsyncEnabled interface to align Vsync. Since the tearing effect (TE) is interrupted after the screen is first lit and initialized, the upper-layer SF aligns Vsync once to ensure synchronization between the top and bottom layers, thus avoiding screen tearing issues.
[0098] In one feasible implementation, after the SF performs signal calibration, it can return a completion message to the HAL layer. Upon receiving the completion message, the HAL layer can indicate that the alignment process has been completed.
[0099] In one embodiment, HWC can create a thread after receiving a screen-on notification. Once the thread is started, it can sequentially perform three operations: state switching, issuing a screen-on command, and alignment processing.
[0100] Step 404: Draw the image and send it to the display screen of the electronic device.
[0101] Feasibly, when the screen state parameter information switches to information indicating the on state, the application layer can draw a screen-on image and send the drawn image down.
[0102] For example, the application layer can sequentially send the drawn bright screen image to the display screen via PMS, SF, HWC, and display driver.
[0103] In one feasible implementation, the application at the application layer can monitor changes in screen state parameters, and when it detects, for example, that the screen state parameters have switched from OFF to ON, it draws a screen-on image and sends the drawn image down.
[0104] In another feasible implementation, the application framework layer of the electronic device may include a monitoring module that can monitor changes in screen state parameters and notify the application in the application layer when the monitored information changes from OFF to ON, so as to trigger the application to draw a screen-on image and send the drawn image down.
[0105] Step 405: Send the backlight brightness to the display screen. The display screen can then illuminate according to the backlight brightness and the image.
[0106] Feasibly, the application layer can send backlight brightness to the display screen after the on-screen image is sent to the display screen based on the set processing logic.
[0107] For example, the application layer can sequentially send the backlight brightness to the display screen via PMS, SF, HWC, and display driver.
[0108] As can be seen, the embodiments provided in this application... Figure 4 In the screen-on process of the device system shown, after the electronic device completes the state switch, it sequentially executes low-level processing steps such as sending screen-on commands and alignment processing, and sequentially executes high-level processing steps such as sending images and sending backlight brightness. Low-level processing and high-level processing can be executed in parallel.
[0109] based on Figure 4 The device system screen-on process shown in this application embodiment is as follows: Figure 5 A software architecture block diagram of an electronic device according to an embodiment of this application is shown. The layered architecture divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system can be divided into multiple layers, from top to bottom: application layer (APP), application framework layer (FW), native service layer (native), hardware abstraction layer (HAL), driver layer, and hardware layer (HW).
[0110] The application layer may include an image rendering module and a backlight brightness setting module, and may also include... Figure 5A suite of applications not shown, such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, etc.
[0111] The image drawing module can be used to draw a bright screen image when the screen status parameters switch to an information indicating an on state (such as switching from OFF to ON). The drawn bright screen image can then be sent to the PMS, and can be sequentially passed through SF, HWC, and the display driver to the display screen.
[0112] In one embodiment, the screen-on image can be the interface image of an application, which can then be drawn by the image drawing module in the application. In another embodiment, the screen-on image can be the system's main interface image, which can then be drawn by the image drawing module in the desktop management software at the application layer.
[0113] The backlight brightness setting module can be used to send the backlight brightness to the PMS after the bright screen image is sent to the display screen, and the backlight brightness can be passed to the display screen layer by layer through SF, HWC and display driver.
[0114] In one feasible implementation, the timing of backlight brightness distribution can be determined based on preset logic processing. For example, after the application layer starts distributing images, if a set time is reached, it indicates that the image has been distributed to the display screen, and the backlight brightness setting module can then start distributing backlight brightness.
[0115] In another feasible implementation, the system service of the application framework layer can monitor the timing of the image being sent to the display screen and notify the backlight brightness setting module to trigger the backlight brightness setting module to send the backlight brightness.
[0116] After initialization, the display screen can turn on and display based on the screen image and backlight brightness sent down from the upper layer.
[0117] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 5 As shown, the application framework layer may include a power management service module (PMS), and may also include... Figure 5 View systems, resource managers, content providers, etc., not shown in the image.
[0118] The Power Management System (PMS) can be used to manage the power-on and power-off of the display screen. The view system includes visual controls, such as controls for displaying text and images. The view system can be used to build applications. The display interface can consist of one or more views. The resource manager provides applications with various resources, such as localized strings, icons, images, layout files, video files, etc. The content provider is used to store and retrieve data, making this data accessible to applications.
[0119] The local service layer may include a Surface Drawing Service (SF) module. SF can receive graphic display data from multiple sources, synthesize it, and send it to the display device. Image display can be accomplished collaboratively by multiple classes such as SF, HWC, and the display screen.
[0120] The Hardware Abstraction Layer (HAL) acts as a bridge between software and hardware. It encapsulates the underlying hardware driver, providing a generic interface for the application framework layer to call the driver. The HAL is an abstract interface for the device kernel driver, providing application programming interfaces for accessing the underlying device to higher-level Java API frameworks. The HAL can contain multiple library modules, each implementing an interface for a specific type of hardware component.
[0121] The hardware abstraction layer may include a hardware composition module (HWC). The HWC has the function or capability to combine and display image data using hardware, providing hardware support for SF services.
[0122] In one embodiment of this application, after receiving a screen-on notification, the HWC can create a new thread. After the new thread is started, it can sequentially perform processing operations such as switching display states, issuing screen-on commands, and alignment processing.
[0123] The driver layer is the layer between hardware and software. For example... Figure 5 As shown, the driver layer may include display drivers and device nodes, and may also include... Figure 5 The driver is not shown in the diagram, but includes the camera driver, Bluetooth driver, audio driver, and sensor driver.
[0124] The hardware layer may include hardware such as a display screen and buttons. For example, the display screen may be an LCD, and the display driver may be an LCD driver. Buttons may include a power button, etc.
[0125] refer to Figure 5 If a user presses the power button to request the device to turn on the screen while the device is off, the corresponding button press event can be written to the corresponding device node based on the power button's key information. The device node can then report the button press event notification information to the PMS. In response to the notification message, the PMS can execute key logic processing to send a screen-on notification to the HWC via the SF.
[0126] Unlike Example 1 above, where the HWC sequentially executes the screen-on command, alignment process, and display state switching upon receiving a screen-on notification, in this embodiment, the HWC can create a new thread upon receiving the screen-on notification. After the new thread starts, it can first switch the display state, then issue the screen-on command, and subsequently perform the alignment process. This means that compared to Example 1, the state switching step is executed earlier, thus allowing for earlier execution of the image sending and backlight brightness distribution steps.
[0127] In one example, after HWC creates a new thread, it can return a completion message to PMS via SF. Once the new thread starts, it can switch the screen state parameters from OFF to ON, and then send a screen-on command to the display driver. The display driver, by processing the screen-on command, can power on and initialize the display screen. After screen initialization, the display driver can return a completion message to the new thread, after which the new thread can perform alignment processing.
[0128] Feasibly, the power-on and initialization of the display screen requires a preset time. In one feasible implementation, after receiving the screen-on command, the display driver can send a setting command to the display screen to trigger the display screen to begin initialization. After the preset time, it sends another setting command to the display screen to instruct the display screen to complete initialization, and then returns a completion message to a new thread. After the display screen completes initialization, it can execute the display tasks issued by the display driver.
[0129] Because the monitoring module in the electronic device can monitor changes in screen status parameters in real time, and the image drawing module in the application can draw and send a bright screen image when the monitoring module detects the aforementioned switching situation, thus, as Figure 5 As shown, after the new thread completes its state switch, the image drawing module can execute the image sending process without waiting for the display screen to complete initialization. After sending the screen-on images layer by layer to the display screen, the backlight brightness setting module can send the backlight brightness layer by layer to the display screen, so that the display screen lights up according to the backlight brightness and the image.
[0130] Understandable Figure 5 The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer layers than illustrated, and each layer may include more or fewer components; this application does not impose any limitations.
[0131] based on Figure 4 and Figure 5 The content shown is as follows. Figure 6 The diagram shows a timing diagram of a screen-on processing method provided in an embodiment of this application, which may include the following steps.
[0132] Step 1: If the user clicks the power button while the device screen is off, the device node will perform node operations based on the button information of the button click operation and report notification information to the PMS.
[0133] Step 2: Based on the notification information reported by the device node, PMS executes the key logic processing and sends a screen-on notification to SF.
[0134] Step 3: After receiving the screen-on notification from PMS, SF sends a screen-on notification to HWC.
[0135] Step 4: After receiving the screen-on notification from SF, HWC creates and starts a new thread (denoted as thread 1), and then returns a completion message to PMS via SF.
[0136] Step 5: Thread 1 switches the display state by changing the screen state parameter information from OFF to ON.
[0137] After step 5, steps 6-8 and steps 9-10 can be executed in parallel. That is, after the state switch of thread 1, thread 1 and the application layer can process in parallel.
[0138] Step 6: Thread 1 sends a screen-on command to the display driver.
[0139] Step 7: The display driver powers on and initializes the display screen by processing the screen-on command issued by thread 1, and then returns a completion message to thread 1.
[0140] Step 8: Thread 1 performs alignment processing.
[0141] Step 9: After the screen state parameter information is switched from OFF to ON, the application layer draws an image and passes the drawn image layer by layer to the display screen.
[0142] Step 10: The application layer executes the backlight brightness logic processing to pass the backlight brightness to the display screen layer by layer.
[0143] Step 11: After the display screen is initialized, the screen is turned on and displayed according to the received backlight brightness and image.
[0144] Figure 6 In the illustrated embodiment, based on the early execution of state switching, the upper layer can correspondingly advance the image sending and backlight brightness distribution processes, without waiting for the lower layer to complete screen initialization before proceeding to the next step. Thus, lower-layer and upper-layer processing can be executed in parallel. Compared to a serial processing method for screen lighting, Figure 6 The embodiment shown is based on parallel processing of the upper and lower layers, which can shorten the device's screen-on time.
[0145] based on Figures 4-6 The content shown is as follows. Figure 7 The time consumption of a screen-on processing method provided in an embodiment of this application is shown.
[0146] See Figure 7 Users can request the device to turn on the screen by clicking a button (such as the power button) while the device screen is off. After the user clicks the button, the corresponding button click event is written to the corresponding device node, which can then report the button click event to the PMS. The PMS responds to the button click event by executing button logic processing, which then sends a screen-on notification to the HWC via SF.
[0147] After receiving a screen-on notification, HWC can create a thread (such as...). Figure 7 The system will create a new thread and start the thread, then return a completion message to the upper layer. After the thread starts, it can perform three operations in sequence: state switching, issuing a screen-on command, and alignment processing.
[0148] In one embodiment, after HWC creates and starts a thread, the thread can call the operating system's native setPowerState interface to switch the display state (e.g., switch the screen state parameter information from OFF to ON), then call the operating system's native setPowerMode interface to send a screen-on command to the display driver, and finally perform operations to align Vsync. The implementation of Vsync alignment may involve calling the Android system's native SetVsyncEnabled interface.
[0149] Feasibly, after receiving the screen-on command from the thread, the display driver can process the command to power on and initialize the display screen, and then report the corresponding completion message to the thread after screen initialization. The thread can then align Vsync after screen initialization.
[0150] After the thread switches the display state to the on state, the application layer can draw the screen-on image and then send the drawn screen-on image down to the display screen layer by layer.
[0151] After sending the screen-on image, the application layer can progressively send the backlight brightness to the display screen, so that the display screen lights up according to the backlight brightness and the image. See also Figure 7 The initialization phase duration (t1) can be a set duration. If the display driver receives the backlight brightness from the HWC before the initialization phase has ended, the display driver can wait until the initialization phase ends before sending the backlight brightness to the display screen. After receiving the backlight brightness, the display screen can turn on the screen accordingly, and the electronic device enters the screen-on phase.
[0152] refer to Figures 1 to 7As can be seen, unlike the serial processing of the device system screen-on process in Example 1 above (i.e., the electronic device sequentially executes steps such as issuing screen-on command, alignment processing, state switching, image sending, and issuing backlight brightness), the device system screen-on process in this embodiment is a parallel processing of the bottom and top layers. That is, after the user requests the device to turn on the screen, the top layer does not need to wait for the bottom layer to complete screen initialization before proceeding to the next step. Instead, the top layer can send images and issue backlight brightness while the bottom layer is performing screen initialization.
[0153] Thus, see Figure 7 For a parallel screen-on process, the electronic device sequentially goes through a black screen phase, an initialization phase (including a concurrent image-brushing phase), and a screen-on phase. Therefore, the screen-on time is the sum of the time taken during the black screen phase after the user presses a button and the time taken during the initialization phase (e.g., ...). Figure 7 As shown in t1, it can be the same as Figure 3 The sum of t1 in (e.g.) Figure 7 As shown in t3). Figure 3 and Figure 7 As shown, the device screen-on time in Example 1 above is t2, and the device screen-on time in this embodiment is t3, where t2 > t3. That is, the device screen-on time in this embodiment is shorter, and there is a certain time difference compared to Example 1 above. Figure 7 The optimization of the screen-on time (t2-t3) shown in the figure allows for a more timely response to users' screen-on requests.
[0154] Figure 7 The duration of the optimized portion shown is typically 90–110 ms. Therefore, compared to Example 1 above, the device screen-on method of this application embodiment can start the device screen-on 90–110 ms before the user presses the power button.
[0155] Figures 5-7 This demonstrates the technical implementation of the device's screen-on process in a parallel processing manner when the user requests the screen to be turned on by clicking the power button in a black screen scenario. This parallel processing method is also applicable to screen-on processing in other scenarios and / or other screen-on request operations, which will not be elaborated here.
[0156] The screen-on processing method provided in any embodiment of this application can be applied to electronic devices such as mobile phones, tablets, personal digital assistants (PDAs), desktops, laptops, notebook computers, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, and wearable devices. This application does not impose any special restrictions on the specific form of the above-mentioned electronic devices.
[0157] The screen-brightening processing method provided in any embodiment of this application can be applied to... Figure 8 In the electronic device 100 shown. Figure 8 A schematic diagram of the structure of the electronic device 100 is shown.
[0158] Electronic device 100 may include processor 110, internal memory 121, sensor module 180, button 190, motor 191, camera 193, display screen 194, etc. Sensor module 180 may include pressure sensor, gyroscope sensor, accelerometer sensor, distance sensor, proximity sensor, ambient light sensor, fingerprint sensor, touch sensor, etc.
[0159] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0160] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0161] In some embodiments, the processor 110 may be a system-on-chip (SoC), which may include a central processing unit (CPU), and may further include other types of processors. In some embodiments, the processor 110 may be a PWM control chip.
[0162] The processor 110 may also include necessary hardware accelerators or logic processing hardware circuitry, such as an ASIC, or one or more integrated circuits for controlling the execution of the program. Furthermore, the processor 110 may have the capability to operate one or more software programs, which may be stored in a storage medium.
[0163] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0164] In some embodiments, the memory of the electronic device 100 may be a read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), or other types of dynamic storage devices capable of storing information and instructions. It may also be an electrically erasable programmable read-only memory (EEPROM), or any computer-readable medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer.
[0165] In some embodiments, the processor 110 and the memory can be combined into a single processing device, or they can be separate components. The processor 110 can be used to execute program code stored in the memory. In specific implementations, the memory can be integrated into the processor 110, or it can be independent of the processor 110.
[0166] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0167] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0168] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0169] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0170] Electronic device 100 can achieve shooting functions through an ISP, camera 193, video codec, GPU, display 194, and application processor. The ISP is used to process data fed back by the camera 193. The camera 193 is used to capture still images or videos. An object generates an optical image through the lens and projects it onto a photosensitive element. For example, taking a mobile phone, if the camera 193 captures a gesture from the user requesting to turn on the screen when the phone screen is off, the phone can turn on its screen.
[0171] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.
[0172] A pressure sensor is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor may be located on the display screen 194. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor. The electronic device 100 may also calculate the touch location based on the detection signal from the pressure sensor. In some embodiments, touch operations applied to the same touch location but with different touch operation intensities may correspond to different operation commands.
[0173] A gyroscope sensor can be used to determine the motion posture of the electronic device 100. An accelerometer sensor can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). For example, using a mobile phone, based on the data collected by the gyroscope sensor and the accelerometer sensor, if the action of a user lifting the phone when the screen is off is detected, the phone can then turn on its screen.
[0174] A distance sensor is used to measure distance. Electronic device 100 can measure distance using infrared or laser. In some embodiments, during a shooting scenario, electronic device 100 can utilize the distance sensor to measure distance for rapid focusing. The proximity sensor may include, for example, a light-emitting diode (LED) and a photosensor, such as a photodiode. Feasibly, taking a mobile phone as an example, based on data collected by the distance sensor or proximity sensor, if it detects that a user's face is close to the phone screen during a call, the phone can automatically enter a black screen state to prevent accidental touches and save power. Conversely, if it detects that the user's face is moving away from the phone screen during a call, the phone can automatically switch to a bright screen display.
[0175] An ambient light sensor is used to sense the ambient light intensity. Conveniently, the electronic device 100 can automatically adjust the backlight brightness when the device screen is on based on the ambient light intensity sensed in real time by the ambient light sensor, in order to adapt to the real-time changing ambient light intensity.
[0176] A fingerprint sensor is used to collect fingerprints. Electronic device 100 can utilize the collected fingerprint characteristics to achieve fingerprint unlocking, app access lock, fingerprint photography, fingerprint answering of calls, etc. For example, taking a mobile phone, if the user unlocks the phone with their fingerprint while the screen is off, the phone can light up the screen upon successful unlocking.
[0177] A touch sensor, also known as a "touch device," can be located on the display screen 194. The touch sensor and the display screen 194 together form a touchscreen, also called a "touchscreen." The touch sensor detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some embodiments, the touch sensor may also be located on the surface of the electronic device 100, in a different position than the display screen 194. For example, in a mobile phone, if a user taps or double-taps the touchscreen when the phone screen is off, or performs an in-display fingerprint unlock via the touchscreen, the phone screen can be turned on.
[0178] Button 190 includes a power button, volume buttons, etc. Button 190 can be a mechanical button or a touch button. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, taking a mobile phone, if a user presses the power button when the phone screen is off, the phone screen can be turned on.
[0179] In addition, the electronic device runs an operating system on top of the aforementioned components. For example... operating system, operating system, Operating systems, etc. Applications can be installed and run on an operating system.
[0180] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. In one embodiment, taking the layered architecture Android system as an example, the software structure of electronic device 100 can be as follows: Figure 5 As shown.
[0181] This application also provides a chip, which is installed in an electronic device. The chip includes a processor for executing computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the chip is triggered to execute the method steps provided in any method embodiment of this application.
[0182] This application also proposes a terminal device, which includes a communication module, a memory for storing computer program instructions, and a processor for executing the program instructions. When the computer program instructions are executed by the processor, the terminal device is triggered to execute the method steps provided in any method embodiment of this application.
[0183] This application also provides an electronic device, which includes multiple antennas, a memory for storing computer program instructions, a processor for executing the computer program instructions, and a communication device (such as a communication module that can implement 5G communication based on the NR protocol). When the computer program instructions are executed by the processor, the electronic device is triggered to execute the method steps provided in any method embodiment of this application.
[0184] Specifically, in the embodiments of this application, one or more computer programs are stored in the aforementioned memory, and the one or more computer programs include instructions that, when executed by the aforementioned device, cause the aforementioned device to perform the method steps described in the embodiments of this application.
[0185] Furthermore, the devices, apparatuses, and modules described in the embodiments of this application can be implemented by computer chips or physical entities, or by products with certain functions.
[0186] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0187] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0188] Specifically, this application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the method steps provided in this application.
[0189] This application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to perform the method steps provided in this application.
[0190] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, apparatuses, or units, and may be electrical, mechanical, or other forms.
[0191] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0192] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0193] An integrated unit implemented as a software functional unit can be stored in a computer-readable storage medium. This software functional unit, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory, random access memory, magnetic disk, or optical disk.
[0194] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0195] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0196] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments of this application can be implemented using electronic hardware, computer software, or a combination of electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0197] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the same or similar parts between the various embodiments of this application can be referred to mutually. For example, the specific working processes of the systems, devices, and units described in the embodiments of this application can be referred to the corresponding processes in the method embodiments of this application, and will not be repeated here.
[0198] The above description is merely a specific embodiment of this application and is not intended to limit this application. The scope of protection of this application shall be determined by the claims.
Claims
1. A screen-on method, characterized in that, Applied to an electronic device, the electronic device including a PMS (Power Management Service Module), HWC (Hardware Integration Module), and a display driver, the method includes: When the electronic device is in a black screen state, it receives user operations; After receiving the user's operation, the electronic device sends a screen-on request to the PMS; After receiving the screen-on request, the PMS sends a screen-on notification to the HWC. After receiving the screen-on notification, the HWC creates and starts a first thread, which sends a screen-on command to the display driver. After the HWC receives the screen-on notification and before the first thread sends the screen-on command to the display driver, the PMS sends an image to the HWC.
2. The method according to claim 1, characterized in that, The electronic device further includes a display screen, and the method further includes: After receiving the image, the HWC sends the image to the display driver; After receiving the image, the display driver sends the image to the display screen.
3. The method according to claim 2, characterized in that, The method further includes: After the PMS sends the image to the HWC, it sends the backlight brightness to the HWC.
4. The method according to claim 3, characterized in that, The method further includes: After receiving the backlight brightness, the HWC sends the backlight brightness to the display driver; After receiving the backlight brightness, the display driver sends the backlight brightness to the display screen.
5. The method according to any one of claims 1-4, characterized in that, After the HWC creates and starts the first thread, and before the first thread sends the screen-on command to the display driver, the method further includes: The first thread executes the switch display state.
6. The method according to claim 5, characterized in that, The first thread performs the switching of display states, specifically as follows: The first thread switches the screen status parameter information from OFF to ON.
7. The method according to any one of claims 1-6, characterized in that, The method further includes: After the first thread sends a screen-on command to the display driver, it performs alignment processing.
8. The method according to claim 7, characterized in that, The electronic device also includes SurfaceFlinger (a surface drawing service module), and the first thread performs alignment processing, specifically: The first thread sends a first signal to the SurfaceFlinger; After receiving the first signal, SurfaceFlinger sends a completion message to the first thread.
9. The method according to claim 8, characterized in that, The method further includes: After the first thread sends the first signal to the SurfaceFlinger, and before the SurfaceFlinger sends a completion message to the first thread, the SurfaceFlinger performs signal calibration based on the first signal.
10. The method according to any one of claims 1-9, characterized in that, The user operations include: pressing the power button, performing the in-display fingerprint unlock operation, or performing the screen-on request gesture operation.
11. An electronic device, characterized in that, The electronic device includes a display screen, one or more memories for storing computer program instructions, and one or more processors, wherein when the computer program instructions are executed by the one or more processors, the electronic device is triggered to perform the method as described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-10.