Screen brightness adjusting method, electronic equipment and readable medium
By discarding the adjustment of the backlight value within the time threshold in the electronic device, ensuring that the backlight driving module adjusts the screen brightness based on the actual backlight value, solving the problem of backlight change curve jagging and screen flickering, and achieving stable screen brightness adjustment.
Patent Information
- Application Number
- CN202310857349.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-01-14
AI Technical Summary
In electronic devices, the time difference between the actual backlight value received by the backlight driving module and the adjustment backlight value is too small, resulting in serrations of the backlight change curve, causing the screen to flicker.
By discarding the second backlight value within the time threshold when the first backlight value is received, it is ensured that the backlight driving module adjusts the screen brightness based on the first backlight value only, and avoids screen flickering caused by adjustment based on the second backlight value.
It effectively avoids screen flickering, ensures smoothness of the backlight change curve, and improves the stability of screen brightness adjustment.
Smart Images

Figure CN119314433A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of display screens, and in particular to a screen brightness adjustment method, an electronic device, and a readable medium. Background Art
[0002] Currently, users can adjust screen brightness by dragging a brightness bar on an electronic device, such as a tablet computer, for example. Figure 1 As shown, the user can slide the brightness bar downward on the video application interface 101 of the tablet computer 10 to reduce the screen brightness.
[0003] Among them, the screen of the electronic device (such as liquid crystal glass) itself does not have the luminous property, and the brightness of the screen depends on the brightness of the backlight panel behind the screen, and the brightness of the backlight panel depends on the size of the backlight value. The backlight value of the backlight panel can be adjusted by the user dragging the brightness bar to adjust the screen brightness. The application of some electronic devices supports two backlight value transmission channels, namely the process communication (HWbinder) channel (based on the channel for sending the backlight value of the HWbinder module) and the local tone mapping (local tone mapping, LTM) channel (based on the channel for sending the backlight value of the LTM module). Among them, the HWbinder module sends the actual obtained backlight value (hereinafter referred to as the actual backlight value) based on the HWbinder channel, and the LTM module sends the backlight value (hereinafter referred to as the adjusted backlight value) adjusted based on the backlight discount coefficient to the actual obtained backlight value based on the LTM channel, wherein the adjusted backlight value is less than the corresponding actual backlight value. The backlight driver module can adjust the voltage or current transmitted to the backlight panel according to the actual backlight value obtained and the adjusted backlight value, thereby adjusting the brightness of the backlight panel.
[0004] Since the backlight values sent down through the HWbinder channel and the LTM channel belong to two different threads, the order of sending the backlight values cannot be adjusted. In some cases, the actual backlight value received by the backlight driver module will be interspersed with the adjusted backlight value, and the size of the interspersed adjusted backlight value may be too large or too small compared to the adjacent actual backlight value, causing jagged backlight change curves, and causing the screen to flicker in the process of the backlight driver module adjusting the screen brightness based on the actual backlight value and the adjusted backlight value. For example, the screen brightness suddenly increases and then immediately decreases when the user lowers the screen brightness, or the screen brightness suddenly decreases and then immediately increases when the user increases the screen brightness. Summary of the invention
[0005] In order to avoid the situation where the adjusted backlight value is interspersed in the actual backlight value received by the backlight driving module, and the size of the interspersed adjusted backlight value may be too large or too small than the adjacent actual backlight value, causing jagged edges in the backlight change curve, and causing screen flickering when the backlight driving module adjusts the screen brightness based on the actual backlight value and the adjusted backlight value, the embodiments of the present application provide a screen brightness adjustment method, an electronic device and a readable medium.
[0006] In a first aspect, an embodiment of the present application provides a screen brightness adjustment method, which is applied to an electronic device, the method comprising: receiving a first backlight value L11 sent by a first channel at a first moment, and adjusting the screen brightness of the electronic device based on the first backlight value L11; receiving a second backlight value L21 sent by a second channel at a second moment, and if the time difference between the second moment and the first moment is less than a time threshold, discarding the second backlight value L21; wherein the first backlight value L11 is one of multiple first backlight values sent by the first channel in response to a first operation of a user adjusting the screen brightness in a first application interface, and the second backlight value L21 is one of multiple second backlight values sent by the second channel in response to a first operation of a user adjusting the screen brightness in the first application interface, and the second backlight value is less than the corresponding first backlight value.
[0007] It can be understood that the first path can be the HWbinder path in the embodiment of the present application, the first path is the path between the HWbinder module and the backlight driver module for transmitting the backlight value, and the first backlight value can be the actual backlight value in the embodiment of the present application. The second path can be the LTM path in the embodiment of the present application, the second path is the path between the LTM module and the backlight driver module for transmitting the backlight value, and the second backlight value can be the adjusted backlight value in the embodiment of the present application. The time threshold can be the preset time in the embodiment of the present application. The first operation can be the operation of the user dragging the brightness bar in the embodiment of the present application.
[0008] When the first backlight value L11 sent by the first channel is received, the embodiment of the present application adjusts the screen brightness based on the first backlight value L11, and discards the second backlight value L21 sent by the second channel within the time threshold, so as to avoid adjusting the screen brightness based on the second backlight value L21 during the process of adjusting the screen brightness based on the first backlight value L11, causing the screen flickering phenomenon.
[0009] In one possible implementation, the first path is a process communication path, and the second path is a local tone mapping path.
[0010] In a possible implementation, an electronic device includes a backlight driver module, and a method includes: a first application sends a first backlight value L11 to a first module and a second module simultaneously; the first module sends the first backlight value L11 to the backlight driver module through a first path; the second module sends a second backlight value L21 corresponding to the first backlight value L11 to the backlight driver module through a second path; the backlight driver module receives the first backlight value L11 sent by the first path at a first moment, and adjusts the screen brightness of the electronic device based on the first backlight value L11; the backlight driver module receives the second backlight value L21 sent by the second path at a second moment, and if the time difference between the second moment and the first moment is less than a time threshold, the second backlight value L21 is discarded.
[0011] In a possible implementation, the time threshold is determined based on the interval time between when the backlight driving module receives the backlight value sent from the second channel and the backlight value sent from the first channel in the statistical data.
[0012] For example, in multiple statistical samples, if it is determined that the maximum interval time between the backlight value sent by the second channel and the backlight value sent by the first channel received by the backlight driving module is within the time of two screen refresh frames, the time of two screen refresh frames can be used as the time threshold.
[0013] It can be understood that by using the maximum interval time between the backlight value sent by the second channel and the backlight value sent by the first channel received by the backlight driver module in the statistical data as the time threshold, it is possible to avoid adjusting the screen brightness of the electronic device based on the backlight value sent by the second channel during the process in which the backlight driver module adjusts the screen brightness of the electronic device based on the backlight value sent by the first channel.
[0014] In a possible implementation, after receiving the first backlight value L11 sent by the first channel, the flag bit of the second channel is set to a first flag within a time threshold.
[0015] In some embodiments, the first flag may be false.
[0016] In a possible implementation, when a second backlight value L21 sent by a second channel is received at a second moment and a time difference between the second moment and the first moment is less than a time threshold, the second backlight value L21 is discarded, including: when a second backlight value L21 sent by a second channel is received at a second moment and a flag bit of the second channel is determined to be a first flag, the second backlight value L21 is discarded.
[0017] In a possible implementation, within a time threshold for the second channel to maintain the first identifier, the first backlight value L12 issued by the first channel is detected; and the time for the second channel to maintain the first identifier is reset to the time threshold.
[0018] In a possible implementation, it is detected that the time for which the second path maintains the first flag exceeds a time threshold, and the flag bit of the second path is set to the second flag.
[0019] In some embodiments, the second flag may be true.
[0020] In a possible implementation, a third backlight value L31 sent by the second channel is received at a third moment, and a flag bit of the second channel is determined to be a second identifier, and the screen brightness of the electronic device is adjusted based on the third backlight value L31.
[0021] In a second aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device, and a processor, which is one of the one or more processors of the electronic device, for implementing any screen brightness adjustment method provided by the above-mentioned first aspect and various possible implementations of the above-mentioned first aspect.
[0022] In a third aspect, an embodiment of the present application provides a readable medium having instructions stored thereon, which, when executed on an electronic device, enables the electronic device to implement any screen brightness adjustment method provided by the first aspect and various possible implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 According to an embodiment of the present application, a schematic diagram of a scenario for adjusting the screen brightness of a tablet computer 10 is shown;
[0024] Figure 2 According to an embodiment of the present application, a flow chart of a method for sending a backlight value is shown;
[0025] Figure 3 According to an embodiment of the present application, a schematic diagram of a backlight change curve is shown;
[0026] Figure 4 According to an embodiment of the present application, a schematic diagram of a system architecture of an electronic device is shown;
[0027] Figure 5 According to an embodiment of the present application, an interactive schematic diagram of a method for adjusting screen brightness is shown;
[0028] Figure 6 According to an embodiment of the present application, a flow chart of a method for adjusting screen brightness is shown;
[0029] Figure 7 According to some embodiments of the present application, a schematic structural diagram of an electronic device 100 is shown. DETAILED DESCRIPTION
[0030] The illustrative embodiments of the present application include, but are not limited to, a screen brightness adjustment method, an electronic device, and a readable medium.
[0031] It can be understood that the technical solution of the present application is applicable to electronic devices with LTM dimming applications, for example, including but not limited to mobile phones, smart watches, televisions, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiments of the present invention do not impose any restrictions on the specific types of electronic devices.
[0032] The following first introduces the method of sending backlight values through two channels for applications (APP) supporting LTM dimming in electronic devices, such as Figure 2 As shown, the method includes:
[0033] 201: The user drags the brightness bar on the APP interface that supports LTM dimming.
[0034] It is understood that the user can drag the brightness bar in the APP interface that supports LTM dimming to increase or decrease the brightness of the APP interface. Among them, the APP that supports LTM dimming may include instant messaging applications, calendar applications, text messaging applications, etc. When the APP that supports LTM dimming receives the actual backlight value at each time point corresponding to the user dragging the brightness bar, the actual backlight value is simultaneously sent to the HWbinder module and LTM module of the hardware abstraction layer (HAL) in the electronic device.
[0035] For example, Figure 1 As shown, the user slides downward on the video application interface 101 of the tablet computer 10 to reduce the screen brightness. The actual backlight values received by the video application at each time point corresponding to the user dragging the brightness bar are: 55, 50, 45, 40, and each actual backlight value can be sent to the HWbinder module and the LTM module in turn.
[0036] 202: The HWbinder module receives the backlight value.
[0037] In some embodiments, after receiving the actual backlight value, the HWbinder module can send the actual backlight value to the backlight driver module through the HWbinder path based on a communication protocol such as an inter-integrated circuit (I2C) or a serial peripheral interface (SPI).
[0038] It can be understood that the HWbinder path is a path between the HWbinder module and the backlight driving module for transmitting the backlight value.
[0039] For example, the actual backlight values sent by the HWbinder channel are 55, 50, 45, and 40, respectively.
[0040] 203: The LTM module receives the backlight value.
[0041] In some embodiments, after the LTM module receives the actual backlight value, it can adjust the actual backlight value based on the backlight discount coefficient to obtain an adjusted backlight value, and send the adjusted backlight value to the backlight driver module through the LTM path. For example, the actual backlight values obtained by the LTM module are 55, 50, 45, 40, and the backlight discount coefficient is 0.95, then the adjusted backlight values sent by the LTM path are 52.25, 47.5, 42.75, and 38 respectively.
[0042] It can be understood that the LTM path is a path between the LTM module and the backlight driving module for transmitting the backlight value.
[0043] 204: The backlight driver module updates the backlight value recorded in the database based on the sde_backlight_device_update_status function.
[0044] In some embodiments, after the backlight driving module of the driving layer receives the actual backlight value sent by the HWbinder channel, it can call the first backlight function, such as the sde_backlight_device_update_status function, to update the backlight value recorded in the database.
[0045] 205: The backlight driver module updates the backlight value recorded in the database based on the sde_connector_update_dirty_properties function.
[0046] In some embodiments, after the backlight driver module receives the adjusted backlight value sent by the LTM channel, it can call a second backlight function, such as the sde_connector_update_dirty_properties function, to update the numerical value and properties of the backlight value recorded in the database (for example, the property is the backlight value adjusted based on the backlight discount coefficient).
[0047] 206: The backlight driving module sends the backlight value to the backlight panel.
[0048] In some embodiments, the backlight driving module may call a backlight validation function, such as a dsi_display_set_backlight function, to determine an output voltage or current based on the received actual backlight value and the adjusted backlight value, thereby changing the brightness of a backlight panel.
[0049] It can be understood that when the backlight driver module receives the actual backlight value and / or the adjusted backlight value, the output voltage or current is determined according to the actual backlight value and / or the adjusted backlight value, so as to adjust the brightness of the LCD through the output voltage or current. For example, if the backlight driver module first receives the actual backlight value sent by the HWbinder channel, and then receives the adjusted backlight value sent by the LTM channel, the backlight driver module first determines the output voltage or current according to the actual backlight value sent by the HWbinder channel, and then determines the output voltage or current according to the adjusted backlight value sent by the LTM channel. If the backlight driver module first receives the adjusted backlight value sent by the LTM channel, and then receives the actual backlight value sent by the HWbinder channel, the backlight driver module first determines the output voltage or current according to the adjusted backlight value sent by the LTM channel, and then determines the output voltage or current according to the actual backlight value sent by the HWbinder channel.
[0050] 207: Backlight brightness changes.
[0051] It can be understood that when the backlight panel receives the voltage or current output by the backlight driving module, the brightness level of the backlight panel is changed accordingly.
[0052] In the embodiment of the present application, since the HWbinder path and the LTM path belong to two different paths, the order of sending the backlight value cannot be adjusted, there is a probability that the backlight value will be adjusted interspersed in the actual backlight value received by the backlight driver module. For example, the backlight values received by the backlight driver module are 55, 52.25, 50, 47.5, 45, 40, 42.75, and 38, respectively. That is, in the process of the backlight value gradually decreasing, there is an upward trend from 40 to 42.75, and the backlight value has a sudden change, causing the LCD screen to flicker.
[0053] The following is a further introduction to the reasons why screen flicker occurs in electronic devices. Figure 3 A backlight variation curve is shown, with the horizontal axis representing time and the vertical axis representing the backlight value.
[0054] In an embodiment of the present application, some of the backlight values sent by an application supporting LTM dimming to both the HWbinder module and the LTM module include: 55, 50, 45, and 40. The actual backlight values sent by the HWbinder channel are 55, 50, 45, and 40, respectively, and the adjusted backlight values sent by the LTM channel are 52.25, 47.5, 42.75, and 38, respectively, after the backlight discount coefficient is discounted (taking the backlight discount coefficient as 0.95 as an example). Since the issuance of the backlight values of the HWbinder channel and the LTM channel is controlled by two threads, the electronic device does not restrict and control the issuance rules of the backlight values of the two channels, so there will be a variety of random situations in which the backlight values are interspersed. In some cases, the order of backlight values received by the backlight driver module conforms to the brightness adjustment rule corresponding to the user's operation of dragging the brightness bar. For example, the backlight values obtained by the above application based on the user dragging the brightness bar operation are 55, 50, 45, 40, that is, the brightness adjustment rule is gradually decreasing. When the backlight values received by the backlight driving module are 55, 52.25, 50, 47.5, 45, 42.75, 40, 38, the brightness adjustment rule corresponding to the user dragging the brightness bar operation is satisfied.
[0055] However, there are still some cases where the order of backlight values received by the backlight driver module does not conform to the brightness adjustment rule corresponding to the user's operation of dragging the brightness bar, for example Figure 3 As shown, the backlight values received by the backlight driver module are 55, 52.25, 50, 47.5, 45, 40, 42.75, and 38, that is, the adjusted backlight value 42.75 received by the backlight driver module is interspersed after the actual backlight value 40, resulting in a sudden increase from 40 to 42.75 and a decrease from 42.75 to 38 in the process of the backlight value gradually decreasing, so that the backlight value change curve received by the backlight driver module is not a smooth curve, thereby causing the screen of the electronic device, such as a liquid crystal display (LCD), to suddenly increase in brightness and then immediately decrease in the process of brightness reduction, that is, the screen flickers.
[0056] In order to solve the problem that the actual backlight value received by the backlight driver module is interspersed with the adjusted backlight value, so that the backlight change curve composed of the backlight value appears jagged, and the screen flickers in the process of the backlight driver module adjusting the screen brightness based on the actual backlight value and the adjusted backlight value, the embodiment of the present application provides a screen brightness adjustment method, which simultaneously sends the actual backlight value corresponding to the user's adjustment operation to the HWbinder module and the LTM module, such as the actual backlight value corresponding to the sliding brightness bar operation. After the HWbinder module and the LTM module receive the actual backlight value, the HWbinder module sends the actual backlight value to the backlight driver module through the HWbinder channel, the LTM module determines the adjusted backlight value based on the backlight discount coefficient and the actual backlight value, and the LTM module sends the adjusted backlight value to the backlight driver module through the LTM channel. When the backlight driver module receives the actual backlight value sent by the HWbinder channel, it discards the adjusted backlight value sent by the LTM channel within the preset time length. Avoid the backlight driver module adjusting the screen brightness based on the actual backlight value while also adjusting the screen brightness based on the adjusted backlight value, causing the screen flickering phenomenon.
[0057] The preset duration can be determined based on the maximum interval between the actual backlight value and the adjusted backlight value received by the backlight driver module in the statistical data. For example, in multiple statistical samples, the interval between the actual backlight value received by the backlight driver module and the adjacent adjusted backlight value is generally within the time of two screen refresh frames, then the time of two screen refresh frames can be used as the above preset duration, thereby avoiding the process of adjusting the screen brightness of the electronic device based on the adjusted backlight value when the backlight driver module adjusts the screen brightness of the electronic device based on the actual backlight value.
[0058] For example, for Figure 3 In the example shown in , the backlight driver module can discard the adjusted backlight value issued by the LTM channel within the preset time length when the actual backlight value 90 issued by the HWbinder channel is received for the first time. After adjusting the brightness based on the actual backlight value, the backlight driver module re-detects, and after detecting the actual backlight value 50 issued by the HWbinder channel, it again discards the adjusted backlight value issued by the LTM channel within the preset time length, so that the adjusted backlight value issued by the LTM channel has not been effective. In this way, the backlight driver module is prevented from adjusting the screen brightness based on the actual backlight value and the adjusted backlight value, causing the screen to flicker.
[0059] In some embodiments, when the electronic device is powered on and initialized, the flag bit (e.g., LTM_flag) corresponding to the LTM path is set to the second flag (e.g., true). When the backlight driver module detects the actual backlight value sent by the HWbinder path, the flag bit (e.g., LTM_flag) corresponding to the LTM path can be set to the first flag (e.g., False) within a preset duration. When the backlight driver module receives the adjusted backlight value sent by the LTM path, it can choose whether to send the adjusted backlight value sent by the LTM path by judging the state of the flag bit. For example, when the backlight driver module detects that the flag bit is the second flag, the adjusted backlight value sent by the LTM path is sent. When the flag bit is detected as the first flag, the adjusted backlight value sent by the LTM path is not sent.
[0060] In some embodiments, after the delay ends, that is, after the flag of the LTM path maintains the first flag for a preset period of time, the backlight driving module can restore the flag corresponding to the LTM path to the second flag.
[0061] For example, the preset duration is two frame times 16.6 ms. After the LTM path maintains the flag bit as the first mark for 16.6 ms, the backlight driving module switches the flag bit of the LTM path to the second mark.
[0062] In some embodiments, when the flag bit (eg, LTM_flag) corresponding to the LTM path maintains the first identification preset time length, if the HWbinder path sends the actual backlight value, the flag bit of the LTM path is reset to the first identification time.
[0063] For example, two frame time (16.6ms) is used as the preset time. When the flag of the LTM channel is the first flag 3ms, the HWbinder channel sends the actual backlight value, and the time when the flag of the LTM channel is the first flag is re-timed.
[0064] The following is an introduction to the system architecture of the electronic device corresponding to the screen brightness adjustment method provided in the embodiment of the present application. Figure 4 As shown, the system architecture of the electronic device includes an application layer, a framework layer, a HAL layer, a driver layer and a hardware layer.
[0065] The application layer includes apps that support LTM dimming, such as camera, calendar, call, map, navigation, music, clock, short message and other applications.
[0066] The framework layer includes a display synthesis system (surfaceflinger). The display synthesis system is used to detect the user's operation instructions and send the data corresponding to the user's operation instructions to the corresponding application. For example, when the display synthesis system of an APP that supports LTM dimming detects the actual backlight value corresponding to the user dragging the brightness bar, the actual backlight value is sent to the HWbinder module and LTM module of the HAL layer at the same time.
[0067] The HAL layer includes an HWbinder module and an LTM module. The HWbinder module is used to receive the actual backlight value sent by the display synthesis system, and send the actual backlight value to the backlight driver module through the HWBinder channel. The LTM module is used to receive the actual backlight value sent by the display synthesis system, improve the image contrast based on the actual backlight value, calculate the adjusted backlight value sent by the backlight discount coefficient and the actual backlight value, and send the adjusted backlight value adjusted by the backlight discount coefficient through the LTM channel, thereby reducing the backlight brightness and saving power consumption.
[0068] The driver layer is a layer between hardware and software, and the driver layer includes at least a backlight driver module (setbacklight). The backlight driver module is used to receive the actual backlight value sent by the HWbinder channel corresponding to the HWbinder module and the adjusted backlight value sent by the LTM channel of the LTM module, and adjust the output current and voltage according to the actual backlight value and / or the adjusted backlight value, thereby adjusting the brightness of the backlight panel.
[0069] In an embodiment of the present application, when the backlight driver module detects the actual backlight value sent by the HWbinder channel, the flag of the LTM channel is switched from the second flag to the first flag to discard the adjusted backlight value sent by the LTM channel, so as to avoid the adjusted backlight value sent by the LTM channel appearing in the actual backlight value output by the HWbinder channel, causing the backlight change curve composed of the backlight values to appear jagged, resulting in the problem of screen flickering.
[0070] The hardware layer includes an LCD. A backlight panel (or light-homogenizing panel) and a reflective film are arranged on the back of the LCD. The backlight panel is made of fluorescent material and can emit light to provide a uniform background light source.
[0071] Combine the following Figure 4 The system architecture of the electronic device shown in the figure is used to describe in detail the screen brightness adjustment method provided in the embodiment of the present application. The screen brightness adjustment method in the embodiment of the present application is applied to the electronic device. Figure 5 A schematic diagram of a screen brightness adjustment method according to an embodiment of the present application is shown. The screen brightness adjustment method includes:
[0072] 501: The application sends the actual backlight value to the HWbinder module and the LTM module at the same time.
[0073] In the embodiment of the present application, the application may be an application supporting LTM dimming, such as an instant messaging application, a calendar application, a text messaging application, etc. When the APP supporting LTM dimming receives the actual backlight value at the corresponding time point when the user drags the brightness bar, the actual backlight value is sent to the HWbinder module and the LTM module at the same time, so as to send the actual backlight value to the LCD through the HWbinder path and the LTM path.
[0074] For example, the chat application receives the actual backlight values at each time point corresponding to the user dragging the brightness bar, which are: actual backlight value L11, actual backlight value L12, and actual backlight value L13. The chat application sends the actual backlight value L11, actual backlight value L12, and actual backlight value L13 to the HWbinder module and the LTM module in sequence.
[0075] 502: The HWbinder module sends the actual backlight value to the backlight driver module.
[0076] It can be understood that the HWbinder module can send the actual backlight value to the backlight driving module through the HWbinder path.
[0077] For example, the HWbinder module may send the actual backlight value L11, the actual backlight value L12, and the actual backlight value L13 to the backlight driving module in sequence through the HWbinder path.
[0078] 503: The LTM module processes the actual backlight value to obtain an adjusted backlight value.
[0079] In the embodiment of the present application, the adjusted backlight value=actual backlight value×backlight discount coefficient.
[0080] For example, the backlight discount coefficient of the LTM module is 0.95, and the actual backlight value L11 is 100, then the adjusted backlight value L21=100×0.95=95.
[0081] It can be understood that the size of the backlight discount factor depends on the system settings of the LTM module and has nothing to do with the application that supports LTM dimming.
[0082] 504: The LTM module sends the backlight adjustment value to the backlight driving module.
[0083] For example, the LTM path of the LTM module sequentially sends the adjusted backlight value L21 corresponding to the actual backlight value L11, the adjusted backlight value L22 corresponding to the actual backlight value L12, and the adjusted backlight value L23 corresponding to the actual backlight value L13 to the backlight driving module.
[0084] 505: The backlight driving module updates the flag bit of the LTM path to the first flag.
[0085] In the embodiment of the present application, when the electronic device is started, the backlight driver module sets the flag of the LTM path to the second flag. When the backlight driver module detects the actual backlight value sent by the HWbinder path, the flag of the LTM path is updated to the first flag to discard the adjusted backlight value sent by the LTM path, so as to avoid adjusting the screen brightness of the electronic device based on the adjusted backlight value sent by the LTM path in the process of adjusting the screen brightness of the electronic device based on the actual backlight value sent by the HWbinder path, thereby causing the screen to flicker.
[0086] The first identifier may be false, and the second identifier may be true. The first identifier and the second identifier may be set according to actual needs.
[0087] 506: The backlight driving module sends the actual backlight value to the LCD.
[0088] For example, the backlight driving module sends the actual backlight value L11, the actual backlight value L12, and the actual backlight value L13 to the LCD in sequence.
[0089] In the embodiment of the present application, the backlight driving module can adjust the output voltage or current based on the actual backlight value L11, the actual backlight value L12, and the actual backlight value L13, thereby adjusting the screen brightness of the LCD.
[0090] For example, when the backlight driving module receives the actual backlight value L11 at the first moment, the screen brightness of the LCD is adjusted based on the actual backlight value L11.
[0091] 507: The backlight driver module determines whether the countdown is over or whether the HWbinder path has not sent the actual backlight value to the backlight driver module. If the determination result is yes, go to 508: The backlight driver module updates the flag bit of the LTM path to the second flag; if the determination result is no, return to execute step 507: The backlight driver module determines whether the countdown is over or whether the HWbinder path has not sent the actual backlight value to the backlight driver module.
[0092] In the embodiment of the present application, after the backlight driving module updates the flag of the LTM path to the first flag, a delayed asynchronous work queue (delayed_work) can be added to count down according to a preset duration.
[0093] In some embodiments, the preset time can be determined based on the maximum interval time between the actual backlight value received by the backlight driver module and the adjacent adjusted backlight value in the statistical data, thereby avoiding adjusting the screen brightness of the electronic device based on the adjusted backlight value while the backlight driver module adjusts the screen brightness of the electronic device based on the actual backlight value.
[0094] For example, the preset duration is two frames of delay of the current frame rate, and after the delay, the flag of the LTM path is updated to the second flag. The frame rate is the frequency (rate) at which the bitmap image in units of frames appears continuously on the display.
[0095] For example, two frame times (16.6 ms) are used as the preset time. After the LTM path keeps the flag bit as false for 16.6 ms, the flag bit of the LTM path is switched to true.
[0096] In some embodiments, when the flag of the LTM path is kept at the first identification preset time, if the backlight driving module detects the actual backlight value sent by the HWbinder path, the flag of the LTM path is reset to the first identification time.
[0097] For example, two frame times (16.6ms) are used as the preset duration. When the LTM path flag is 3ms of the first identifier, the backlight driver module detects the actual backlight value sent by the HWbinder path, and then re-times the LTM path flag to the first identifier time.
[0098] For example, if the backlight driving module receives the adjusted backlight value L21 corresponding to the actual backlight value L11 at the second moment, and the time difference between the second moment and the first moment is less than two frame times, the adjusted backlight value L21 is discarded.
[0099] Alternatively, when the backlight driving module receives the adjusted backlight value L21 corresponding to the actual backlight value L11 at the second moment, and the flag bit of LTM is the first flag, the adjusted backlight value L21 is discarded.
[0100] 508: The backlight driving module updates the flag bit of the LTM channel to the second flag.
[0101] It can be understood that when the flag bit of the LTM path is the second flag, the backlight driving module sends the adjusted backlight value sent by the LTM path to the LCD.
[0102] In an embodiment of the present application, when the backlight driving module receives the adjusted backlight value L31 sent by the LTM channel at the third moment and determines that the flag bit of the LTM channel is the second flag, the backlight driving module adjusts the screen brightness of the electronic device based on the adjusted backlight value L31 sent by the LTM channel.
[0103] It can be understood that in the embodiment of the present application, when the backlight driver module only receives the adjusted backlight value sent by the LTM channel, for example, in a scenario where the user has not adjusted the screen brightness, the backlight driver module adjusts the screen brightness based on the adjusted backlight value (such as the adjusted backlight value L31) sent by the LTM channel. When the backlight driver module receives the actual backlight value sent by the HWbinder channel, the flag of the LTM channel is switched from the second identifier to the first identifier to discard the adjusted backlight value sent by the LTM channel, so as to avoid adjusting the screen brightness based on the adjusted backlight value in the process of adjusting the screen brightness based on the actual backlight value, thereby causing the screen to flicker.
[0104] Figure 6 A schematic diagram of a screen brightness adjustment method according to an embodiment of the present application is shown. Figure 2 In the illustrated embodiment, steps 606-608 are added between steps 205 and 206, and the screen brightness adjustment method includes:
[0105] 601: The user drags the brightness bar on the APP interface that supports LTM dimming.
[0106] 602: The HWbinder module receives the backlight value.
[0107] 603: The LTM module receives the backlight value.
[0108] 604: The backlight driver module updates the status of the backlight value recorded in the database based on the sde_backlight_device_update_status function.
[0109] 605: The backlight driver module updates the properties of the backlight value recorded in the database based on the sde_connector_update_dirty_properties function.
[0110] It can be understood that steps 601 to 605 of the embodiment of the present application correspond to Figure 2 Steps 201 - 205 of the illustrated embodiment will not be described in detail here.
[0111] 606: Determine whether there is a backlight value. If the determination result is yes, go to 607: Start a two-frame time countdown according to the current frame rate. If the determination result is no, return to 606: Determine whether there is a backlight value.
[0112] In the embodiment of the present application, when the electronic device is started, the backlight driver module sets the flag of the LTM path to the second flag. When the backlight driver module detects the actual backlight value sent by the HWbinder path, the flag of the LTM path is switched to the first flag within a preset time (countdown time) to achieve the abandonment of the adjusted backlight value sent by the LTM path within the preset time, and go to step 607 to determine the time for the flag of the LTM path to remain as the first flag. When the backlight driver module does not detect the actual backlight value sent by the HWbinder path, the judgment result is no, and the HWbinder path is continuously detected to see whether the actual backlight value is sent.
[0113] 607: Start a two-frame time countdown based on the current frame rate.
[0114] In some embodiments, the countdown time can be determined based on the maximum interval time between the actual backlight value received by the backlight driver module and the adjacent adjusted backlight value in the statistical data, thereby avoiding adjusting the screen brightness of the electronic device based on the adjusted backlight value while the backlight driver module adjusts the screen brightness of the electronic device based on the actual backlight value.
[0115] 608: Determine whether the countdown is over. If the determination result is yes, go to 609: the backlight driving module sends the backlight value to the backlight panel; if the determination result is no, return to step 608: determine whether the countdown is over.
[0116] In the embodiment of the present application, when the countdown ends, the backlight driving module switches the flag of the LTM path to the second flag, and goes to step 609 to issue the actual backlight value issued by the LTM path. If the countdown is not over, it returns to determine whether the countdown is over.
[0117] It can be understood that in the embodiment of the present application, during the countdown time when the LTM path keeps the flag bit as the first identifier, if the HWbinder path sends the actual backlight value, the backlight driving module re-times the time when the LTM path keeps the flag bit as the first identifier.
[0118] For example, two frame times (16.6 ms) are used as the preset time. When the flag of the LTM path is false for 3 ms, the HWbinder path receives the actual backlight value, and the backlight driving module re-times the time when the flag of the LTM path is the first mark.
[0119] 609: The backlight driving module sends the backlight value to the backlight panel.
[0120] In the embodiment of the present application, the backlight driving module can call the backlight activation function, such as dsi_display_set_backlight, to determine the output voltage or current based on the backlight value sent by the received HWbinder channel, thereby adjusting the brightness of the backlight panel.
[0121] 610: Backlight brightness changes.
[0122] It can be understood that when the backlight panel receives the voltage or current output by the backlight driving module, the brightness level of the backlight panel is changed accordingly.
[0123] In an embodiment of the present application, when the backlight driver module receives the actual backlight value sent by the HWbinder channel, the flag of the LTM channel is switched from the second flag to the first flag to discard the adjusted backlight value sent by the LTM channel, thereby avoiding adjusting the screen brightness based on the adjusted backlight value while adjusting the screen brightness based on the actual backlight value, causing screen flickering.
[0124] The hardware structure of each electronic device mentioned in this application is described below by taking the electronic device 100 as an example. Figure 7 As shown, the electronic device 100 may include a processor 110, a power module 140, a memory 180, a mobile communication module 130, a wireless communication module 120, a sensor module 190, an audio module 150, a camera 170, an interface module 160, a button 101 and a display screen 102, etc.
[0125] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0126] The processor 110 may include one or more processing units, for example, a processing module or processing circuit including a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP), a microprocessor (MCU), an artificial intelligence (AI) processor, or a programmable logic device (field programmable gate array, FPGA). Different processing units may be independent devices or integrated into one or more processors. A storage unit may be provided in the processor 110 for storing instructions and data. In some embodiments, the storage unit in the processor 110 is a cache memory 180.
[0127] It can be understood that the screen brightness adjustment method in the embodiment of the present application can be executed by the processor 110 of the corresponding electronic device. The power module 140 may include a power supply, a power management component, etc. The power supply may be a battery. The power management component is used to manage the charging of the power supply and the power supply of the power supply to other modules. In some embodiments, the power management component includes a charging management module and a power management module. The charging management module is used to receive charging input from the charger; the power management module is used to connect the power supply, the charging management module and the processor 110. The power management module receives input from the power supply and / or the charging management module to power the processor 110, the display screen 102, the camera 170, and the wireless communication module 120.
[0128] The mobile communication module 130 may include, but is not limited to, an antenna, a power amplifier, a filter, a low noise amplifier (LNA), etc. The mobile communication module 130 may provide a solution for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 130 may receive electromagnetic waves by an antenna, and perform filtering, amplification, and other processing on the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 130 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be arranged in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be arranged in the same device as at least some of the modules of the processor 110.
[0129] The wireless communication module 120 may include an antenna, and transmit and receive electromagnetic waves via the antenna. The wireless communication module 120 may provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied to the electronic device 100. The electronic device 100 may communicate with the network and other devices through wireless communication technology.
[0130] It can be understood that in the embodiment of the present application, when the electronic device is a receiving device, the video data and audio data from other electronic devices in the recording group, as well as the recording content label and time stamp information corresponding to each data, can be received through the wireless communication module. And when the electronic device is a sending device, the video data and audio data, as well as the recording content label and time stamp information corresponding to each data, can be sent to other electronic devices in the recording group through the wireless communication module.
[0131] In some embodiments, the mobile communication module 130 and the wireless communication module 120 of the electronic device 100 may also be located in the same module.
[0132] The display screen 102 is used to display a human-computer interaction interface, images, videos, etc. The display screen 102 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), a quantum dot light emitting diode (QLED), etc.
[0133] The sensor module 190 may include a proximity light sensor, a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
[0134] The audio module 150 is used to convert digital audio information into an analog audio signal output, or to convert an analog audio input into a digital audio signal. The audio module 150 can also be used to encode and decode audio signals. In some embodiments, the audio module 150 can be arranged in the processor 110, or some functional modules of the audio module 150 can be arranged in the processor 110. In some embodiments, the audio module 150 may include a speaker, an earpiece, a microphone, and an earphone interface. The camera 170 is used to capture static images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the image signal processing (image signal processing, ISP) to convert it into a digital image signal. The electronic device 100 can realize the shooting function through the ISP, the camera 170, the video codec, the graphic processing unit (graphic processing unit, GPU), the display screen 102 and the application processor.
[0135] The interface module 160 includes an external memory interface, a USB interface, and a subscriber identification module (SIM) card interface. The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface to implement a data storage function. The universal serial bus interface is used for the electronic device 100 to communicate with other electronic devices. The subscriber identification module card interface is used to communicate with a SIM card installed in the electronic device 100, for example, to read a phone number stored in the SIM card, or to write a phone number into the SIM card.
[0136] In some embodiments, the electronic device 100 further includes a button 101, a motor, and an indicator. The button 101 may include a volume button, a power on / off button, etc. The motor is used to make the electronic device 100 vibrate, for example, vibrate when the user's electronic device 100 is called, so as to prompt the user to answer the call of the electronic device 100. The indicator may include a laser indicator, a radio frequency indicator, an LED indicator, etc.
[0137] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.
[0138] Program code may be applied to input instructions to perform the functions described herein and to generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0139] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0140] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to floppy disks, optical disks, optical disks, read-only memories (compact disc-read only memories, CD-ROMs), magneto-optical disks, read-only memories (read only memory, ROM), random access memories (random access memory, RAM), erasable programmable read-only memories (erasable programmable read-only memories, EPROM), electrically erasable programmable read-only memories (electrically erasable programmable read-only memories, EEPROM), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Accordingly, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).
[0141] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0142] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0143] It should be noted that in the examples and description of this patent, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, an element defined by the sentence "comprises one" does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0144] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims
1. A screen brightness adjustment method, characterized in that: Applied to electronic equipment, the method comprises: receiving, at a first moment, a first backlight value L11 sent by a first channel, and adjusting the screen brightness of the electronic device based on the first backlight value L11; When a second backlight value L21 sent by a second channel is received at a second moment, and a time difference between the second moment and the first moment is less than a time threshold, the second backlight value L21 is discarded; The first backlight value L11 is one of multiple first backlight values sent by the first path in response to a first operation of a user adjusting the screen brightness in a first application interface, and the second backlight value L21 is one of multiple second backlight values sent by the second path in response to a first operation of a user adjusting the screen brightness in the first application interface, wherein the second backlight value is less than the corresponding first backlight value.
2. The screen brightness adjustment method according to claim 1, characterized in that: The first path is a process communication path, and the second path is a local tone mapping path.
3. The screen brightness adjustment method according to claim 1, characterized in that: The electronic device includes a backlight driving module, and the method includes: The first application sends the first backlight value L11 to the first module and the second module simultaneously; The first module sends the first backlight value L11 to the backlight driving module through the first path; The second module sends the second backlight value L21 corresponding to the first backlight value L11 to the backlight driving module through the second path; The backlight driving module receives the first backlight value L11 sent by the first channel at the first moment, and adjusts the screen brightness of the electronic device based on the first backlight value L11; The backlight driving module receives the second backlight value L21 sent by the second channel at the second moment, and if the time difference between the second moment and the first moment is less than the time threshold, the second backlight value L21 is discarded.
4. The screen brightness adjustment method according to claim 1 or 3, characterized in that: The time threshold is determined based on the interval time between when the backlight driving module receives the backlight value sent by the second channel and the backlight value sent by the first channel in the statistical data.
5. The screen brightness adjustment method according to claim 1, characterized in that: include: After receiving the first backlight value L11 sent by the first channel, the flag bit of the second channel is set to a first indicator within the time threshold.
6. The screen brightness adjustment method according to claim 5, characterized in that: The method of receiving a second backlight value L21 sent by a second channel at a second moment, and discarding the second backlight value L21 when a time difference between the second moment and the first moment is less than a time threshold, comprises: When the second backlight value L21 sent by the second channel is received at the second moment and it is determined that the flag bit of the second channel is the first identifier, the second backlight value L21 is discarded.
7. The screen brightness adjustment method according to claim 5 or 6, characterized in that: include: Within the time threshold that the second channel maintains the first identifier, a first backlight value L12 issued by the first channel is detected; The time for the second path to maintain the first identifier is reset to the time threshold.
8. The screen brightness adjustment method according to claim 5 or 6, characterized in that: include: It is detected that the time for which the second path maintains the first identification exceeds the time threshold, and the flag bit of the second path is set to a second identification.
9. The screen brightness adjustment method according to claim 8, characterized in that: include: At a third moment, a third backlight value L31 sent by the second channel is received, and the flag bit of the second channel is determined to be a second identifier, and the screen brightness of the electronic device is adjusted based on the third backlight value L31.
10. An electronic device, characterized in that: It includes: a memory for storing instructions executed by one or more processors of the electronic device, and the processor, which is one of the one or more processors of the electronic device, for executing the screen brightness adjustment method described in any one of claims 1 to 9.
11. A readable medium, characterized in that: The readable medium stores instructions, which, when executed on an electronic device, enable the electronic device to execute the screen brightness adjustment method according to any one of claims 1 to 9.