A refresh rate switching method and electronic device

By selecting an appropriate refresh rate switching function based on the power supply status of the display in the electronic device, the problem of screen flickering or black screen during refresh rate switching is solved, achieving seamless refresh rate switching and improving the user experience.

CN119400127BActive Publication Date: 2025-11-11HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411215711.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2025-11-11
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

Electronic devices are prone to screen flickering or blackouts when switching refresh rates, which affects the user experience.

Method used

By calling a refresh rate switching function in the electronic device that adapts to the current state of the display screen, and selecting an appropriate refresh rate switching function based on the power supply status, including setting display configuration functions or changing display settings functions, screen flickering or blackout can be avoided.

Benefits of technology

It reduces the probability of screen flickering or blackout caused by refresh rate switching, enabling users to switch refresh rates without noticing, thus improving switching efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119400127B_ABST
    Figure CN119400127B_ABST
Patent Text Reader

Abstract

The application discloses a refresh rate switching method and an electronic device, relates to the technical field of display screens, and is applied to an electronic device. The electronic device comprises a display card and a display screen. The display screen corresponds to a plurality of first refresh rates, and the first refresh rates represent refresh rates supported by the display screen. The display card corresponds to a plurality of second refresh rates, and the second refresh rates represent display frequencies of the display card. The method comprises the following steps: when the electronic device receives a refresh rate switching instruction, the number of the first refresh rates is acquired; when the number of the first refresh rates is greater than the number of the second refresh rates, and the plurality of first refresh rates comprise a preset refresh rate, the electronic device calls a refresh rate switching function adapted to a power supply state of the display screen according to the power supply state of the display screen, and executes a refresh rate switching operation. By calling the refresh rate switching function adapted to the current state of the display screen, the probability of screen flashing of the display screen is reduced when the refresh rate switching is realized, and the refresh rate switching is realized without the user's perception.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of display technology, and more particularly to a refresh rate switching method and an electronic device. Background Technology

[0002] The refresh rate programmed into the graphics card of an electronic device can be understood as the physical refresh rate, which in turn refers to the display's transmission frequency. The actual refresh rate of the display screen of an electronic device can be understood as the virtual refresh rate. When the graphics card is set to one physical refresh rate, the display screen can support multiple corresponding virtual refresh rates.

[0003] In the prior art, the display screen of electronic devices may support multiple virtual refresh rates. When switching refresh rates, the display screen may flicker, which affects the user's experience when switching refresh rates. Summary of the Invention

[0004] This application provides a refresh rate switching method and an electronic device. When it is determined that the display screen is enabled for dynamic refresh rate, a refresh rate switching function adapted to the current state of the display screen is called to achieve refresh rate switching while reducing the probability of screen flickering, thus achieving refresh rate switching that is imperceptible to the user.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions.

[0006] Firstly, a refresh rate switching method is provided, applied to an electronic device including a graphics card and a display screen. The display screen corresponds to multiple first refresh rates, each representing a refresh rate supported by the display screen. The graphics card corresponds to multiple second refresh rates, each representing the graphics card's display frequency. One second refresh rate corresponds to one or more first refresh rates.

[0007] The method includes:

[0008] When an electronic device receives a refresh rate switching command, it obtains the number of the first refresh rates.

[0009] When the number of first refresh rates is greater than the number of second refresh rates, and the preset refresh rate is included among the multiple first refresh rates, the electronic device calls a refresh rate switching function adapted to the power supply state of the display screen to perform a refresh rate switching operation; the power supply state includes DC state or AC state.

[0010] In this application, when an electronic device receives a refresh rate switching operation, and determines that the electronic device has enabled dynamic refresh rate, it can select a refresh rate switching function that is adapted to the actual state of the display screen to perform the refresh rate switching operation. This reduces the probability of the display screen going black or flickering due to refresh rate switching to a certain extent, minimizes the problem of screen flickering, and achieves refresh rate switching that is imperceptible to the user.

[0011] In one possible implementation of the first aspect, the electronic device, based on the power supply status of the display screen, calls a refresh rate switching function adapted to the power supply status to perform a refresh rate switching operation, including:

[0012] If the display screen is in DC power mode, the electronic device calls the display configuration function to perform a refresh rate switching operation.

[0013] If the display screen is in AC power mode, the electronic device calls the function to change display settings to perform a refresh rate switching operation.

[0014] In this application, when an electronic device receives a refresh rate switching operation, and determines that the electronic device has enabled dynamic refresh rate, it can select a refresh rate switching function that is adapted to the actual state of the display screen to perform the refresh rate switching operation. This reduces the probability of the display screen going black or flickering due to refresh rate switching to a certain extent, minimizes the problem of screen flickering, and achieves refresh rate switching that is imperceptible to the user.

[0015] In another possible implementation of the first aspect, a path marker is defined in the display configuration function. The path marker is used to indicate that the electronic device is configured to refresh the rate in a mode with a non-dynamic range refresh rate.

[0016] In this application, the parameter used to characterize support for dynamically configurable refresh rates has been removed from the path marker. Retaining this field might enable an automatic dynamic refresh rate adjustment mode, which could adjust the virtual refresh rate of the display to a certain range, causing display instability.

[0017] In another possible implementation of the first aspect, the return path of the refresh rate switching result defined in the display configuration function is set to the current path, where the path refers to the path between the display mode of the monitor and the output mode of the graphics card.

[0018] In this application, defining the return path of the refresh rate switching result as the current path can avoid the slow response caused by returning all paths, which can indirectly improve the efficiency of refresh rate switching.

[0019] In another possible implementation of the first aspect, the function for changing display settings defines that dynamically changing display device property parameters is persistent.

[0020] In this application, the function for changing display settings defines that dynamically changing display device attribute parameters is permanent. Not only do the current screen's display settings take effect immediately, but these settings are also saved in the operating system's registry, thus remaining effective after a system restart. In other words, the current refresh rate switch is permanently effective until the next refresh rate switch occurs.

[0021] In another possible implementation of the first aspect, the method further includes:

[0022] If the number of first refresh rates is less than or equal to the number of second refresh rates, or if the preset refresh rate is not included among the multiple first refresh rates, the electronic device calls the change display settings function to perform a refresh rate switching operation.

[0023] In this application, if the number of first refresh rates is less than or equal to the number of second refresh rates, or if the first refresh rates do not include preset refresh rates, it means that the electronic device has not enabled dynamic refresh rate. In this case, switching refresh rates will not cause screen flickering. Common functions (such as changing display settings functions) can be used to perform refresh rate switching operations, thereby improving the efficiency of refresh rate switching.

[0024] In another possible implementation of the first aspect, where the number of first refresh rates is greater than the number of second refresh rates, and a preset refresh rate is included among the multiple first refresh rates, the electronic device, based on the power supply status of the display screen, calls a refresh rate switching function adapted to the power supply status to perform a refresh rate switching operation, including:

[0025] When the number of first refresh rates is greater than the number of second refresh rates, and a preset refresh rate is included among the multiple first refresh rates, the electronic device obtains the target refresh rate indicated by the refresh rate switching command.

[0026] The electronic device obtains the target second refresh rate corresponding to the current first refresh rate of the display screen.

[0027] If the target refresh rate does not match the target second refresh rate, the electronic device calls the refresh rate switching function adapted to the power supply status of the display screen and performs the refresh rate switching operation.

[0028] In this application, when an electronic device receives a refresh rate switching operation, it can initially determine whether the physical refresh rate has changed when it is determined that the electronic device has enabled dynamic refresh rate. If the physical refresh rate has changed, based on the actual state of the display screen, a refresh rate switching function adapted to the actual state of the display screen is selected to perform the display screen refresh rate switching operation. This reduces the probability of screen flickering caused by refresh rate switching to a certain extent, and avoids the problem of black screen or screen flickering as much as possible, so as to achieve refresh rate switching that is imperceptible to the user.

[0029] In another possible implementation of the first aspect, the refresh rate switching instruction includes an instruction triggered by a user acting on a refresh rate switching shortcut key, wherein the refresh rate switching instruction indicates a first refresh rate that is higher than the current first refresh rate of the display screen.

[0030] In this application, the refresh rate switching command received by the electronic device can be a command triggered by a user's refresh rate switching shortcut key. In this case, the user does not specify the target refresh rate after the switch. The target refresh rate can be any refresh rate higher than the current refresh rate. For example, the target refresh rate can be a refresh rate higher than the current refresh rate and closest to the current refresh rate. The electronic device can respond to refresh rate switching operations in various scenarios.

[0031] In another possible implementation of the first aspect, the refresh rate switching instruction includes an instruction triggered by the electronic device in response to a user's switching operation on the refresh rate option, wherein the target refresh rate indicated by the refresh rate switching instruction is the refresh rate corresponding to the refresh rate option selected by the user.

[0032] In this application, the refresh rate switching command received by the electronic device can be a command triggered by a user's switching operation on the refresh rate option. In this case, the user specifies the target refresh rate after the switch. Therefore, the target refresh rate can be the refresh rate selected by the user. The electronic device can respond to refresh rate switching operations in various scenarios.

[0033] In another possible implementation of the first aspect, where the number of first refresh rates is greater than the number of second refresh rates, and a preset refresh rate is included among the multiple first refresh rates, the electronic device, based on the power supply status of the display screen, calls a refresh rate switching function adapted to the power supply status to perform a refresh rate switching operation, including:

[0034] When the number of first refresh rates is greater than the number of second refresh rates, and a preset refresh rate is included among the multiple first refresh rates, the electronic device obtains the target refresh rate indicated by the refresh rate switching command.

[0035] The electronic device obtains the target second refresh rate corresponding to the current first refresh rate of the display screen;

[0036] If the display is set to High Dynamic Range (HDR) imaging and the target refresh rate does not match the target second refresh rate, the electronic device will call a refresh rate switching function adapted to the power supply status of the display and perform a refresh rate switching operation.

[0037] In this application, when the display is in Standard Dynamic Range (SDR) mode, it is in AC mode, and the refresh rate switching is performed without flickering by calling the change display settings function. When the display is in DC mode, the refresh rate switching is performed without flickering by calling the set display configuration function.

[0038] In this embodiment, when the electronic device receives a refresh rate switching operation, and determines that the electronic device has enabled dynamic refresh rate, it can switch the refresh rate of the display screen based on whether the electronic device is in HDR mode. When the physical refresh rate changes, based on the actual state of the display screen, a refresh rate switching function adapted to the actual state of the display screen is selected to perform the refresh rate switching operation. This reduces the probability of black screen or flickering caused by refresh rate switching to a certain extent, and avoids black screen or flickering problems as much as possible, achieving refresh rate switching that is imperceptible to the user.

[0039] In another possible implementation of the first aspect, after performing the refresh rate switching operation, the method further includes:

[0040] The electronic device displays a refresh rate indicator window; the refresh rate indicator window includes the refresh rate after switching.

[0041] In this application, the electronic device can display the refresh rate after switching, so that the user can perceive the refresh rate after switching, so that the user can decide whether to continue using the refresh rate or switch to the next refresh rate, thereby optimizing the user experience.

[0042] In another possible implementation of the first aspect, the display configuration function is set to SetDisplayConfig.

[0043] The display configuration function defines a path marker, which removes the parameter that supports dynamic range refresh rate configuration. The parameter that supports dynamic range refresh rate configuration is DISPLAYCONFIG_PATH_BOOST_REFRESH_RATE.

[0044] The display configuration function defines the return path of the refresh rate switching result as the current path. The parameter used to represent the return path of the refresh rate switching result as the current path is QDC_ONLY_ACTIVE_PATHS.

[0045] In this application, the parameter representing support for dynamically configurable refresh rates has been removed from the path marker. Retaining this field might enable an automatic dynamic refresh rate adjustment mode, which could adjust the virtual refresh rate of the display to a certain range, causing display instability. Removing the parameter supporting dynamically configurable refresh rates allows the refresh rate to be switched to a target refresh rate. Defining the return path of the refresh rate switching result as the current path avoids the slow response problem caused by returning all paths, thus indirectly improving the efficiency of refresh rate switching.

[0046] In another possible implementation of the first aspect, the display settings function is changed to ChangeDisplaySettings;

[0047] The function for changing display settings defines a parameter that indicates that dynamically changing display device attribute parameters is persistent. The parameter that indicates that dynamically changing display device attribute parameters is persistent is CDS_UPDATEREGISTRY.

[0048] In this application, the function for changing display settings defines CDS_UPDATEREGISTRY. This not only makes the current screen's display settings take effect immediately, but also saves these settings in the operating system's registry, ensuring they remain effective after a system restart. In other words, the current refresh rate change is permanent until the next refresh rate switch. CDS_UPDATEREGISTRY ensures dynamic adjustment and persistent storage of display settings.

[0049] In a second aspect, an electronic device is provided, comprising a display screen, a graphics card, a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in any of the first aspects above.

[0050] Thirdly, a computer-readable storage medium is provided that stores instructions which, when executed by a processor, implement the steps of the method described in any of the first aspects above.

[0051] Fourthly, a computer program product including instructions is provided, comprising a computer program / instructions that, when executed by a processor, implement the steps of the method described in any of the first aspects above.

[0052] Fifthly, embodiments of this application provide a chip, the chip including a processor, the processor being configured to invoke a computer program in memory to perform the method as described in any one of the first aspects.

[0053] It is understood that the beneficial effects of the electronic device described in the second aspect, the computer-readable storage medium described in the third aspect, the computer program product described in the fourth aspect, and the chip described in the fifth aspect can be referred to the beneficial effects of the first aspect and any of its possible design embodiments, which will not be repeated here. Attached Figure Description

[0054] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0055] Figure 2 A schematic diagram of the software structure of an electronic device provided in an embodiment of this application;

[0056] Figure 3 A flowchart illustrating a refresh rate switching method provided in an embodiment of this application;

[0057] Figure 4 A schematic diagram of a refresh rate setting interface provided in an embodiment of this application;

[0058] Figure 5 This is a schematic diagram of a display interface after refresh rate switching, provided in an embodiment of this application.

[0059] Figure 6 This is a schematic diagram of another display interface after refresh rate switching provided in an embodiment of this application;

[0060] Figure 7 A schematic diagram of a display interface for a refresh rate switching process provided in an embodiment of this application;

[0061] Figure 8 A flowchart illustrating another refresh rate switching method provided in an embodiment of this application;

[0062] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0063] Figure 10 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation

[0064] In the description of the embodiments of this application, the terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to be a limitation of this application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "this" are intended to also include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" refer to one or more (including two). The term "and / or" is used to describe the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can indicate: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0065] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized. The term "connection" includes direct connections and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0066] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0067] The refresh rate programmed into the graphics card of an electronic device can be called the active signal mode. Active signal mode refers to the resolution and refresh rate of the graphics card's output signal; it can also refer to the frequency at which the graphics card sends signals to the display, and is also known as the physical refresh rate. The actual refresh rate set on the display of an electronic device's screen can be called the desktop mode. Desktop mode refers to the resolution and refresh rate displayed on the screen; it can also be called the virtual refresh rate. The virtual refresh rate supports a range of refresh rates, with a granularity as low as 0.01Hz.

[0068] Generally, depending on the display performance of an electronic device, a graphics card can be programmed with multiple refresh rates. For example, these refresh rates may include inherent refresh rates such as 60Hz, 120Hz, 144Hz, and 165Hz. Under one physical refresh rate of the graphics card, the display can support multiple corresponding virtual refresh rates. For instance, if the graphics card's physical refresh rate is 120Hz, the display can support multiple virtual refresh rates within the range of 100Hz-120Hz.

[0069] For example, the graphics card of an electronic device is programmed with three physical refresh rates, such as 60Hz, 120Hz, and 165Hz. The virtual refresh rate of the display screen can include 59Hz, 60Hz, 75Hz, 82Hz, 100Hz, 120Hz, and 165Hz, etc. The virtual refresh rate can include the refresh rate of the corresponding refresh rate range of the physical refresh rates, or it can include a pre-set refresh rate. For example, the pre-set virtual refresh rate could be 82Hz.

[0070] The number of virtual refresh rates corresponding to this type of display is greater than the physical refresh rate burned into the graphics card. Furthermore, the virtual refresh rates of the display include pre-set refresh rate settings, which determines whether the electronic device is enabling dynamic refresh rate (DRR). When DRR is enabled, the electronic device supports direct connection to the discrete graphics card and high dynamic range imaging (HDR). Direct connection to the discrete graphics card refers to directly connecting the discrete graphics card to the processor, bypassing the motherboard, to provide faster data transfer speeds and lower latency.

[0071] In existing technologies, when an electronic device enables DRR (Dynamic Refresh Rate) and switches refresh rates, the display may experience a black screen or flickering. Specifically, when the refresh rate switching involves a change in the physical refresh rate—for example, switching from physical refresh rate 1 (or the corresponding refresh rate range) to physical refresh rate 2 (or the corresponding refresh rate range)—the display may go black. Alternatively, if the graphics card does not support seamless refresh rate switching, the display will also go black during the switch. Furthermore, in existing refresh rate switching methods, flickering may occur when the electronic device is in alternating current (AC) HDR mode or direct current (DC) HDR mode. These black screen or flickering issues during refresh rate switching negatively impact the user experience.

[0072] In the refresh rate switching method provided in this application embodiment, after multiple simulation experiments and data analysis, it was found that... In this system, traditional refresh rate switching methods involve calling two refresh rate switching-related functions under specific scenarios and passing appropriate parameters to achieve flicker-free refresh rate switching. These two refresh rate switching-related functions are functions in the application programming interface (API), including a function to change display settings and a function to set display configuration. When the electronic device's display is in AC-HDR (Alternating Current High Dynamic Range) mode, calling the function to change display settings for refresh rate switching will not cause screen flicker; however, calling the function to set display configuration will cause screen flicker. Similarly, when the electronic device's display is in DC-HDR (Direct Current High Dynamic Range) mode, calling the function to set display configuration for refresh rate switching will not cause screen flicker; however, calling the function to change display settings will cause screen flicker.

[0073] In this embodiment of the application, when the electronic device receives a refresh rate switching operation, it can select a refresh rate switching function that is adapted to the actual state of the display screen to perform the refresh rate switching operation. This reduces the probability of the display screen going black or flickering due to refresh rate switching to a certain extent, and avoids the problem of the display screen going black or flickering as much as possible, so as to achieve refresh rate switching that is imperceptible to the user.

[0074] The refresh rate switching method provided in this application is applicable to electronic devices with graphics cards and displays. For example, the electronic device can be a tablet computer, laptop computer, personal computer (PC), in-vehicle computer, etc., and the following embodiments do not impose any special limitations on the specific form of the electronic device.

[0075] Figure 1 A schematic diagram of the hardware structure of an electronic device is shown.

[0076] like Figure 1 The electronic device 100 shown may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a display screen 194, a graphics card 195, etc.

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

[0078] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0079] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

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

[0081] In this embodiment, the processor can act as the execution entity for the refresh rate switching method. The processor can obtain the physical refresh rate burned by the graphics card, the virtual refresh rate of the display screen, and the power supply status of the display screen (AC or DC). Based on the actual power supply status of the display screen, it calls the refresh rate switching function adapted to the power supply status and performs the refresh rate switching operation to minimize the probability of black screen or screen flickering during refresh rate switching.

[0082] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

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

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

[0085] 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, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, 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.

[0086] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

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

[0088] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, 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 194, where N is a positive integer greater than 1.

[0089] Graphics card 195 is responsible for processing graphics data and outputting it to the display screen (i.e., display delivery). The frequency at which the graphics card delivers data to the display screen is its physical refresh rate. The actual display refresh rate of the display screen 194 is the virtual refresh rate. The physical refresh rate programmed into the graphics card is a fixed value, while the virtual refresh rate can be a refresh rate within the dynamic range corresponding to the physical refresh rate. The virtual refresh rate can also include a set refresh rate. The granularity of the virtual refresh rate can be as low as 0.01Hz.

[0090] In this embodiment, the display screen 194 is an HDR-enabled display screen.

[0091] The refresh rate switching method provided in this application is applicable to electronic devices with Dynamic Refresh Rate (DRR) enabled. However, the graphics card driver version and operating system version of the electronic device must meet certain requirements for DRR to be enabled.

[0092] Enabling DRR on an electronic device involves configuring relevant options in the device's system registry. For example, updating the default graphics card number in the Galileo_G parameter configuration to a preset number, and adding a field for enabling DRR in the Galileo_G parameter configuration. For instance, the field for enabling DRR could be "DisplayFeatureControl2" = dword:0x00001008.

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

[0094] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. 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.

[0095] Electronic device 100 can implement audio functions such as music playback and recording through audio module 170, speaker, receiver, microphone, headphone jack, and application processor.

[0096] Key 190 can be a mechanical keyboard key or a solid-state key. In this embodiment, the electronic device can receive refresh rate switching operations triggered by the user via a refresh rate switching shortcut key.

[0097] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture.

[0098] Figure 2 This is a schematic diagram of the software structure of an 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 function. Layers communicate with each other through software interfaces. In some embodiments, the software structure of the electronic device 100 includes an application layer and a user space.

[0099] The application layer can include a series of application packages. For example, the application packages can include system managers (e.g., when the electronic device is a computer, system management can be a computer manager), game applications, office applications, meeting applications, system applications, etc.

[0100] User mode can include a refresh rate adjustment module. This module can call preset refresh rate switching functions to perform refresh rate switching operations. These preset refresh rate switching functions include functions for changing display settings and functions for setting display configuration.

[0101] For example, taking a computer as the electronic device and a system manager as the application, the refresh rate switching method provided in this application embodiment will be described.

[0102] When the system administrator receives a refresh rate switching request, it sends a refresh rate switching request to the refresh rate adjustment module through the corresponding interface. Upon receiving the request, the refresh rate adjustment module obtains the display's virtual refresh rate and the graphics card's physical refresh rate. If the number of virtual refresh rates is greater than the number of physical refresh rates, and the virtual refresh rates include a preset refresh rate, the refresh rate adjustment module can determine that the electronic device has DRR enabled. When DRR is enabled, the refresh rate adjustment module calls the appropriate refresh rate switching function based on the display's power supply status to perform the refresh rate switching operation. Specifically, if the refresh rate adjustment module determines that the display is in DC power, it calls the "Set Display Configuration" function to perform the refresh rate switching operation; if it determines that the display is in AC power, it calls the "Change Display Settings" function to perform the refresh rate switching operation.

[0103] In this embodiment of the application, when the electronic device receives a refresh rate switching operation, it can select a refresh rate switching function that is adapted to the actual state of the display screen to perform the refresh rate switching operation. This reduces the probability of the display screen going black or flickering due to refresh rate switching to a certain extent, and avoids the problem of the display screen going black or flickering as much as possible, so as to achieve refresh rate switching that is imperceptible to the user.

[0104] refer to Figure 3 , Figure 3 A flowchart illustrating a refresh rate switching method is provided, using an electronic device as the execution subject to explain the method. This includes:

[0105] S301, Electronic device receives refresh rate switching operation.

[0106] The refresh rate switching operation can be triggered by the user based on the refresh rate switching shortcut; or, the refresh rate switching operation can also be triggered by the user in the refresh rate settings interface.

[0107] In one scenario, a user triggers a refresh rate switch based on a refresh rate shortcut, which could be an operation triggered by the user using a refresh rate switch shortcut key. For example, the refresh rate switch shortcut key could be Fn+R; or, the refresh rate switch shortcut key could be any other defined key combination. The refresh rate switch shortcut key / shortcut can be customized, and this embodiment does not limit this.

[0108] In scenarios where users switch refresh rates using shortcuts, the electronic device defaults to targeting a refresh rate one level higher than the current refresh rate. For example, if the current refresh rate of the electronic device's display is 60Hz, the next higher refresh rate is 75Hz. When the electronic device receives a refresh rate switching operation triggered by a user using a shortcut, it determines that the target refresh rate is 75Hz, the next higher refresh rate than the current 60Hz.

[0109] In another scenario, the user triggers the refresh rate switching operation in the refresh rate settings interface. This could be a confirmation switching operation triggered after the user selects the target refresh rate in the refresh rate settings interface.

[0110] For example, Figure 4 A schematic diagram of a refresh rate settings interface is provided. (For example...) Figure 4 As shown, Figure 4 The provided display interface includes content describing the type of display screen (monitor), controls for setting display screen (monitor) properties, and a settings area for switching refresh rates (such as...). Figure 4 The area shown is the monitor settings - corresponding to the screen refresh rate. Here, screen refresh rate refers to the display's virtual refresh rate. For example... Figure 4 As shown, the display offers several virtual refresh rates, including 59Hz, 60Hz, 75Hz, 82Hz, 100Hz, 120Hz, and 165Hz. Based on the refresh rate settings interface, the current refresh rate is 60Hz. Figure 4 The cursor shown indicates that the selected refresh rate is 100 Hz. In scenarios where the user switches refresh rates based on the refresh rate settings interface, the target refresh rate is the refresh rate selected by the user in the refresh rate settings interface.

[0111] S302, the electronic device obtains the virtual refresh rate of the display screen.

[0112] In this embodiment, after receiving a refresh rate switching operation, the electronic device can determine whether Dynamic Refresh Rate (DRR) is enabled. If DRR is enabled, the electronic device will call the adaptive refresh rate switching function to perform the refresh rate switching operation.

[0113] The criteria for enabling DRR (Dynamic Refresh Rate) on an electronic device can include having more virtual refresh rates than physical refresh rates. If the number of virtual refresh rates exceeds the number of physical refresh rates, it can be concluded that the actual refresh rate (virtual refresh rate) of the electronic device's display is not limited to the physical refresh rate programmed into the graphics card. In other words, the electronic device can dynamically adjust its refresh rate within the range corresponding to the programmed refresh rate, and the electronic device may have enabled dynamic refresh rate.

[0114] Based on this condition, the electronic device can obtain the virtual refresh rate of the display screen. For example, the electronic device can call a function to obtain the current virtual refresh rate of the display screen. For instance, the virtual refresh rate function could be EnumDisplaySettings. By calling EnumDisplaySettings, the electronic device can obtain the current virtual refresh rate of the display screen and the number of virtual refresh rates.

[0115] It is understood that the virtual refresh rate can be a custom setting, or it can be calculated based on the physical refresh rate, or it can be determined based on the refresh rate range corresponding to the physical refresh rate. This application embodiment does not limit the setting of the virtual refresh rate.

[0116] S303, the electronic device obtains the physical refresh rate of the graphics card.

[0117] In this embodiment, the electronic device can obtain the physical refresh rate of the graphics card through a testing tool. Alternatively, it can obtain the physical refresh rate of the graphics card by acquiring the graphics card's factory information.

[0118] S304. Determine if the number of virtual refresh rates is greater than the number of physical refresh rates. If so, proceed to S305; otherwise, proceed to S308.

[0119] The number of virtual refresh rates is greater than the number of physical refresh rates. To a certain extent, this can be determined that the actual refresh rate (virtual refresh rate) of the electronic device's display is not limited to the physical refresh rate burned into the graphics card. In other words, the electronic device can dynamically adjust the refresh rate within the range corresponding to the burned refresh rate. The electronic device may have enabled dynamic refresh rate.

[0120] In other scenarios, such as when an electronic device is connected to multiple external displays (e.g., two displays), the virtual refresh rate obtained by the electronic device includes the union of the virtual refresh rates of both displays. The number of virtual refresh rates may be greater than the number of virtual refresh rates of a single display. For example, the graphics card of the electronic device may be programmed with three physical refresh rates: 60Hz, 120Hz, and 165Hz. Display 1 has virtual refresh rates of 60Hz, 120Hz, and 165Hz, while display 2 has virtual refresh rates of 59Hz, 120Hz, and 165Hz. The virtual refresh rates obtained by the electronic device will then include 59Hz, 60Hz, 120Hz, and 165Hz. The number of virtual refresh rates of the displays is greater than the number of physical refresh rates of the graphics card.

[0121] In this situation, if the electronic device does not enable DRR and the number of virtual refresh rates is greater than the number of physical refresh rates, it is easy to misjudge whether the electronic device enables DRR. Therefore, if the number of virtual refresh rates is greater than the number of physical refresh rates, the electronic device can make further judgments to determine whether the electronic device enables DRR.

[0122] If the number of virtual refresh rates is not greater than the physical refresh rate, for example, if the number of virtual refresh rates is equal to the physical refresh rate, the display only supports the display of the refresh rate corresponding to the physical refresh rate, and the electronic device does not enable DRR, in this case, the electronic device can directly execute S308 to call the change display settings function to perform the refresh rate switching operation.

[0123] S305, determine whether the virtual refresh rate includes the preset refresh rate. If yes, execute S306; otherwise, execute S308.

[0124] In this embodiment, the preset refresh rate is a specified virtual refresh rate. This preset refresh rate can be set based on the usage scenario of the electronic device, and can meet the refresh rate requirements of users in certain specific scenarios. For example, the preset refresh rate may include 75 Hz, 82 Hz, 100 Hz, etc.

[0125] If the display's virtual refresh rate includes a preset refresh rate, then the electronic device can be confirmed to have DRR enabled, allowing dynamic switching between multiple different virtual refresh rates. In this case, the electronic device can call the appropriate refresh rate switching function based on the display's actual power supply status to perform the refresh rate switching operation.

[0126] If the virtual refresh rate of the display screen does not include the preset refresh rate, and the display screen only supports the display of the refresh rate corresponding to the physical refresh rate, and the electronic device does not enable DRR, in this case, the electronic device can directly execute S308 to call the change display settings function to perform the refresh rate switching operation.

[0127] S306, the electronic device determines whether the power supply status of the display screen is DC. If yes, it executes S307; otherwise, it executes S308.

[0128] In this embodiment, the electronic device can obtain the power supply status of the display screen by recording its power supply information: whether it is directly powered by the battery (not plugged in, i.e., DC state) or charging (i.e., AC state). Alternatively, the electronic device can also obtain the power supply status bit of the display screen through a designated interface to determine whether the power supply status of the display screen is DC or AC.

[0129] Since the refresh rate switching is performed by calling the display configuration function when the electronic device is in DC-HDR imaging mode, screen flickering will not occur. When the electronic device determines that the display's power supply state is DC, it executes S307 to call the display configuration function to switch the refresh rate.

[0130] Since the display is either in AC or DC power mode, it is either in DC or AC power mode. Therefore, when the electronic device determines that the display is not in DC power mode, step S308, where the display is in AC power mode, can be executed. Because when the electronic device is in AC-HDR high dynamic range imaging mode, calling the change display settings function to switch the refresh rate will not cause screen flickering; calling the set display configuration function will cause screen flickering.

[0131] S307, the electronic device calls the display configuration function to perform a refresh rate switching operation.

[0132] For example, the function to set the display configuration can be the SetDisplayConfig function, or a function with another name that can achieve the following functionality.

[0133] The display configuration function defines a path flag, in which the parameter representing support for a dynamically configurable refresh rate has been removed. For example, the parameter supporting a dynamically configurable refresh rate could be `DISPLAYCONFIG_PATH_BOOST_REFRESH_RATE`, and the path flag could be represented as `paths[0].flags&=~DISPLAYCONFIG_PATH_BOOST_REFRESH_RATE`. Retaining this field might enable an automatic dynamic refresh rate adjustment mode, which could adjust the virtual refresh rate of the display to a certain range, causing display instability. For instance, removing the above field allows the electronic device to switch the virtual refresh rate of the display to 70Hz. If the above field is not removed, the electronic device will adjust the virtual refresh rate of the display to either 70Hz or 140Hz, or it might adjust the virtual refresh rate of the display to any refresh rate between 70Hz and 140Hz, resulting in a final virtual refresh rate that does not match the target refresh rate the user wants to switch to.

[0134] In some embodiments, the electronic device may display a refresh rate switching prompt on the display interface after completing the refresh rate switching operation. For example, the electronic device may display the switched refresh rate in the form of a floating window. Figure 5 A schematic diagram of the display interface after refresh rate switching is provided. For example... Figure 5 As shown, the refresh rate after the switch is displayed as a floating window on the electronic device's screen. If the aforementioned field is not removed from the path marker, the electronic device will adjust the virtual refresh rate of the display to 70Hz or 140Hz. The refresh rate switching information displayed on the screen after the electronic device completes the refresh rate switching operation can be referenced here. Figure 6 As shown. Figure 6 An alternative display interface diagram after refresh rate switching is provided. For example... Figure 6 As shown, in the display interface of the electronic device, the refresh rate after switching is displayed as a floating window, which is either 70Hz or 140Hz in the mode of automatic dynamic refresh rate adjustment.

[0135] In some embodiments, the display configuration function defines the target refresh rate (virtual refresh rate) and the current highest physical refresh rate of the display screen to enable dynamic switching and adjustment of the display screen's refresh rate.

[0136] In some embodiments, the display configuration function also defines the return path of the refresh rate switching result, the virtual refresh rate that the display can support, and the parameter fields for the refresh rate range that the display can support.

[0137] The aforementioned path refers to the path between the display mode of the monitor and the output mode of the graphics card. The display mode of the monitor can be understood as the display modes that the monitor supports. Modes define display attributes, including aspect ratio, width, color format, and bit depth, among others. The output mode of the graphics card defines output attributes, including aspect ratio, width, color format, physical refresh rate, bit depth, and buffer length, among others.

[0138] Defining the return path of refresh rate switching results as the current path can avoid the slow response caused by returning all paths, which can indirectly improve the efficiency of refresh rate switching.

[0139] In some embodiments, the display configuration function also defines a structure for switching the display refresh rate, allocates memory for the structure, and fills the structure with relevant fields.

[0140] In some embodiments, the display configuration function also defines fine-grained virtual refresh rate and fine-grained physical refresh rate of the display.

[0141] In some embodiments, the display configuration function also defines a field to return a failure log if the refresh rate switching fails. Electronic devices can obtain and analyze the reason for the refresh rate switching failure based on the failure log, which helps improve the feasibility and effectiveness of the refresh rate switching operation.

[0142] S308, the electronic device calls the function to change display settings to perform a refresh rate switching operation.

[0143] For example, the function to change display settings can be the ChangeDisplaySetting function, or the ChangeDisplaySettings(Ex) function, or a function with another name that performs the following functions.

[0144] When the electronic device determines that the display is in AC mode and that DRR is not enabled (the virtual refresh rate data is not greater than the number of physical refresh rates, or the virtual refresh rate does not include the preset refresh rate), the electronic device can call the change display settings function to perform a refresh rate switching operation.

[0145] The function to change display settings is the refresh rate switching function commonly used by electronic devices.

[0146] This is for displaying the refresh rate of the screen in AC mode and other situations as described in this embodiment.

[0147] The display settings change function in this application defines a parameter to characterize dynamically changed display device attribute parameters as persistent. For example, this parameter can be CDS_UPDATEREGISTRY. The definition of this parameter in the display settings change function can be expressed as:

[0148] LONG ret=ChangeDisplaySettingsEx(NULL,&dm,NULL,CDS_UPDATEREGISTRY,NULL).

[0149] The parameter field "CDS_UPDATEREGISTRY" is used to indicate that dynamically changed display device properties are persistent. CDS_UPDATEREGISTRY instructs the ChangeDisplaySettingsEx function to dynamically change the current screen's graphics mode and update the changed graphics mode in the electronic device's registry. This means that when the CDS_UPDATEREGISTRY flag is used, not only do the current screen's display settings take effect immediately, but these settings are also saved in the operating system's registry, remaining effective even after a system restart. In other words, the current refresh rate change is permanent until the next refresh rate switch. CDS_UPDATEREGISTRY ensures dynamic adjustment and persistent storage of display settings.

[0150] If this parameter field is not defined in the display settings function, the refresh rate may reset (restore to the previous refresh rate) after the electronic device restarts. Furthermore, without defining this parameter field, the refresh rate switching operation is considered temporary, which may cause flickering during refresh rate switching.

[0151] Furthermore, in this embodiment, a field for obtaining the target refresh rate is defined in the function for changing display settings.

[0152] In combination with the usage scenario, Figure 7 A schematic diagram of the display interface for the refresh rate switching process is provided.

[0153] refer to Figure 7 (a) The electronic device can display the current refresh rate on the current screen when it receives a user's command to display the current refresh rate. For example, the current refresh rate is 60Hz. Alternatively, the electronic device can also display the current refresh rate on the display screen when the device is powered on or when the device refresh rate is periodically monitored.

[0154] Users can switch refresh rates through the refresh rate settings interface, such as Figure 7In step (b), the user selects 100Hz from the refresh rate dropdown menu. After the user clicks the OK button, the electronic device responds to the user-triggered refresh rate switching operation and acquires the target refresh rate (100Hz). Simultaneously, steps S303-S308 are executed to switch the refresh rate. Figure 7 (c) The electronic device switches the refresh rate of the display screen to 100Hz and displays the switched refresh rate on the current display interface.

[0155] In some embodiments, the electronic device can automatically switch the refresh rate according to the actual scene. When switching the refresh rate, the above-mentioned refresh rate switching method can be used to call the appropriate function to switch.

[0156] For example, when an electronic device detects a switch from a work scene to a game scene, it triggers a refresh rate switching command to automatically switch the refresh rate and increase the display's refresh rate. When the electronic device detects a switch from a game scene to a work scene, it triggers a refresh rate switching command to automatically switch the refresh rate and decrease the display's refresh rate. When the electronic device detects a switch from a work scene to a movie-watching scene, it triggers a refresh rate switching command to automatically switch the refresh rate and increase the display's refresh rate. And so on. The refresh rate switching method provided in this application embodiment is applicable to user-triggered refresh rate switching scenarios and scenarios where the electronic device automatically switches the refresh rate.

[0157] In this embodiment of the application, when the electronic device receives a refresh rate switching operation, and determines that the electronic device has enabled dynamic refresh rate, it can select a refresh rate switching function that is adapted to the actual state of the display screen to perform the refresh rate switching operation. This reduces the probability of black screen or flickering caused by refresh rate switching to a certain extent, and avoids black screen or flickering problems as much as possible, so as to achieve refresh rate switching that is imperceptible to the user.

[0158] In some feasible embodiments, another refresh rate switching method is provided, in Figure 3 In the provided embodiment, after the electronic device obtains the virtual refresh rate, it can directly determine whether the virtual refresh rate includes a preset refresh rate (i.e., execute S305 and subsequent steps). Since the preset refresh rate is a pre-set virtual refresh rate, if it includes the preset refresh rate, it can be determined that the display supports dynamic refresh rate adjustment, that is, the display has DRR enabled. The electronic device may not need to execute S304, which reduces the determination time and improves the refresh rate switching efficiency.

[0159] In some feasible embodiments, another refresh rate switching method is provided, see reference. Figure 8 , Figure 8A flowchart illustrating another refresh rate switching method is provided, including:

[0160] S401, Electronic device receives refresh rate switching operation.

[0161] The embodiments provided in S301 above can be referred to, and will not be repeated in this embodiment.

[0162] S402, Electronic devices obtain the virtual refresh rate of the display screen.

[0163] The embodiments provided in S302 above can be referred to, and will not be repeated in this embodiment.

[0164] S403, the electronic device obtains the physical refresh rate of the graphics card.

[0165] The embodiments provided in S303 above can be referred to, and will not be repeated in this embodiment.

[0166] S404. If the number of virtual refresh rates is greater than the number of physical refresh rates, execute S405; otherwise, execute S410.

[0167] The embodiments provided in S304 above can be referred to, and will not be repeated in this embodiment.

[0168] S405, Does the virtual refresh rate include a preset refresh rate? If yes, proceed to S406; otherwise, proceed to S410.

[0169] The embodiments provided in S305 above can be referred to, and will not be repeated in this embodiment.

[0170] S406, Electronic device obtains the target refresh rate of refresh rate switching operation instruction.

[0171] In this embodiment, when a user switches refresh rates using a shortcut, the electronic device's default target refresh rate is a refresh rate higher than the current refresh rate. If a refresh rate ranking is set, the default target refresh rate is the refresh rate that is higher than and closest to the current refresh rate. When a user switches refresh rates via the refresh rate settings interface, the target refresh rate is the refresh rate selected by the user in the refresh rate settings interface.

[0172] S407, if the physical refresh rate indicated by the target refresh rate changes, then execute S408; otherwise, execute S410.

[0173] Electronic devices can determine whether the physical refresh rate corresponding to the target refresh rate and the current refresh rate of the display has changed. If it has changed, meaning a physical refresh rate switch has occurred, the electronic device calls the appropriate refresh rate switching function based on the power supply status of the display to perform the refresh rate switching operation. If no physical refresh rate switch has occurred, the electronic device can directly call the function to change display settings to perform the refresh rate switching operation.

[0174] This is because switching the physical refresh rate can cause the screen to go black. Therefore, calling the appropriate refresh rate switching function based on the actual power supply status of the display can effectively reduce the probability of a black screen. If the physical refresh rate is not involved, the screen will not go black; electronic devices can use common functions (i.e., functions to change display settings) to switch the refresh rate.

[0175] S408, the electronic device determines whether the power supply status of the display screen is DC. If yes, proceed to S409; otherwise, proceed to S410.

[0176] If the display is in DC mode, execute S409. If the display is in AC mode, execute S410.

[0177] The embodiments provided in S306 above can be referred to, and will not be repeated in this embodiment.

[0178] S409, the electronic device calls the display configuration function to perform a refresh rate switching operation.

[0179] The embodiments provided in S307 above can be referred to, and will not be repeated in this embodiment.

[0180] S410, the electronic device calls the function to change display settings to perform a refresh rate switching operation.

[0181] The embodiments provided in S308 above can be referred to, and will not be repeated in this embodiment.

[0182] In this embodiment, when the electronic device receives a refresh rate switching operation, it can preliminarily determine whether the physical refresh rate has changed when it determines that the electronic device has enabled dynamic refresh rate. If the physical refresh rate has changed, based on the actual state of the display screen, a refresh rate switching function adapted to the actual state of the display screen is selected to perform the display screen refresh rate switching operation. This reduces the probability of the display screen going black or flickering due to refresh rate switching to a certain extent, and avoids the problem of the display screen going black or flickering as much as possible, so as to achieve refresh rate switching that is imperceptible to the user.

[0183] In some feasible embodiments, another refresh rate switching method is provided. Before step S406 above, it can be determined whether the electronic device has HDR enabled. If so, step S406 is executed.

[0184] Electronic devices can determine whether HDR is enabled on a display by obtaining parameters that characterize whether HDR is enabled. When HDR is enabled, the display is in AC mode, and a function to change display settings is called to switch refresh rates without flickering. When the display is in DC mode, a function to set display configuration is called to switch refresh rates without flickering.

[0185] In some other scenarios, when the display is set to Standard Dynamic Range (SDR) and is in AC mode, calling the function to change display settings will switch refresh rates without flickering. When the display is in DC mode, calling the function to set display configuration will switch refresh rates without flickering.

[0186] In this embodiment, when the electronic device receives a refresh rate switching operation, and determines that the electronic device has enabled dynamic refresh rate, it can switch the refresh rate of the display screen based on whether the electronic device is in HDR mode. When the physical refresh rate changes, based on the actual state of the display screen, a refresh rate switching function adapted to the actual state of the display screen is selected to perform the refresh rate switching operation. This reduces the probability of black screen or flickering caused by refresh rate switching to a certain extent, and avoids black screen or flickering problems as much as possible, achieving refresh rate switching that is imperceptible to the user.

[0187] Figure 9 A possible structural schematic diagram of the electronic device involved in the above embodiments is shown. Figure 9 The electronic device 900 shown includes a processing module 901, a display module 902, and a storage module 903.

[0188] The processing module 901 may be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The processor may include an application processor and a baseband processor. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0189] For example, the processing module 901 can be as follows: Figure 1 The processor 110 shown; the display module 902 can be as follows: Figure 1 The display screen 194 shown; the storage module 903 can be as follows: Figure 1 The internal memory 121 shown. The electronic device provided in this application embodiment can be Figure 1 The electronic device 100 shown.

[0190] This application also provides a chip system (e.g., a system-on-a-chip (SoC)). Figure 10 As shown, the chip system includes at least one processor 1001 and at least one interface circuit 1002. The processor 1001 and the interface circuit 1002 are interconnected via lines. For example, the interface circuit 1002 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 1002 can be used to send signals to other devices (e.g., the processor 1001 or the display screen of an electronic device). Exemplarily, the interface circuit 1002 can read instructions stored in the memory and send those instructions to the processor 1001. When the instructions are executed by the processor 1001, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in this application embodiment.

[0191] This application also provides a computer-readable storage medium including computer instructions that, when executed on the electronic device, cause the electronic device to perform various functions or steps performed by the electronic device 100 in the above method embodiment.

[0192] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps performed by the electronic device 100 in the above method embodiments. For example, the computer may be the aforementioned electronic device 100.

[0193] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0194] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0195] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0196] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0197] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0198] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A refresh rate switching method, characterized in that, Applied to electronic devices, the electronic devices including graphics cards and displays, the displays corresponding to a plurality of first refresh rates, the first refresh rates representing the refresh rates supported by the displays; The graphics card corresponds to multiple second refresh rates, and the second refresh rate represents the display frequency of the graphics card; One second refresh rate corresponds to one or more of the first refresh rates; The method includes: When the electronic device receives a refresh rate switching command, it obtains the number of the first refresh rates; When the number of first refresh rates is greater than the number of second refresh rates, and the plurality of first refresh rates includes a preset refresh rate, the electronic device calls a refresh rate switching function adapted to the power supply state of the display screen to perform a refresh rate switching operation. The power supply state includes either DC or AC power. The refresh rate switching function includes a display configuration setting function and a display setting change function. The display configuration setting function defines a path marker, which indicates that the electronic device is configuring the refresh rate in a non-dynamic range refresh rate configuration mode. If the display screen is in the DC power state, the electronic device calls the display configuration setting function to perform the refresh rate switching operation. The display setting change function defines that dynamically changing display device attribute parameters is continuously effective. If the display screen is in the AC power state, the electronic device calls the display setting change function to perform the refresh rate switching operation.

2. The method according to claim 1, characterized in that, The display configuration function defines the return path of the refresh rate switching result as the current path, where the path refers to the path between the display mode of the screen and the output mode of the graphics card.

3. The method according to claim 1, characterized in that, The method further includes: If the number of first refresh rates is less than or equal to the number of second refresh rates, or if the preset refresh rate is not included among the plurality of first refresh rates, the electronic device calls the change display settings function to perform the refresh rate switching operation.

4. The method according to any one of claims 1-3, characterized in that, When the number of first refresh rates is greater than the number of second refresh rates, and the plurality of first refresh rates includes a preset refresh rate, the electronic device, based on the power supply status of the display screen, calls a refresh rate switching function adapted to the power supply status to perform a refresh rate switching operation, including: When the number of first refresh rates is greater than the number of second refresh rates, and the plurality of first refresh rates includes a preset refresh rate, the electronic device obtains the target refresh rate indicated by the refresh rate switching command; The electronic device obtains the target second refresh rate corresponding to the current first refresh rate of the display screen; If the target refresh rate does not match the target second refresh rate, the electronic device calls a refresh rate switching function adapted to the power supply state of the display screen and performs the refresh rate switching operation.

5. The method according to claim 4, characterized in that, The refresh rate switching instruction includes an instruction triggered by the electronic device in response to a user's action on a refresh rate switching shortcut key, wherein the target refresh rate indicated by the refresh rate switching instruction is a first refresh rate that is higher than the current first refresh rate of the display screen.

6. The method according to claim 4, characterized in that, The refresh rate switching instruction includes an instruction triggered by the electronic device in response to a user's switching operation on the refresh rate option, wherein the target refresh rate indicated by the refresh rate switching instruction is the refresh rate corresponding to the refresh rate option selected by the user.

7. The method according to any one of claims 1-3, characterized in that, When the number of first refresh rates is greater than the number of second refresh rates, and the plurality of first refresh rates includes a preset refresh rate, the electronic device, based on the power supply status of the display screen, calls a refresh rate switching function adapted to the power supply status to perform a refresh rate switching operation, including: When the number of first refresh rates is greater than the number of second refresh rates, and the plurality of first refresh rates includes a preset refresh rate, the electronic device obtains the target refresh rate indicated by the refresh rate switching command; The electronic device obtains the target second refresh rate corresponding to the current first refresh rate of the display screen; If the display screen is enabled for High Dynamic Range (HDR) imaging, and the target refresh rate does not match the target second refresh rate, the electronic device calls a refresh rate switching function adapted to the power supply state of the display screen to perform the refresh rate switching operation.

8. The method according to any one of claims 1-3, characterized in that, After performing the refresh rate switching operation, the method further includes: The electronic device displays a refresh rate prompt window; the refresh rate prompt window includes the refresh rate after switching.

9. The method according to any one of claims 1-3, characterized in that, The function for setting the display configuration is SetDisplayConfig; The setting display configuration function defines a path marker, in which the parameter supporting dynamic range configuration refresh rate is removed. The parameter supporting dynamic range configuration refresh rate is DISPLAYCONFIG_PATH_BOOST_REFRESH_RATE. The setting display configuration function defines the return path of the refresh rate switching result as the current path, where the parameter used to represent the return path of the refresh rate switching result as the current path is QDC_ONLY_ACTIVE_PATHS.

10. The method according to any one of claims 1-3, characterized in that, The function for changing display settings is ChangeDisplaySettings; The function for changing display settings defines a parameter that indicates that dynamically changing display device attribute parameters is continuously effective. The parameter indicating that dynamically changing display device attribute parameters is continuously effective is CDS_UPDATEREGISTRY.

11. An electronic device comprising a display screen, a graphics card, a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-10.

12. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1-10.

13. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1-10.

Citation Information

Patent Citations

  • Novel display screen driving method

    CN116110317A

  • Refresh rate control method and related device

    CN118072674A