Brightness control method, electronic device, storage medium and program product
By directly writing to the DPCD register using the embedded controller EC and I2C bus in Windows-based electronic devices, the incompatibility problem of brightness adjustment caused by display driver anomalies was solved, achieving safe and efficient brightness adjustment and improving the maximum brightness of OLED display panels.
Patent Information
- Application Number
- CN202410691929.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-30
- Publication Date
- 2025-12-09
AI Technical Summary
In electronic devices using Windows systems, the brightness adjustment of the display panel depends on the display driver. If the display driver malfunctions, the brightness cannot be adjusted, resulting in incompatibility in brightness adjustment and limiting the maximum brightness of the OLED display panel.
By acquiring the average brightness (APL) of the screen to be displayed and using the embedded controller EC to directly write it to the DPCD register via the I2C bus for brightness adjustment, the system avoids dependence on the display driver, thus achieving compatibility and security in brightness adjustment.
Even if the display driver malfunctions, brightness adjustment can still be achieved, improving compatibility and meeting safe current limits without increasing additional costs, thereby increasing the maximum brightness of the display panel.
Smart Images

Figure CN121096288A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display technology, specifically to a brightness control method, electronic device, storage medium, and program product. Background Technology
[0002] For electronic devices such as computers using Windows systems, adjusting the brightness of the display panel requires modifying the values in the corresponding registers through the display driver. This means that if the display driver malfunctions, the brightness cannot be adjusted. Summary of the Invention
[0003] In view of this, this application provides a brightness control method, electronic device, storage medium, and program product that can achieve brightness adjustment without relying on a display driver.
[0004] In a first aspect, embodiments of this application provide a brightness control method, comprising: acquiring the average brightness (APL) of a screen to be displayed; if the average brightness (APL) is less than a preset value, sending a first instruction to an embedded controller EC, the first instruction being used to control the embedded controller EC to write the first brightness into a display port configuration data (DPCD) register via an integrated circuit interconnect (I2C) bus; if the average brightness (APL) is not less than the preset value, sending a second instruction, the second instruction being used to write a second brightness into the display port configuration data (DPCD) register, the second brightness being less than the first brightness.
[0005] When brightness needs to be increased, the APL (Advanced Brightness Limiter) of the displayed image can be determined. If the APL is less than a preset value, the brightness can be adjusted to a higher initial brightness so that subsequent images are displayed at a higher initial brightness. Because the APL of this image is low, even if the maximum brightness is high, the overall drive current of the display panel will not exceed the maximum safe current. This allows for higher display brightness for individual pixels while meeting safety requirements. Conversely, if the APL is not less than the preset value, the brightness can be adjusted to a lower second brightness so that subsequent images are displayed at a lower second brightness. Because the APL of this image is high, the lower second brightness ensures that the overall drive current of the display panel will not exceed the maximum safe current, thus meeting safety requirements. Furthermore, the adjustment of the first brightness is achieved by sending a first command to the EC (Electronic Control Center) so that the EC can write the first brightness into the DPCD register. This process is implemented through an external hardware path that does not rely on the display driver. In other words, even if the display driver malfunctions, the first brightness can still be adjusted, thereby improving the compatibility of brightness adjustment. Moreover, the brightness path is implemented based on the existing underlying EC hardware, eliminating the need for an additional Auto Brightness Limiter (ABL) circuit, resulting in lower costs.
[0006] In one possible implementation, sending the second instruction includes sending a second instruction to the embedded controller EC, the second instruction being used to control the embedded controller EC to write the second brightness value into the display port configuration data DPCD register via the integrated circuit interconnect I2C bus. That is, since the adjustment of the first brightness value can be independent of the display driver, the adjustment of the second brightness value can also be independent of the display driver, thereby further improving the compatibility of brightness adjustment.
[0007] In one possible implementation, obtaining the average brightness (APL) of the image to be displayed includes: obtaining a first parameter, which is related to the number of pixels in the first grayscale value statistical interval [0, a) of the image to be displayed, where 0 ≤ a < 255; the average brightness (APL) being less than a preset value includes: the first parameter being greater than a first threshold; the average brightness (APL) not being less than a preset value includes: the first parameter not being greater than the first threshold. The first parameter can reflect the number of pixels in the first grayscale value statistical interval [0, a) of the image to be displayed. The first grayscale value statistical interval [0, 10) is the darkest grayscale value statistical interval. Based on the number of pixels in the darkest grayscale value statistical interval of the image to be displayed, the APL can be determined relatively easily, thereby enabling adjustment to a first brightness with a larger brightness using EC when the APL is low.
[0008] In one possible implementation, obtaining the average brightness (APL) of the image to be displayed further includes: obtaining a second parameter and a third parameter, wherein the second parameter is related to the number of pixels in the second grayscale value statistical interval [a, b) of the image to be displayed, and the third parameter is related to the number of pixels in the third grayscale value statistical interval [b, 255] of the image to be displayed, where a < b < 255; the average brightness (APL) being less than a preset value includes: the first parameter being greater than a first threshold, and the second parameter being less than the second threshold, and the third parameter being greater than the third threshold; the average brightness (APL) not being less than the preset value includes: the first parameter not being greater than the first threshold, or the second parameter not being less than the second threshold, or the third parameter not being greater than the third threshold. The second parameter can reflect the number of pixels in the second grayscale value statistical interval [a, b) of the image to be displayed, and the third parameter can reflect the number of pixels in the third grayscale value statistical interval [b, 255] of the image to be displayed. Based on the number of pixels in multiple grayscale value statistical intervals in the image to be displayed, it is possible to more accurately determine whether the APL is less than the preset value, thereby improving the accuracy of brightness adjustment.
[0009] In one possible implementation, the first parameter is the number of pixels in the first grayscale value statistical interval [0, a) of the image to be displayed; or, the first parameter is the percentage of pixels in the first grayscale value statistical interval [0, a) of the image to be displayed. The APL can be easily determined based on the number of pixels or the percentage of pixels in the darkest grayscale value statistical interval of the image to be displayed, thereby enabling adjustment to a first brightness with a higher brightness using EC when the APL is low.
[0010] In one possible implementation, the first parameter is the number of pixels in the first grayscale value statistical interval [0, a) of the image to be displayed, the second parameter is the number of pixels in the second grayscale value statistical interval [a, b) of the image to be displayed, and the third parameter is the number of pixels in the third grayscale value statistical interval [b, 255] of the image to be displayed; or, the first parameter is the percentage of pixels in the first grayscale value statistical interval [0, a) of the image to be displayed, the second parameter is the percentage of pixels in the second grayscale value statistical interval [a, b) of the image to be displayed, and the third parameter is the percentage of pixels in the third grayscale value statistical interval [b, 255] of the image to be displayed. Based on the number of pixels or the percentage of pixels in multiple grayscale value statistical intervals in the image to be displayed, it is possible to more accurately determine whether the APL is less than a preset value, thereby improving the accuracy of brightness adjustment.
[0011] In one possible implementation, when a brightness adjustment message is received, the process of obtaining the average brightness (APL) of the screen to be displayed is executed. On the one hand, if no brightness adjustment message is received, it indicates that the current scene does not require high brightness, so there is no need to trigger APL-based brightness adjustment to avoid adjusting the brightness in a scene where high brightness is not required, thereby affecting the user experience. On the other hand, when a brightness adjustment message is received, especially a brightness adjustment message that adjusts to the maximum brightness, it indicates that the current scene requires high brightness, so APL-based brightness adjustment can be triggered to provide appropriate display brightness based on the screen to be displayed.
[0012] In one possible implementation, when a first application is running and high dynamic range (HDR) imaging mode is enabled, a process is performed to acquire the average brightness (APL) of the image to be displayed. The first application could be, for example, a video playback application or an image processing application. The purpose of HDR mode is to more accurately reflect the range of brightness from the brightest to the darkest in the real world. Video or image playback in HDR mode requires higher maximum brightness to achieve a greater dynamic range. Therefore, when the first application is running and HDR mode is enabled, it indicates that a high-brightness scene is required, and thus APL-based brightness adjustment can be triggered to provide appropriate display brightness based on the image to be displayed. When the first application is not running or HDR mode is not enabled, it indicates that a high-brightness scene may not be required, and therefore APL-based brightness adjustment will not be triggered to avoid adjusting brightness in scenes where high brightness is not needed, thereby affecting the user experience.
[0013] In one possible implementation, when a brightness adjustment message is received that sets the maximum brightness to the display brightness, a process of obtaining the average brightness (APL) of the screen to be displayed is executed. When the user or system sets the brightness to the maximum brightness of 100%, it indicates that the current scene requires the maximum dynamic range. Therefore, this can be used to trigger a brightness adjustment process based on APL, so as to provide a larger dynamic range when the APL is less than a preset value.
[0014] In one possible implementation, the brightness control method further includes: intercepting the brightness adjustment message via a hook function when a brightness adjustment message is received. This method is compatible with the current brightness adjustment process and does not require modification of the underlying brightness adjustment process. Instead, it intercepts the brightness adjustment message in the current brightness adjustment process via hooking, preventing the brightness adjustment message from being passed to the display driver and executing the APL-based brightness adjustment process.
[0015] In one possible implementation, after controlling the embedded controller EC to write the first brightness into the display port configuration data DPCD register via the integrated circuit interconnect I2C bus, the method further includes: periodically acquiring the average brightness (APL) of the screen to be displayed; if the currently acquired average brightness (APL) is not less than a preset value, then controlling the embedded controller EC to write the second brightness into the display port configuration data DPCD register via the integrated circuit interconnect I2C bus. After writing the first brightness into the DPCD via the EC based on APL, APL can continue to be periodically checked. When APL is not less than the preset value, the second brightness is written into the DPCD to prevent the drive current of the display panel from exceeding the maximum safe current.
[0016] In a second aspect, an electronic device is provided, comprising: a display screen; the display screen including a Display Port Configuration Data (DPCD) register; an embedded controller (EC); an integrated circuit interconnect (I2C) bus; a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device performs the aforementioned brightness control method.
[0017] Fourthly, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the above-described brightness control method.
[0018] Fifthly, a computer program product is provided, which includes executable instructions that, when executed on a computer, cause the computer to perform the aforementioned brightness control method. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of a screen with 10% APL;
[0021] Figure 2 These are schematic diagrams of two brightness adjustment processes in related technologies;
[0022] Figure 3 This is a structural block diagram of an electronic device according to an embodiment of this application;
[0023] Figure 4 This is a software architecture block diagram in an embodiment of this application;
[0024] Figure 5 This is a flowchart illustrating a brightness control method according to an embodiment of this application;
[0025] Figure 6 This is a flowchart illustrating another brightness control method in an embodiment of this application;
[0026] Figure 7 This is a flowchart illustrating another brightness control method in an embodiment of this application;
[0027] Figure 8 This is a flowchart illustrating another brightness control method in an embodiment of this application;
[0028] Figure 9This is a flowchart illustrating another brightness control method in an embodiment of this application. Detailed Implementation
[0029] 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.
[0030] 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.
[0031] 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.
[0032] It should be understood that the term "and / or" used in this article 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 existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0033] First, let's explain some of the terms used in the following text.
[0034] Organic light-emitting diodes (OLEDs) emit light themselves through organic materials under the influence of a driving current. Due to this self-emissive nature, every pixel must be lit for a pure white image, while every pixel is off for a pure black image. Because of power consumption limitations of the display panel, when not displaying a pure white image, each pixel can be allocated more power, achieving higher brightness. However, the larger the proportion of pure white or near-pure white displays, the less light-emitting power each pixel can use, resulting in lower brightness.
[0035] High Brightness Monitor (HBM) is a high-brightness mode of OLED display panels. HBM brightness usually refers to the maximum brightness that can be achieved when the entire screen is white.
[0036] Average Picture Luminance (APL) refers to the average brightness of the luminous area of an OLED display panel. For example... Figure 1 This illustrates a specific screen layout with 10% APL, where 10% of the screen is white and 90% is black.
[0037] A hook is a mechanism in Windows systems used to intercept, monitor, and process messages or events transmitted in computer programs. Its basic principle is to capture specific types of messages or events by registering callback functions or hook functions. When a message or event occurs in the program, the system or framework calls the corresponding callback or hook function to pass the relevant information of the message to the corresponding function, so as to obtain the message content, intercept and record certain messages, and perform specific operations.
[0038] The timing controller (Tcon) is the core circuit that controls the timing actions of the display panel. It is used to convert video signals into the data signal format required by the driving circuit in the display panel.
[0039] Embedded DisplayPort (EDP) is a display communication protocol consisting of three main channels: the main link channel, the auxiliary (AUX) channel, and the hot-swappable channel.
[0040] The AUX channel is an auxiliary channel of the EDP protocol. It is an independent bidirectional half-duplex channel used to transmit configuration parameters and commands. It can access DisplayPort Configuration Data (DPCD) and Extended Display Identification Data (EDID), and can also transmit Inter-Integrated Circuit (I2C) data.
[0041] The DPCD register is a set of registers for the display screen, mainly used to store the preset parameter information and operating status information of the display panel. It is an important medium for the interaction between the display screen and the external environment.
[0042] I2C is a synchronous half-duplex communication bus that includes a serial data line (SDA) and a serial clock line (SCL).
[0043] Before describing the embodiments of this application, related technologies and their technical problems are introduced. For example... Figure 2As shown, for example, during manual brightness adjustment, when the user adjusts the brightness to 100% through the application, the application calls the system's exposed application programming interface (API). Based on the mapping relationship between the brightness ratio and the brightness value, the brightness ratio of 100% is converted into the corresponding brightness value of 400 nits. The display driver then modifies the DPCD register using the AUX channel of the EDP protocol, i.e., sends out a brightness of 400 nits. After detecting the updated brightness value of 400 nits in the DPCD register, the Tcon IC maps the corresponding display brightness value (Data Brightness Value, DBV) based on the brightness value of 400 nits, i.e., performs DBV mapping, to adjust the display panel to the corresponding brightness. The automatic brightness adjustment process is similar to the manual brightness adjustment process. The difference is that before the system sends the brightness value through the display driver, it will obtain the ambient light brightness collected by the ambient light sensor, for example, 300 lux. According to the mapping relationship between ambient light and display brightness value, 300 lux is converted into the corresponding display brightness value of 400 nit. Then, the display driver uses the AUX channel of the EDP protocol to modify the brightness DPCD register, that is, send the brightness of 400 nit. The specific process after that is the same as the manual brightness adjustment process, and will not be described in detail.
[0044] It is evident that, on the one hand, in related technologies, brightness adjustment needs to be achieved through a display driver; if the display driver malfunctions, brightness adjustment cannot be achieved.
[0045] On the other hand, the display brightness of an Organic Light-Emitting Diode (OLED) display panel is positively correlated with its driving current. To protect the OLED display panel, its driving current needs to be limited, which restricts its maximum brightness, resulting in a lower maximum brightness. Assuming the maximum safe current for an OLED display panel is 21 mA, and a full-screen white display with a brightness of 400 nits corresponds to a current of 21 mA, related technologies, to ensure the driving current does not exceed 21 mA, set the maximum brightness of the display panel to 400 nits. Therefore, the current limitation in these technologies leads to a lower brightness for the OLED display panel.
[0046] The electronic devices involved in the embodiments of this application will be described below. Figure 3 A schematic diagram of the structure of the electronic device 100 is shown.
[0047] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, display screen 194, ambient light sensor 180L, embedded controller 150 (Embedded Controller, EC), etc. The electronic device 100 involved in this application embodiment can be any device with a display screen and EC, such as a laptop, tablet, desktop computer, mobile phone, etc. The following specific examples mainly use a laptop as an example for illustration.
[0048] It is understood that the structures illustrated in the embodiments of the present invention 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.
[0049] 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.
[0050] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0051] 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.
[0052] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an 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.
[0053] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 100, and can also be used for data transfer between electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0054] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention 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.
[0055] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0056] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, supplying power to the processor 110, internal memory 121, display screen 194, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0057] In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple various devices through different I2C bus interfaces to achieve corresponding functions.
[0058] 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.
[0059] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel and a DPCD register. The display panel can be an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays screens 194, where N is a positive integer greater than 1.
[0060] The external storage interface 120 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 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0061] 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.
[0062] An ambient light sensor 180L is used to sense the ambient light intensity. Electronic device 100 can adaptively adjust the brightness of display screen 194 according to the sensed ambient light intensity.
[0063] The embedded controller 150 is used to implement functions such as keyboard control, touchpad control, power management, fan control, and laptop battery management. For laptop users, the embedded controller 150 is generally invisible. The embedded controller 150 is typically a separate chip containing independently running software, stored on its own (or shared with the BIOS) non-volatile media. Even when the laptop is powered off, the embedded controller 150 continues to operate unless the laptop battery is removed, in which case the embedded controller 150 chip will not receive power and will stop working. As long as there is power, the embedded controller 150 can operate, waiting for the on / off key to trigger and process the power-on sequence to power on the laptop. In this embodiment, the embedded controller 150 is electrically connected to the display 194 via I2C, meaning the embedded controller 150 can access the DPCD register via I2C.
[0064] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered Windows system as an example to exemplify the software structure of electronic device 100. Figure 4This is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention. 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 Windows system is divided into user mode and kernel mode. User mode includes the application layer and the user mode interface layer. Kernel mode includes the kernel mode driver interface layer and the hardware layer. The kernel mode driver interface layer may include the Graphics Driver API, and the hardware layer may include the GPU, EC, and DPCD registers.
[0065] The application layer includes traditional brightness applications and maximum brightness control applications. Traditional brightness applications can include functions such as dragging the brightness bar to adjust brightness, reducing brightness when the battery is low, adjusting brightness based on the application, adjusting brightness in high-performance mode, automatically adjusting brightness based on ambient light, and adjusting brightness using keyboard shortcuts. Dragging the brightness bar allows users to adjust brightness in the brightness settings page to meet their needs. The low-battery-power-low-brightness-reduction function reduces brightness when the application detects that the laptop is not plugged in and the battery level is below a threshold to save power. The application-based brightness adjustment function allows applications to change brightness as needed. The high-performance mode brightness adjustment function increases brightness automatically when entering high-performance mode or in response to the user's selection of high-performance mode, meeting the brightness requirements of high-performance mode. The automatic ambient light-sensing brightness adjustment function adaptively adjusts the display panel brightness based on the ambient light level detected by the ambient light sensor. The keyboard shortcut brightness adjustment function allows users to adjust brightness using keyboard shortcuts. The specific functions of the maximum brightness control application will be described in detail below.
[0066] Except for the ambient light brightness explicitly stated, the brightness mentioned in the embodiments of this application refers to the brightness of the display screen, or the brightness of the display panel.
[0067] The user-mode interface layer includes the SetMonitorBrightness interface for brightness adjustment and the Windows Management Instrumentation (WMI) API.
[0068] Traditional brightness applications call the display driver through the brightness adjustment interface, then modify the DPCD register using the AUX channel of the EDP protocol, and finally perform DBV mapping to achieve brightness adjustment. In contrast, the maximum brightness adjustment control application can call the EC (Electronic Control Center) through the WMI API, allowing the EC to access and modify the values in the DPCD register via I2C, and then perform DBV mapping to achieve brightness adjustment. In other words, the maximum brightness control application can achieve brightness adjustment using the underlying EC hardware path, independent of the display driver. Furthermore, the brightness adjustment implemented by the maximum brightness adjustment control application through the EC can be fed back to the traditional brightness application via the WMI API to maintain compatibility with traditional brightness adjustment methods.
[0069] This application provides a brightness control method. The execution entity of this method in the software architecture can be a maximum brightness control application, and the execution entity in the hardware is an application processor (AP). The method includes:
[0070] When the application processor determines that brightness adjustment is needed to increase brightness, the application processor may execute step 101 to obtain the average brightness (APL) of the screen to be displayed.
[0071] The application processor executes step 102: determine whether the average screen brightness (APL) is less than the preset value. If yes, i.e., if the average screen brightness (APL) is less than the preset value, the application processor executes step 103. If no, i.e., if the average screen brightness (APL) is not less than the preset value, the application processor executes step 104.
[0072] The preset values can be set based on the display panel's maximum safe current. For example, if the display panel's maximum safe current is 21mA, and the brightness is at its first level of 700 nits, the driving current for a full-screen white display is 25mA. When the APL (Advanced Partial Plug-in) is less than 10%, the driving current is 19mA. When the brightness is at its second level of 400 nits, the driving current for a full-screen white display is 21mA, meaning the second level of 400 nits is the HBM (Hyperluminated Baseline) brightness. The first brightness can be the display panel's peak brightness. Since the display panel can safely operate at a higher brightness of 700 nits when the APL is less than 10%, 10% can be set as the preset value. It should be noted that 10% as a preset value is only an example; the preset value can be set according to needs.
[0073] Step 103: Send the first instruction to the embedded controller EC. The first instruction is used to control the embedded controller EC to write the first brightness of 700 nits into the display port configuration data DPCD register through the integrated circuit interconnect I2C bus. After receiving the first instruction, the EC will respond by writing the first brightness of 700 nits into the DPCD register, so that the brightness value in the DPCD register is updated to the first brightness of 700 nits. After the Tcon IC detects that the brightness value in the DPCD register is updated to the first brightness of 700 nits, it will perform DBV mapping based on 700 nits to adjust the display panel to a brightness of 700 nits.
[0074] Step 104: Send a second instruction. The second instruction is used to write the second brightness of 400 nits into the Display Port Configuration Data DPCD register. The second brightness of 400 nits is less than the first brightness of 700 nits.
[0075] The second instruction can be similar to the first instruction, that is, the second instruction is sent to the EC. After receiving the second instruction, the EC writes the second brightness of 400 nits into the DPCD register in response to the second instruction, so that the brightness value in the DPCD register is updated to the second brightness of 400 nits. After the Tcon IC detects that the brightness value in the DPCD register is updated to the second brightness of 400 nits, it will perform DBV mapping based on 700 nits to adjust the display panel to a brightness of 400 nits.
[0076] The embodiments of this application will be described below with reference to a specific scenario, such as... Figure 5 As shown, assuming the first application is a video playback application, when the first application adjusts the brightness to the maximum brightness of 100%, the system will generate a brightness adjustment message of 400 nits. This message should normally be sent through the display driver. However, in this embodiment, the maximum brightness control application can intercept this brightness adjustment message through a hook function, obtain the screen to be displayed, and analyze the grayscale image of the screen to be displayed. That is, based on the grayscale image, it determines whether the APL is less than a preset value. If so, it sends a first instruction to the EC. The EC responds to the first instruction and writes the brightness value of 700 nits into the DPCD register through the I2C bus to achieve brightness adjustment. In other words, when the application adjusts the brightness to the maximum, if it is determined that the APL is less than the preset value, the process of sending the 400 nit brightness through the display driver is prevented, and instead, the 700 nit brightness is sent through the EC.
[0077] The brightness control method of this application embodiment can determine the APL (Advanced Percentage Volume) of the display screen when it is necessary to increase the brightness. If the APL is less than a preset value, the brightness can be adjusted to a larger first brightness so that the subsequent display screen can be displayed at a larger first brightness. Since the APL of the display screen is low, even if the maximum brightness is high, the driving current of the entire display panel will not exceed the maximum safe current. In this way, a higher display brightness can be achieved for a single pixel while meeting safety requirements. If the APL is not less than the preset value, the brightness can be adjusted to a smaller second brightness so that the subsequent display panel can be displayed at a smaller second brightness. Since the APL of the display screen is high, the lower second brightness can ensure that the driving current of the entire display panel will not exceed the maximum safe current, thus meeting safety requirements. Furthermore, the adjustment of the first brightness is achieved by sending a first command to the EC so that the EC can write the first brightness into the DPCD register. This process is achieved through an external hardware path that does not rely on the display driver. In other words, even if the display driver malfunctions, the first brightness can still be adjusted, thereby improving the compatibility of brightness adjustment. Moreover, the brightness path is implemented based on the existing underlying EC hardware, without the need for an additional automatic brightness limiter (ABL) circuit, resulting in lower cost.
[0078] In some embodiments, step 104, sending the second instruction, includes sending a second instruction to the embedded controller EC. The second instruction controls the embedded controller EC to write the second brightness into the display port configuration data DPCD register via the integrated circuit interconnect I2C bus. That is, since the adjustment of the first brightness can be independent of the display driver, the adjustment of the second brightness can also be independent of the display driver, thereby further improving the compatibility of brightness adjustment.
[0079] In some embodiments, step 101, obtaining the average brightness (APL) of the screen to be displayed, includes: obtaining the number of pixels in each grayscale value statistical interval of a plurality of grayscale value statistical intervals of the screen to be displayed, wherein the plurality of grayscale value statistical intervals include a first grayscale value statistical interval [0, a), where 0 ≤ a < 255; the average brightness (APL) of the screen being less than a preset value includes: the number of pixels in the first grayscale value statistical interval being greater than a first threshold; the average brightness (APL) of the screen being not less than a preset value includes: the number of pixels in the first grayscale value statistical interval being not greater than the first threshold.
[0080] Specifically, the grayscale value of each pixel in the image to be displayed is between 0 and 255, where 0 is the lowest brightness (black) and 255 is the highest brightness (white). The first grayscale value statistical interval is the lowest grayscale value interval, for example, a = 10. In step 101, the grayscale image of the image to be displayed can be obtained through the system's screenshot API. Each pixel in the grayscale image is traversed. If the grayscale value of a pixel belongs to the first grayscale value statistical interval [0, 10), the count of the number of pixels in the first grayscale value statistical interval, bin1, is incremented by 1. After traversing all pixels in the image to be displayed, the number of pixels in the image to be displayed belonging to the first grayscale value statistical interval, bin1, can be obtained. The larger bin1 is, the more darker the pixels, indicating that the image to be displayed is darker. By counting bin1, the APL can be indirectly determined. For example, when bin1 is greater than the first threshold s1, it can be determined that the APL is less than a preset value. The first grayscale value statistical interval [0, 10) is the darkest grayscale interval. Based on the number of pixels in the darkest grayscale interval of the image to be displayed, the APL can be determined relatively easily, thus enabling the EC adjustment to use a higher brightness at a lower APL. Similarly, if bin1 is smaller, for example, if bin1 is not greater than the first threshold s1, that is, the number of darker pixels is smaller, then the APL can be considered not less than the preset value. The first threshold can be preset as needed, specifically determined based on the driving current of the display panel at the first brightness. The number of pixels greater than the first threshold needs to ensure that the driving current of the display panel at the first brightness is less than the maximum safe current.
[0081] In some embodiments, the multiple grayscale value statistical intervals further include a second grayscale value statistical interval [a, b) and a third grayscale value statistical interval [b, 255], where a < b < 255; the average brightness (APL) of the screen is less than a preset value, which includes: the number of pixels in the first grayscale value statistical interval is greater than a first threshold, and the number of pixels in the second grayscale value statistical interval is less than a second threshold, and the number of pixels in the third grayscale value statistical interval is greater than a third threshold; the average brightness (APL) of the screen is not less than a preset value, which includes: the number of pixels in the first grayscale value statistical interval is not greater than a first threshold, or the number of pixels in the second grayscale value statistical interval is not less than a second threshold, or the number of pixels in the third grayscale value statistical interval is not greater than a third threshold.
[0082] Specifically, for example, when b = 240, during the process of traversing each pixel of the grayscale image to be displayed, if the grayscale value of a pixel belongs to [10, 240), the count of the number of pixels bin2 in the second grayscale value statistical interval is incremented by 1; if the grayscale value of a pixel belongs to [240, 255], the count of the number of pixels bin3 in the third grayscale value statistical interval is incremented by 1. After traversing all pixels of the image to be displayed, the number of pixels bin1, bin2, and bin3 in the three intervals can be obtained. Based on the relationship between bin1, bin2, and bin3 and their respective thresholds, it is possible to more accurately determine whether the APL is less than the preset value. It should be noted that the above method of determining APL based on the number of pixels in three intervals is only an example. Understandably, in order to more accurately determine APL, more intervals can be divided, and the threshold corresponding to each interval can also be set as needed. The principle of threshold setting is whether the driving current of the display panel when the first brightness is used as the maximum brightness is less than the maximum safe current. For example, in the previous example, when bin1 is greater than the first threshold s1, bin2 is less than the second threshold s2, and bin3 is greater than the third threshold s3, the drive current of the display panel at 700 nits brightness is less than 21mA.
[0083] In the preceding embodiments, APL was determined based on the number of pixels. However, APL can also be determined based on the percentage of pixels. For example, in some embodiments, step 101, obtaining the average brightness (APL) of the image to be displayed, includes: obtaining the percentage of pixels in each of multiple grayscale value statistical intervals of the image to be displayed, where the multiple grayscale value statistical intervals include a first grayscale value statistical interval [0, a), where 0 ≤ a < 255; APL less than a preset value includes: the percentage of pixels in the first grayscale value statistical interval is greater than a first threshold; APL not less than a preset value includes: the percentage of pixels in the first grayscale value statistical interval is not greater than the first threshold.
[0084] Specifically, it is also necessary to traverse all pixels of the image to be displayed to obtain the number of pixels (bin1) belonging to the first grayscale value statistical interval, and the total number of pixels (binS) of the image to be displayed. The percentage of pixels in the first grayscale value statistical interval, R1 = bin1 / binS, is calculated. The larger R1 is, the more darker the pixels, indicating a darker image. By statistically analyzing R1, the APL (Adjustable Light Pulse) can be indirectly determined. For example, when R1 is greater than the first threshold S1, it can be determined that the APL is less than a preset value. That is, the APL can be determined based on the number of pixels in the darkest grayscale interval of the image to be displayed, thereby enabling the EC (Earth Regulator) to adjust to a higher brightness level when the APL is low. Similarly, if R1 is smaller, for example, if R1 is not greater than the first threshold S1, the number of darker pixels is less, and the APL can be considered not less than the preset value.
[0085] In some embodiments, the multiple grayscale value statistical intervals further include a second grayscale value statistical interval [a, b) and a third grayscale value statistical interval [b, 255], where a < b < 255; the average brightness (APL) of the image is less than a preset value, which includes: the percentage of pixels in the first grayscale value statistical interval is greater than a first threshold, and the percentage of pixels in the second grayscale value statistical interval is less than a second threshold, and the percentage of pixels in the third grayscale value statistical interval is greater than a third threshold; the average brightness (APL) of the image is not less than a preset value, which includes: the percentage of pixels in the first grayscale value statistical interval is not greater than a first threshold, or the percentage of pixels in the second grayscale value statistical interval is not less than a second threshold, or the percentage of pixels in the third grayscale value statistical interval is not greater than a third threshold.
[0086] Specifically, after traversing all pixels of the image to be displayed, the pixel counts in three intervals, bin1, bin2, and bin3, can be obtained. Further, the total pixel count of the image to be displayed, binS, can be calculated as bin1 + bin2 + bin3. The pixel percentage in the first grayscale value interval, R1, is calculated as bin1 / binS; the pixel percentage in the second grayscale value interval, R2, is bin2 / binS; and the pixel percentage in the third grayscale value interval, R3, is bin3 / binS. Based on the relationship between R1, R2, and R3 and their respective thresholds, it is possible to more accurately determine whether the APL is less than a preset value. It should be noted that the above method of determining APL based on the pixel percentages in three intervals is merely an example. Understandably, to more accurately determine APL, more intervals can be divided, and the threshold for each interval can be set as needed. The principle for setting the threshold is whether the driving current of the display panel when the first brightness is used as the maximum brightness is less than the maximum safe current. For example, in the previous example, when R1 is greater than the first threshold S1, R2 is less than the second threshold S2, and R3 is greater than the third threshold S3, the drive current of the display panel at 700 nits brightness is less than 21mA.
[0087] The following describes implementation examples in two specific scenarios.
[0088] In a scenario, such as Figure 7As shown, during brightness adjustment, for example, when adjusting the brightness to 100%, the maximum brightness control application acquires the image to be displayed, and then obtains the pixel percentages R1, R2, and R3 corresponding to each grayscale value statistical interval. It then determines whether the APL is less than a preset value. If so, it sends a brightness of 700 nits; otherwise, it sends a brightness of 400 nits. After sending the brightness, the EC command interface is called to allow the EC to receive the brightness, i.e., to receive the previously sent 400 nits or 700 nits brightness. Then, the EC writes the 700 nits or 400 nits brightness into the DPCD register via the I2C bus, thus achieving brightness adjustment. In this example, regardless of whether the APL is less than the preset value, the brightness adjustment process does not depend on the display driver; instead, it is achieved by the EC writing to the DPCD register.
[0089] In another scenario, such as Figure 8 As shown, when adjusting brightness, for example, to 100%, the first application calls the brightness adjustment interface, causing the system to send a brightness adjustment message. This message is captured through a hook function, and the 100% brightness information is obtained. Upon determining that the system intends to adjust the brightness to 100%, it triggers a check to see if the APL (Adjustment Power Limit) is less than the preset value. If so, the brightness adjustment message sent by the system is intercepted, and a brightness value of 700 nits is written to the DPCD register via the EC (Electronic Control Center). If not, the message is not intercepted, and the issued brightness adjustment value of 400 nits is written to the DPCD register via the display driver. In this example, if the APL is less than the preset value, brightness adjustment is performed via the EC; if the APL is not less than the preset value, brightness adjustment is still performed via the display driver.
[0090] In some embodiments, when a brightness adjustment message is received, the AP executes step 101 above, which involves obtaining the average brightness (APL) of the screen to be displayed. During manual or automatic brightness adjustment, the system sends a brightness adjustment message. This message can trigger the aforementioned brightness control process, allowing for brightness adjustment independent of the display driver. On one hand, if no brightness adjustment message is received, it indicates that the current scene does not require high brightness; therefore, there is no need to trigger APL-based brightness adjustment to avoid adjusting brightness in situations where high brightness is not needed, thus affecting the user experience. On the other hand, when a brightness adjustment message is received, especially one indicating adjustment to maximum brightness, it indicates that the current scene requires high brightness; therefore, APL-based brightness adjustment can be triggered to provide appropriate display brightness based on the screen to be displayed.
[0091] In some embodiments, when a first application is running and High Dynamic Range Imaging (HDR) mode is enabled, the AP performs the aforementioned process of acquiring the average brightness (APL) of the image to be displayed. The first application can be, for example, a video playback application or an image processing application. The purpose of HDR mode is to more accurately reflect the range of brightness from brightest to darkest in the real world. Video or image playback in HDR mode requires higher maximum brightness to achieve a greater dynamic range. Therefore, when the first application is running and HDR mode is enabled, it indicates that a high-brightness scene is required, and thus APL-based brightness adjustment can be triggered to provide appropriate display brightness based on the image to be displayed. When the first application is not running or HDR mode is enabled, it indicates that a high-brightness scene is not necessarily required, and therefore APL-based brightness adjustment will not be triggered to avoid adjusting brightness in scenes where high brightness is not needed, thereby affecting the user experience.
[0092] To illustrate, consider a specific scenario, such as... Figure 9 As shown, the maximum brightness control application performs scene recognition. The result of scene recognition is used to determine whether to run the first application and enable HDR mode. The first application can be a specific application or a specific type of application, such as a video playback application. If the scene recognition result does not meet the requirement of running the first application and enabling HDR mode, scene recognition continues. If the requirement of running the first application and enabling HDR mode is met, the current screen to be displayed rendered by the GPU can be obtained through the DirectX screenshot interface. All pixels in the screen to be displayed are traversed, and the pixels are divided into the first gray value statistical interval [0,10), the second gray value statistical interval [10,240), and the third gray value statistical interval [240,255) according to the interval to which the pixel belongs, and the pixel count ratios R1, R2, and R3 corresponding to the three intervals are obtained. If the conditions are met that R1 is greater than the first threshold S1, R2 is less than the second threshold S2, and R3 is greater than the third threshold S3, the target brightness is determined and issued. The target brightness can be the maximum brightness below the safe current, determined based on the pixel grayscale value distribution probability of R1, R2, and R3, for example, 700 nits. The EC writes this target brightness of 700 nits into the DPCD register via the I2C bus to achieve brightness adjustment of 700 nits. If the conditions that R1 is greater than the first threshold S1, R2 is less than the second threshold S2, and R3 is greater than the third threshold S3 are not met, then the target brightness is determined and issued, for example, the target brightness is 400 nits. The EC writes this target brightness of 400 nits into the DPCD register via the I2C bus to achieve brightness adjustment of 400 nits.
[0093] In some embodiments, when a brightness adjustment message is received setting the maximum brightness to the display brightness, the AP executes the process described above of obtaining the average brightness (APL) of the screen to be displayed. The second brightness can be the maximum HBM brightness. When the user or system sets the brightness to 100% of the maximum brightness, it indicates that the current scene requires the maximum dynamic range. Therefore, this can be used to trigger an APL-based brightness adjustment process to provide a larger dynamic range when the APL is less than a preset value. In some possible implementations, when HDR mode is enabled, the system sends a brightness adjustment message setting the maximum brightness to the display brightness. In other words, in this scenario, enabling HDR mode triggers an APL-based brightness adjustment process.
[0094] In some embodiments, the brightness control method further includes: when a brightness adjustment message is received, the AP intercepts the brightness adjustment message through a hook function. This ensures compatibility with the current brightness adjustment process without modifying the underlying brightness adjustment process. Instead, it intercepts the brightness adjustment message in the current brightness adjustment process via hooking, preventing the brightness adjustment message from being passed to the display driver and executing the APL-based brightness adjustment process.
[0095] In some embodiments, after the process of controlling the embedded controller EC to write the first brightness into the display port configuration data DPCD register via the integrated circuit interconnect I2C bus, the method further includes: periodically acquiring the average brightness (APL) of the screen to be displayed; if the currently acquired average brightness (APL) is not less than a preset value, then controlling the embedded controller EC to write the second brightness into the display port configuration data DPCD register via the integrated circuit interconnect I2C bus. After writing the first brightness into the DPCD based on APL via the EC, APL can continue to be periodically checked. When APL is not less than the preset value, the second brightness is written into the DPCD to prevent the drive current of the display panel from exceeding the maximum safe current. For example, when HDR mode is enabled and a video playback application is running an HDR video, the system triggers the acquisition of the currently displayed image and determines that the APL (Advanced Partial Scale) is less than a preset value. Therefore, the EC (Electronic Control Unit) writes 700 nits of brightness to the DPCD register to improve the contrast of the displayed image. Furthermore, the system can continue to periodically acquire the displayed image and perform APL checks. For instance, if the user pauses HDR video playback and places the video playback application in the background while browsing the web, the system will determine that the APL of the currently displayed image is not less than the preset value. Therefore, the EC writes 400 nits of brightness to the DPCD register to prevent the display panel's drive current from exceeding the safe current. Understandably, the initial brightness can also be stopped in other ways. For example, during the brightness adjustment process triggered by running a first application and enabling HDR mode, after writing the initial brightness of 700 nits to the DPCD register via the EC, closing the first application or disabling HDR mode triggers the EC to write a second brightness of 400 nits to the DPCD register.
[0096] Combination Figure 3 This application provides an electronic device, including: a display screen 194; the display screen 194 includes a Display Port Configuration Data (DPCD) register; an embedded controller EC150; an integrated circuit interconnect (I2C) bus; a memory for storing computer program instructions; and a processor 110 for executing the program instructions. When the computer program instructions are executed by the processor 110, the electronic device performs the aforementioned brightness control method. The specific process and principle of this method are the same as in the above embodiments, and the specific structure and principle of the electronic device are also the same as in the above embodiments, and will not be repeated here.
[0097] This application provides a computer-readable storage medium including a stored program, wherein the program, when running, controls the device where the computer-readable storage medium is located to execute the above-described brightness control method.
[0098] This application provides a computer program product containing executable instructions that, when executed on a computer, cause the computer to perform the aforementioned brightness control method.
[0099] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive).
[0100] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " 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 single 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.
[0101] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A brightness control method, characterized in that, include: Obtain the average brightness (APL) of the image to be displayed; If the average brightness (APL) of the screen is less than a preset value, a first instruction is sent to the embedded controller EC. The first instruction is used to control the embedded controller EC to write the first brightness into the display port configuration data DPCD register through the integrated circuit interconnect I2C bus. If the average brightness (APL) of the screen is not less than the preset value, a second instruction is sent. The second instruction is used to write a second brightness into the Display Port Configuration Data (DPCD) register. The second brightness is less than the first brightness.
2. The brightness control method according to claim 1, characterized in that, The sending of the second instruction includes: Send a second instruction to the embedded controller EC. The second instruction is used to control the embedded controller EC to write the second brightness into the display port configuration data DPCD register through the integrated circuit interconnect I2C bus.
3. The brightness control method according to claim 1, characterized in that, The process of obtaining the average brightness (APL) of the image to be displayed includes: Obtain the first parameter, which is related to the number of pixels in the first grayscale value statistical interval [0, a) of the image to be displayed, where 0 ≤ a < 255; The average screen brightness (APL) being less than a preset value includes: The first parameter is greater than the first threshold; The condition that the average screen brightness (APL) is not less than the preset value includes: The first parameter is not greater than the first threshold.
4. The brightness control method according to claim 3, characterized in that, The process of obtaining the average brightness (APL) of the image to be displayed also includes: Obtain the second parameter and the third parameter. The second parameter is related to the number of pixels in the second grayscale value statistical interval [a, b) of the image to be displayed, and the third parameter is related to the number of pixels in the third grayscale value statistical interval [b, 255] of the image to be displayed, where a < b < 255. The average screen brightness (APL) being less than a preset value includes: The first parameter is greater than the first threshold, and the second parameter is less than the second threshold, and the third parameter is greater than the third threshold; The condition that the average screen brightness (APL) is not less than the preset value includes: The first parameter is not greater than the first threshold, or the second parameter is not less than the second threshold, or the third parameter is not greater than the third threshold.
5. The brightness control method according to claim 3, characterized in that, The first parameter is the number of pixels in the first grayscale value statistical interval [0, a) of the image to be displayed; Alternatively, the first parameter is the percentage of pixels in the first grayscale value statistical interval [0, a) of the image to be displayed.
6. The brightness control method according to claim 4, characterized in that, The first parameter is the number of pixels in the first grayscale value statistical interval [0,a) of the image to be displayed, the second parameter is the number of pixels in the second grayscale value statistical interval [a,b) of the image to be displayed, and the third parameter is the number of pixels in the third grayscale value statistical interval [b,255] of the image to be displayed. Alternatively, the first parameter is the percentage of pixels in the first grayscale value statistical interval [0,a) of the image to be displayed, the second parameter is the percentage of pixels in the second grayscale value statistical interval [a,b) of the image to be displayed, and the third parameter is the percentage of pixels in the third grayscale value statistical interval [b,255] of the image to be displayed.
7. The brightness control method according to claim 1, characterized in that, When a brightness adjustment message is received, the process of obtaining the average brightness (APL) of the screen to be displayed is executed.
8. The brightness control method according to claim 1, characterized in that, When the first application is running and the high dynamic range imaging mode is enabled, the process of obtaining the average brightness (APL) of the image to be displayed is executed.
9. The brightness control method according to claim 1, characterized in that, When a brightness adjustment message is received that sets the maximum brightness to the display brightness, the process of obtaining the average brightness (APL) of the screen to be displayed is executed.
10. The brightness control method according to claim 1, characterized in that, Also includes: When a brightness adjustment message is received, the brightness adjustment message is intercepted through a hook function.
11. The brightness control method according to claim 1, characterized in that, After the process of controlling the embedded controller EC to write the first brightness value into the display port configuration data DPCD register via the integrated circuit interconnect I2C bus, the following is also included: Periodically acquire the average brightness (APL) of the screen to be displayed; If the currently obtained average brightness (APL) of the screen is not less than the preset value, the embedded controller EC is controlled to write the second brightness into the display port configuration data DPCD register through the integrated circuit interconnection I2C bus.
12. An electronic device, characterized in that, include: Display screen; The display screen includes a Display Port Configuration Data (DPCD) register. Embedded controller EC; Integrated circuit interconnect I2C bus; A memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device performs the brightness control method according to any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the brightness control method according to any one of claims 1 to 11.
14. A computer program product, characterized in that, The computer program product includes executable instructions that, when executed on a computer, cause the computer to perform the brightness control method according to any one of claims 1 to 11.