Command sending method, storage medium and device

By generating and sending the preamble and body of the timing parameter adjustment command through the SoC, the problem of untimely command interaction between the SoC and the input/output module is solved, thereby improving the user experience of the electronic device.

CN115640046BActive Publication Date: 2025-10-03HONOR DEVICE CO LTD

Patent Information

Application Number
CN202110834302.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-20
Publication Date
2025-10-03
Estimated Expiration
2041-07-20

AI Technical Summary

Technical Problem

In electronic devices, the command interaction between the SoC and the input/output module is not timely, resulting in a poor user experience. For example, the display parameters are not adjusted in time, resulting in abnormal display.

Method used

The SoC generates and sends the preamble and body of the first command and the timing parameter adjustment command, and ensures that the command is sent to the input/output module in a timely manner by identifying the command type and judging the command preparation mode, thereby shortening the length of the timing parameter adjustment command.

Benefits of technology

The timeliness of command interaction is improved, ensuring that the input/output modules of electronic devices can adjust parameters synchronously, thereby enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115640046B_ABST
    Figure CN115640046B_ABST
Patent Text Reader

Abstract

The present application provides a method for sending a command, a storage medium, and a device. The method is applied to an electronic device, wherein the electronic device includes a system on a chip (SoC) and an input / output module. The method includes: in response to a first operation of a user, the SoC generates a first command and a preamble of a timing parameter adjustment command, wherein the first command is used to perform the first operation; the SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module; in response to a second operation of the user, the SoC generates a main body of the timing parameter adjustment command; and the SoC sends the main body of the timing parameter adjustment command to the input / output module. The SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module together. When the timing parameters need to be adjusted, the SoC sends the main body of the timing parameter adjustment command, shortening the length of the timing parameter adjustment command so that the timing parameter adjustment command is successfully sent to the input / output module within one clock cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic equipment, and in particular to a command sending method, storage medium, and device. Background Art

[0002] Electronic devices can generally be divided into two parts: a system on a chip (SoC) and the input / output modules connected to the SoC. For example, an SoC may include components such as a graphics processing unit (GPU), a central processing unit (CPU), and double-data-rate memory (DDR). Input modules include computer keyboards, smartphone fingerprint sensors, and cameras, while output modules include computer monitors and smartphone displays.

[0003] In actual applications, SoCs often need to exchange commands with input / output modules through the bus system. If the commands are not sent to the input / output modules in a timely manner during the interaction, the input / output modules cannot execute the corresponding actions in time, thereby affecting the user experience.

[0004] Taking the interaction between the SoC and the display as an example, when the SoC needs to adjust the parameters in the next frame, the display also needs to adjust the relevant parameters in the next frame synchronously. If the SoC's parameter switching command is not sent to the display in time, the display will not be able to adjust the parameters synchronously with the SoC, resulting in abnormal content displayed on the display (such as a distorted screen). Summary of the Invention

[0005] The present application provides a command sending method, storage medium and device, aiming to solve the problem of untimely command interaction between components in an electronic device.

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

[0007] The present application provides a method for sending a command, which is applied to an electronic device, wherein the electronic device includes a system on a chip (SoC) and an input / output module. The method includes:

[0008] In response to receiving a first operation input by a user, the SoC generates a first command and a preamble of a command for adjusting timing parameters, wherein the first command is used to perform the first operation;

[0009] The SoC sends the first command and a preamble of a timing parameter adjustment command to the input / output module;

[0010] In response to receiving the second operation input by the user, the SoC generates a main body of the timing parameter adjustment command;

[0011] The SoC sends the main part of the timing parameter adjustment command to the input / output module.

[0012] In some optional embodiments, after the SoC generates the first command and the preamble of the timing parameter adjustment command, the SoC further includes:

[0013] The SoC identifies a type of the first command;

[0014] The SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module, including:

[0015] After the SoC recognizes that the first command is the second type command, the SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module; the second type command includes commands other than the timing parameter adjustment command.

[0016] In some optional embodiments, before the SoC identifies the type of the first command, the method further includes:

[0017] The SoC determines whether the command preparation mode is in an enabled state;

[0018] After the SoC determines that the command preparation mode is in a disabled state, the SoC sends the first command to the input / output module;

[0019] The SoC identifies a type of the first command, including:

[0020] After the SoC determines that the command preparation mode is enabled, the SoC identifies the type of the first command.

[0021] In some optional embodiments, the SoC determines whether the command preparation mode is enabled, including:

[0022] The SoC determines whether the input / output module is in a dormant state;

[0023] If the input / output module is in a dormant state, the SoC determines that the command preparation mode is in a disabled state;

[0024] If the input / output module is in a non-sleep state, the SoC determines that the command preparation mode is in an enabled state.

[0025] In some optional embodiments, the SoC determines whether the command preparation mode is enabled, including:

[0026] The SoC determines whether the energy consumption mode of the electronic device is an energy-saving mode;

[0027] If the energy consumption mode of the electronic device is the energy-saving mode, the SoC determines that the command preparation mode is in a disabled state;

[0028] If the energy consumption mode of the electronic device is a non-energy-saving mode, the SoC determines that the command preparation mode is in an enabled state.

[0029] In some optional embodiments, the SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module, including:

[0030] The SoC sends the first command to the input / output module;

[0031] The SoC sends a preamble of the timing parameter adjustment command to the input / output module.

[0032] In some optional embodiments, the SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module, including:

[0033] The SoC adds a prefix of the timing parameter adjustment command to the end of the first command to obtain a first command carrying the prefix of the timing parameter adjustment command;

[0034] The SoC sends the first command carrying the prefix portion of the timing parameter adjustment command to the input / output module.

[0035] In some optional embodiments, before the SoC sends the main part of the timing parameter adjustment command to the input / output module, the method further includes:

[0036] The SoC determines whether it is necessary to send the preamble of the timing parameter adjustment command;

[0037] After the SoC determines that the preamble of the timing parameter adjustment command needs to be sent, the SoC sends the timing parameter adjustment command to the input / output module;

[0038] The SoC sends the main part of the timing parameter adjustment command to the input / output module, including:

[0039] After the SoC determines that it is not necessary to send the preamble of the timing parameter adjustment command, the SoC sends the body of the timing parameter adjustment command to the input / output module.

[0040] In some optional embodiments, the SoC includes a type identification module;

[0041] The SoC identifies a type of the first command, including:

[0042] The type identification module identifies a type of the first command.

[0043] In some optional embodiments, the SoC includes an adding module, a communication module and a communication interface;

[0044] After the SoC recognizes that the first command is a command of the second type, the SoC sends the first command and a preamble of a timing parameter adjustment command to the input / output module, including:

[0045] After the type identification module identifies that the first command is a command of the second type, the type identification module sends the first command to the adding module;

[0046] In response to receiving the first command, the adding module adds a prefix of the timing parameter adjustment command to the end of the first command to obtain a first command carrying the prefix of the timing parameter adjustment command;

[0047] The adding module sends the first command carrying the prefix of the timing parameter adjustment command to the communication module;

[0048] In response to receiving the first command carrying the prefix portion of the timing parameter adjustment command, the communication module sends the first command carrying the prefix portion of the timing parameter adjustment command to the input / output module through the communication interface.

[0049] In some optional embodiments, the SoC includes a second judgment module;

[0050] The SoC sends the main part of the timing parameter adjustment command to the input / output module, including:

[0051] In response to receiving the timing parameter adjustment command, the second judgment module judges whether it is necessary to send a preamble of the timing parameter adjustment command;

[0052] After the second judgment module determines that it is not necessary to send the preamble of the timing parameter adjustment command, the second judgment module sends the body of the timing parameter adjustment command to the communication module;

[0053] In response to receiving the main portion of the adjust timing parameter command, the communication module sends the main portion of the adjust timing parameter command to the input / output module through the communication interface.

[0054] In some optional embodiments, the SoC includes a cache, and a command queue is provided in the cache;

[0055] The second judgment module judges whether it is necessary to send the preamble of the timing parameter adjustment command, including:

[0056] The second judgment module reads the command stored in the command queue and sent to the input / output module;

[0057] The second judgment module judges whether the read command includes the prefix of the timing parameter adjustment command;

[0058] If the read command includes the prefix of the timing parameter adjustment command, the second judgment module determines that it is not necessary to send the prefix of the timing parameter adjustment command;

[0059] If the read command does not include the prefix of the timing parameter adjustment command, the second determination module determines that the prefix of the timing parameter adjustment command needs to be sent.

[0060] In some optional embodiments, the SoC includes a first judgment module;

[0061] Before the type identification module identifies the type of the first command, the method further includes:

[0062] The first judgment module obtains the first command;

[0063] The first determination module determines whether the command preparation mode is enabled;

[0064] After the first determination module determines that the command preparation mode is in the enabled state, the first determination module sends the first command to the type identification module.

[0065] In some optional embodiments, after the first determining module determines whether the command preparation mode is enabled, the method further includes:

[0066] After the first determination module determines that the command preparation mode is in a disabled state, the first determination module sends the first command to the communication module;

[0067] In response to receiving the first command, the communication module sends the first command to the input / output module through the communication interface.

[0068] In some optional embodiments, the first command includes a screen-on command; the prefix of the timing parameter adjustment command is the first instruction, and the main body of the timing parameter adjustment command is the second instruction;

[0069] The display screen includes a display driver integration chip (DDIC); the DDIC includes a memory and a plurality of register groups; each of the register groups includes a plurality of registers; and the memory stores a plurality of sets of timing parameters.

[0070] In some optional embodiments, after the SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module, the method further includes:

[0071] After receiving the first instruction, the DDIC searches for a target register group in the plurality of register groups; the target register group is a register group corresponding to the register group identifier carried by the first instruction;

[0072] After the SoC sends the main part of the timing parameter adjustment command to the input / output module, the method further includes:

[0073] After receiving the second instruction, the DDIC searches for the target register in the plurality of registers in the target register group; the target register is the register in the target register group corresponding to the register address carried by the second instruction;

[0074] The DDIC writes the identifier carried by the second instruction into the target register;

[0075] The DDIC reads the timing parameter corresponding to the identifier stored in the target register from the memory;

[0076] The DDIC adjusts the refresh rate of the display screen according to the read timing parameters.

[0077] In some optional embodiments, the first operation includes an operation of lighting up the screen, or an operation of turning off the screen.

[0078] In some optional embodiments, the second operation includes an operation of opening a game application, or an operation of sliding a list.

[0079] The present application also provides an electronic device, comprising a system on a chip (SoC), a memory, and an input / output module;

[0080] The memory is used to store one or more programs;

[0081] The SoC is configured to execute the one or more programs to perform the following actions:

[0082] In response to receiving a first operation input by a user, the SoC generates a first command and a preamble of a command for adjusting timing parameters, wherein the first command is used to perform the first operation;

[0083] The SoC sends the first command and a preamble of a timing parameter adjustment command to the input / output module;

[0084] In response to receiving the second operation input by the user, the SoC generates a main body of the timing parameter adjustment command;

[0085] The SoC sends the main part of the timing parameter adjustment command to the input / output module.

[0086] The present application further provides a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the command sending method provided in any one of the present applications.

[0087] The present application provides a method for sending a command, a storage medium, and a device. The method is applied to an electronic device, wherein the electronic device includes a system on a chip (SoC) and an input / output module. The method includes: in response to a first operation of a user, the SoC generates a first command and a preamble of a timing parameter adjustment command, wherein the first command is used to perform the first operation; the SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module; in response to a second operation of the user, the SoC generates a main body of the timing parameter adjustment command; and the SoC sends the main body of the timing parameter adjustment command to the input / output module. The SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module together. When the timing parameters need to be adjusted, the SoC sends the main body of the timing parameter adjustment command, shortening the length of the timing parameter adjustment command so that the timing parameter adjustment command is successfully sent to the input / output module within one clock cycle. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 A schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application;

[0089] Figure 2 A structural diagram showing a schematic diagram of a connection relationship between a SoC and a display screen disclosed in an embodiment of the present application;

[0090] Figure 3 A schematic diagram of the structure of a DDIC disclosed in an embodiment of the present application;

[0091] Figure 4 A schematic diagram of a communication method between a SoC and a DDIC disclosed in an embodiment of the present application;

[0092] Figure 5 A timing diagram of a command sending method disclosed in an embodiment of the present application;

[0093] Figure 6 A flowchart of a method for sending a command disclosed in an embodiment of the present application;

[0094] Figure 7 A schematic diagram of the hardware and software layer structures of an electronic device for executing a command sending method disclosed in an embodiment of the present application;

[0095] Figure 8 A schematic diagram of an application scenario of a command sending method disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0096] The method for sending a command provided by this application can be applied to any electronic device. Among them, the electronic device applicable to the method for sending a command can have a structure as follows: Figure 1 shown.

[0097] like Figure 1 As shown, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a touch sensor 180A, a pressure sensor 180B, and the like.

[0098] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown, or some components may be combined or separated, or the components may be arranged differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0099] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0100] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0101] In some embodiments, the processor 110 may include one or more interfaces. The 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.

[0102] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C busses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device.

[0103] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0104] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0105] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0106] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device.

[0107] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0108] The external memory 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. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0109] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. For example, in this embodiment, the processor 110 can perform scene arrangement by executing the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121 and / or the instructions stored in the memory provided in the processor.

[0110] USB port 130 is an interface that complies with USB standards and may be a Mini USB port, a Micro USB port, a USB Type-C port, or the like. USB port 130 can be used to connect a charger to charge the electronic device, transfer data between the electronic device and peripheral devices, connect headphones to play audio, or connect to other electronic devices, such as augmented reality devices.

[0111] It is understood that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0112] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the electronic device's wireless charging coil. While the charging management module 140 is charging the battery 142, it can also power the electronic device through the power management module 141.

[0113] The power management module 141 is used to connect 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, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0114] The wireless communication function of the electronic device can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor and the baseband processor.

[0115] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in this electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0116] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0117] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0118] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied to the electronic device. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0119] In some embodiments, the antenna 1 of the electronic device is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a BeiDou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite-based augmentation system (SBAS).

[0120] The electronic device implements display functionality through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0121] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, or a quantum dot light-emitting diode (QLED). In some embodiments, the electronic device may include one or N display screens 194, where N is a positive integer greater than 1.

[0122] A series of graphical user interfaces (GUIs) can be displayed on the display screen 194 of the electronic device, and these GUIs are the main screen of the electronic device. Generally speaking, the size of the display screen 194 of the electronic device is fixed, and only limited controls can be displayed on the display screen 194 of the electronic device. A control is a GUI element, which is a software component included in an application that controls all data processed by the application and interactive operations on this data. Users can interact with the control through direct manipulation to read or edit relevant information of the application. Generally speaking, controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. For example, in an embodiment of the present application, the display screen 194 can display virtual buttons.

[0123] The electronic device can realize the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0124] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0125] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0126] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when the electronic device is selecting a frequency point, the DSP is used to perform a Fourier transform on the frequency point energy.

[0127] Video codecs are used to compress or decompress digital video. An electronic device may support one or more video codecs. This allows the device to play or record videos in a variety of encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0128] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU enables intelligent cognitive applications in electronic devices, such as image recognition, face recognition, speech recognition, and text comprehension.

[0129] The electronic device can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0130] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0131] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device can listen to music or make hands-free calls through the speaker 170A.

[0132] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device receives a call or voice message, the voice can be heard by placing the receiver 170B close to the human ear.

[0133] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device can be provided with at least one microphone 170C. In other embodiments, the electronic device can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device can also be provided with three, four or more microphones 170C to realize sound signal collection, noise reduction, and identification of sound sources, and realize directional recording function, etc.

[0134] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0135] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown, or some components may be combined or separated, or the components may be arranged differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0136] The touch sensor 180A is also called a "touch device". The touch sensor 180A can be set on the display screen 194. The touch sensor 180A and the display screen 194 form a touch screen, also called a "touch screen" or "touch panel". The touch sensor 180A is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor in the form of a touch instruction to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180A can also be set on the surface of the electronic device, at a different location from the display screen 194. In this case, the touch sensor 180A itself can be regarded as a touch panel.

[0137] Pressure sensor 180B is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180B can be located on display screen 194. There are many types of pressure sensors 180B, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180B, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, the electronic device detects the intensity of the touch operation based on pressure sensor 180B. The electronic device can also calculate the location of the touch based on the detection signal from pressure sensor 180B. In some embodiments, touch operations applied to the same touch location but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, an instruction to create a new short message is executed.

[0138] This electronic device implements its display functionality through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects display screen 194 and the application processor. Display screen 194 is used to display images, videos, and the like. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0139] The display screen 194 of the electronic device may display a series of graphical user interfaces (GUIs), and the user may interact with the electronic device by directly operating the GUIs. For example, in an embodiment of the present application, the display screen 194 may display virtual buttons.

[0140] Exemplarily, the internal memory 121 may store one or more computer programs, and the processor 110 may execute one or more programs stored in the internal memory, thereby implementing the command sending method provided in an embodiment of the present application.

[0141] Furthermore, operating systems run on these components. Examples include Apple's iOS operating system, Google's open-source Android operating system, Microsoft's Windows operating system, and Hongmeng OS. Applications can be installed and run on these operating systems.

[0142] Furthermore, operating systems run on the above components, such as the iOS operating system developed by Apple, the Android open-source operating system developed by Google, and the Windows operating system developed by Microsoft. Application programs can be installed and run on these operating systems.

[0143] In some electronic devices, the commands described in this application can be considered as a set of instructions consisting of one or more instructions that meet the following conditions:

[0144] After receiving the instruction set, the device in the electronic device can perform specific actions according to the instruction set.

[0145] For example, when some electronic devices need to adjust the screen refresh rate from A to B, they need to send a timing parameter adjustment command to the display screen so that the display screen driver switches the timing parameters currently applied to the display screen to timing parameters that match the refresh rate B.

[0146] Table 1

[0147] First instruction 【1】0x05,0x01,0x00,0x00,0x14,0x01,0x02,0xFF,0x2A The second instruction 【2】0x05,0x01,0x00,0x00,0x14,0x01,0x02,0x230x0C

[0148] Table 1 shows an example of a timing parameter adjustment command, where each row of numbers represents an instruction. As shown in Table 1, the timing parameter adjustment command includes two instructions, each of which consists of nine bytes. For example, 0x14 is a byte representing the hexadecimal value "14" (0x represents hexadecimal). The corresponding decimal representation of this byte is 20, and the corresponding binary representation is: 00010100.

[0149] The following combination Figure 2 and Figure 3 Explain the timing parameter adjustment commands shown in Table 1. Figure 2 This is a structural diagram showing a schematic diagram of the connection relationship between a SoC and a display screen disclosed in an embodiment of the present application. Figure 3 This is a schematic structural diagram of a display driver integrated chip (DDIC) disclosed in an embodiment of the present application.

[0150] like Figure 2 As shown, the SoC includes a CPU, GPU, DDR, and a mobile display processor (MDP) interface. The MDP interface of the SoC is connected to the DDIC via the Mobile Industry Processor Interface (MIPI).

[0151] like Figure 3 As shown, the DDIC integrates memory and multiple registers. To facilitate addressing, the multiple registers are divided into multiple register groups (pages), each with a corresponding group identifier. Each page includes multiple registers, and each register within a page has a corresponding address. Each register can correspond to a different function of the display. The SoC can change the value stored in each register by sending commands, and the DDIC controls the corresponding function based on the change in the register value.

[0152] For example, each page may include 256 registers, and the functions corresponding to the registers may include screen lighting, screen off, full white, adjusting timing parameters, etc.

[0153] The memory of DDIC is used to store various pre-configured parameters. For example, Figure 3 Two sets of timing parameters are stored in a specific area of ​​the memory, designated Timing Parameter 1 and Timing Parameter 2. Timing Parameter 1 is stored in the address range 0x00 to 0x20, and Timing Parameter 2 is stored in the address range 0x20 to 0x40. The multiple sets of timing parameters stored in the memory constitute a timing table. The following are examples of Timing Parameter 1 and Timing Parameter 2:

[0154] <Timing Table>

[0155] Timing parameters 1 (60Hz): "HFP=60, HBP=20, HSA=20, VFP=80, VBP=60, VSA=40, refresh rate=60Hz, MIPI CLK: 458(MHz)";

[0156] Timing parameters 2 (120Hz): "HFP=60, HBP=20, HSA=20, VFP=80, VBP=60, VSA=40, refresh rate=120Hz, MIPI CLK: 1124(MHz)".

[0157] Among them, HFP represents the horizontal sync front blanking area (Horizontal sync Front porch), HBP represents the horizontal sync back blanking area (Horizontal sync Back porch), HAS represents the horizontal start address (Horizontal Start Address), VFP represents the horizontal sync front blanking area (Vertical sync Front porch), VBP represents the horizontal sync back blanking area (Vertical sync Back porch, VSA represents the vertical start address (Vertical Start Address), and MIPI CLK represents the frequency of the clock signal transmitted on the MIPI bus.

[0158] Timing parameters are operating parameters of a display. They determine how long it takes the DDIC to refresh a row of pixels on the display. Therefore, by changing the timing parameters used by the DDIC, you can change the display's refresh rate. In the example above, when the DDIC operates with timing parameter 1, the display's refresh rate is 60Hz. When the DDIC operates with timing parameter 2, the display's refresh rate is 120Hz.

[0159] Figure 3 In the example, register 0x23 of page 42 is used to set the timing parameters. Different values ​​of register 0x23 of page 42 correspond to different address segments in the memory. For example, Figure 3 The value 0x0C shown here corresponds to the address range 0x00 to 0x20. Furthermore, the value 0x20 to 0x40 corresponds to 0x0D. The SoC can set the value stored in register 0x23 to enable the DDIC to use different timing parameters stored in different address ranges.

[0160] The first instruction shown in Table 1 instructs the DDIC to search for a register group. Taking Table 1 as an example, 0x05, 0x01, 0x00, 0x00, 0x14, 0x01, and 0x02 are protocol instructions specified by the MIPI protocol. 0xFF indicates a register group search operation, and 0x2A is the group identifier of the register group to be searched. After receiving the first instruction, the DDIC can find the target register group among multiple register groups. The target register group is the register group corresponding to the group identifier carried in the first instruction.

[0161] The second instruction shown in Table 1 indicates the register address and the value to be written. Taking Table 1 as an example, 0x05, 0x01, 0x00, 0x00, 0x14, 0x01, and 0x02 are protocol instructions specified by the MIPI protocol. 0x23 is the register address of a register in page 42, and 0x0C is the value to be written to register 0x23. 0x0C can be understood as an identifier corresponding to a set of timing parameters stored in memory. After receiving the second instruction, the DDIC can locate the target register among the multiple registers in the target register group and then write the desired value to the target register. The target register is the register corresponding to the register address carried in the second instruction.

[0162] by Figure 3 For example, after receiving the command shown in Table 1, the DDIC can use the first instruction to find page 42 among the multiple pages. Then, according to the second instruction, it sets the value stored in register 0x23 in page 42 to 0x0C. 0x0C corresponds to addresses 0x00-0x20 in the DDIC's memory. Therefore, based on 0x0C, the DDIC can find the address segment 0x00-0x20 in the memory and read the timing parameter 1 stored in this address segment. Based on timing parameter 1, the display can display images at a 60Hz refresh rate.

[0163] As can be seen from the above description, the SoC can change the last byte of the second instruction of the timing parameter adjustment command to make the DDIC work based on different timing parameters stored in the memory, thereby changing the refresh rate of the display. For example, the SoC can send the following timing parameter adjustment command to adjust the refresh rate of the display to 90Hz:

[0164] 0x05,0x01,0x00,0x00,0x14,0x01,0x02,0xFF,0x2A;

[0165] 0x05,0x01,0x00,0x00,0x14,0x01,0x02,0x230x0D.

[0166] The following combination Figure 4 right Figure 2 The communication method between SoC and DDIC is explained in Figure 4 Schematic diagram of the communication method between SoC and DDIC.

[0167] The MIPI bus between SoC and DDIC includes clock line and data line. Figure 4As shown, the SoC can send a clock signal VSYNC to the DDIC via the clock line at a certain clock cycle. Each time a clock signal VSYNC is sent, the SoC first sends vertical synchronization pulse width (VSW) data within the VSW period. After the VSW period ends, the SoC sends vertical back blanking area (VBP) data within the VBP period. The moment after the VBP period ends is recorded as Vactive0_start. After Vactive0_start, the SoC begins to send image data to the DDIC to be displayed on the display. After sending the image data at Vactive0_end, the SoC can send commands in the period between Vactive0_end and the clock signal VSYNC. Due to the limited time period for sending commands within a clock cycle, the commands sent by the SoC to the DDIC may not be sent completely within a single clock cycle. For example, when sending a command to adjust timing parameters consisting of two instructions, the SoC needs to send the two instructions sequentially. Therefore, these two instructions may not be sent to the display in time within a single clock cycle. When the timing parameter adjustment command cannot be sent to the DDIC within one clock cycle, the display screen controlled by the DDIC will have problems such as screen distortion and screen flickering.

[0168] In order to solve the problem that the SoC cannot send commands to the input / output module in a timely manner within one clock cycle, an embodiment of the present application provides a method for sending commands. The following describes the method for sending commands provided by this embodiment using a display screen as an example.

[0169] Please refer to Figure 5 , Figure 5 A timing diagram of a command sending method provided in an embodiment of the present application.

[0170] After generating the first command to be sent 1, the SoC determines that the command to be sent is a second-category command, that is, the command to be sent 1 is not a timing parameter adjustment command.

[0171] Exemplarily, during the interaction between the SoC and the DDIC of the display screen, the aforementioned command for adjusting the timing parameters is recorded as a first-category command, and other commands except the command for adjusting the timing parameters are recorded as a second-category command.

[0172] The type of pending command can be distinguished by its function. For example, during the communication process between the SoC and the display, it is only necessary to determine whether the pending command is a command for adjusting timing parameters to identify whether the pending command is a first-class command or a second-class command. If pending command 1 is a command for adjusting timing parameters, the SoC identifies the pending command as a first-class command. Conversely, if pending command 1 is not a command for adjusting timing parameters, the SoC identifies the pending command as a second-class command.

[0173] Please refer to Table 2, which shows some examples of the second type of commands involved in the interaction between the SoC and the display.

[0174] Table 2

[0175] Command ID Original command Command 1 REGW0x29,0x00 Command 2 REGW0x28,0x00 Command 3 REGW0x01,0x0a

[0176] Among them, command 1 is the screen-on command (wake-up command), which is used to light up the display screen in the off state (i.e., trigger the screen to wake up from the sleep state); command 2 is the screen-off command (sleep command), which is used to turn off the display screen in the lit state (i.e., trigger the screen to go into sleep from the wake-up state); command 3 is the electrostatic discharge check (ESD check) command, referred to as the check command. REGW represents the protocol command specified by the MIPI protocol shown in Table 1.

[0177] After the SoC recognizes that the pending command 1 is a second-type command, it sends the pending command 1 and the preamble of the first-type command to the DDIC.

[0178] The preamble and body of the first type of command can be pre-set by the developer. Specifically, the preamble of the first type of command can be stored in the memory of the electronic device. When the SoC executes the above steps, the SoC can directly read the preamble of the first type of command stored in the memory.

[0179] When generating the command to be sent 1, the SoC may also generate a preamble of a command for adjusting timing parameters.

[0180] For example, the pending command 1 is the screen-on command shown in Table 2. After recognizing that the pending command 1 is the screen-on command, the SoC sends the screen-on command to the DDIC, and then, after the screen-on command is sent, appends the preamble of the command for adjusting the timing parameters, that is, appends the first instruction shown in Table 1.

[0181] After a period of time, the SoC generates a second pending command 2. The pending command 2 is a first-category command, that is, the pending command is a timing parameter adjustment command.

[0182] It should be noted that, since the pending command 2 is a timing parameter adjustment command, when the SoC generates the timing parameter adjustment command, it may generate a complete timing parameter adjustment command or only the main body of the timing parameter adjustment command.

[0183] After the SoC recognizes that the pending command 2 is a first-class command, since the preamble of the first-class command has been sent when the pending command 1 was sent, when the SoC sends the pending command 2, it does not need to send the preamble of the pending command 2, and only sends the main body of the pending command 2 to the DDIC.

[0184] Exemplarily, the command to be issued 2 is the command for adjusting the timing parameters shown in Table 1, and the main part of the command to be issued 2 is the second instruction shown in Table 1.

[0185] The main body of the command to be sent can be obtained as follows:

[0186] The SoC can read the preamble of the first-class command stored in the DDR and then match the pending command with the preamble of the first-class command. Through this matching, the SoC can determine the portion of the pending command that matches the preamble of the first-class command as the preamble of the pending command, and then determine the portion other than the preamble of the pending command as the body of the pending command.

[0187] Taking the first type of command as an example, after the DDIC receives the pending command 1 and the preamble of the first type of command, it can light up the display screen based on the pending command 1. Then, according to the preamble of the first type of command, it can find the register group where the registers for adjusting the timing parameters are located in multiple register groups, such as Figure 3 See page 42.

[0188] Subsequently, after receiving the main part of the pending command 2, the DDIC can directly set the value of the register for adjusting the timing parameters in page 42 according to the main part of the pending command 2, thereby changing the refresh rate of the display.

[0189] The SoC may generate a second-category command according to the user's first operation, and may generate a first-category command according to the user's second operation.

[0190] For example, the first operation may be an operation to turn on the screen. After receiving the operation to turn on the screen, the SoC can generate a command to turn on the screen. The second operation may be an operation in which the user opens a game application, a video application, or a list. After receiving the operation in which the user opens a game application or a video application, the SoC can generate a command to adjust the timing parameters to adjust the refresh rate of the display.

[0191] The command sending method provided in this embodiment has the following beneficial effects:

[0192] When the SoC needs to adjust the target action of the input / output module, the SoC can shorten the length of the command required to be sent through the method provided in this embodiment. For example, in the above embodiment, if this solution is not applied, the SoC needs to send the two instructions shown in Table 1 when the display screen needs to adjust the timing parameters. However, by applying this solution, the SoC only needs to send the main part of the command shown in Table 1, that is, only the second instruction in Table 1. The length of the command required to be sent is significantly shortened, thus ensuring that the command is successfully sent to the DDIC within one clock cycle. Therefore, this solution can ensure that when the SoC needs the input / output module to perform a target action, the input / output module can receive the first type of command in a timely manner, thereby executing the target action in a timely manner.

[0193] The target action refers to the action corresponding to the first type of command. For example, if the first type of command is the aforementioned command for adjusting timing parameters, then the target action is the action of adjusting timing parameters executed by the DDIC.

[0194] Please refer to Figure 6 , Figure 6 The flowchart of the method for sending a command provided in the embodiment of the present application is as follows. Figure 6 Taking the above-mentioned timing parameter adjustment command as an example, the specific execution process of the command sending method provided in the embodiment of the present application is described:

[0195] After the SoC is started, each time after a ready-to-send command is generated and before the ready-to-send command is sent, step 101 is executed: determining whether a command preparation mode is enabled.

[0196] Exemplarily, the command to be sent may be the aforementioned screen-on command, screen-off command, timing parameter adjustment command, etc.

[0197] The command preparation mode can be disabled by default when the display screen of the electronic device is in a sleep state, and enabled when the display screen of the electronic device is in an awake state (non-sleep state).

[0198] Some electronic devices enter a sleep state after displaying the same image for a certain period of time, or after the user initiates a sleep operation. The sleep state is when the display is off and does not display an image. Conversely, the state in which the display is lit and displays an image is called the awake state.

[0199] When command standby mode (StandBy mode) is enabled, the SoC must append the first instruction in Table 1 above to each second-category command it sends. This way, the display receives the first instruction in Table 1 appended to the second-category command. After executing the action indicated by the second-category command, the display responds to the first instruction in Table 1 and searches the register group containing the registers for adjusting timing parameters. When the display is in sleep mode, the SoC obviously doesn't need to adjust the display's refresh rate, nor does it need to enter a state ready for adjusting timing parameters. Therefore, command standby mode can be disabled when the display is in sleep mode.

[0200] Optionally, when the battery power of the electronic device is too low or receives an energy-saving operation instruction from the user, the energy consumption mode of the electronic device will enter the energy-saving mode. At this time, the display screen is in the awake state, but the command preparation mode is disabled. When the energy consumption mode of the electronic device is in the non-energy-saving mode, the command preparation mode is enabled.

[0201] If the command preparation mode is disabled, the SoC executes step 102: sending a ready-to-send command to the display screen.

[0202] A first implementation of step 102 may be to call a communication interface for communicating with the display screen to directly send a to-be-sent command to the display screen.

[0203] A second implementation method may be to write the pending commands into a command queue set in the cache. The command queue may store several commands, which may be read in the order in which they are written into the command queue and sent to the display screen through the communication interface. The commands written first are read first, and the commands written later are read later.

[0204] If the command preparation mode is enabled, the SoC executes step 103 : identifying the type of the command to be sent.

[0205] The specific implementation of step 103 can refer to the above embodiment and will not be described in detail.

[0206] If the command to be sent is a second-category command, the SoC executes step 104 : adding a prefix of the first-category command to the end of the command to be sent.

[0207] For example, the first type of command is shown in Table 1, which is used to trigger the display screen to adjust the timing parameters. The prefix of the command is the first instruction in Table 1. In some optional embodiments, the prefix of the first type of command may also include multiple instructions, or may only include several bytes of the first type of command.

[0208] Please refer to Table 3, which shows some examples of the second-category commands involved in the interaction between the SoC and the display, as well as examples after adding the timing parameter adjustment command at the end of these second-category commands.

[0209] Table 3

[0210]

[0211] The prefix of the timing parameter adjustment command is REGW 0xFF,0x2A in the third column of Table 2.

[0212] The timing parameter adjustment command applicable to some display screens may only include a long instruction (that is, the instruction includes multiple bytes). For this type of timing parameter adjustment command, the important content after the timing parameter adjustment command can be read one by one from the last byte of the command, for example, each byte related to setting the register value can be read forward one by one, and the read bytes can be used as the main part, and the rest of the timing parameter adjustment command can be used as the prefix.

[0213] After executing step 104 , the SoC executes step 105 : sending a to-be-sent command carrying a preamble of the first type of command to the display screen.

[0214] The sending method of step 105 is the same as that of step 102 and will not be described in detail.

[0215] If it is identified in step 104 that the command to be sent is a first type of command, the SoC executes step 106 : determining whether a preamble of the command to be sent needs to be sent.

[0216] Since the command to be sent belongs to the first category of commands, the prefix of the command to be sent is the prefix of the aforementioned first category of commands.

[0217] The SoC can determine whether it needs to send the preamble of the command to be sent as follows:

[0218] Each time the SoC sends a pending command, it can cache the pending command in the DDR. Therefore, when the SoC obtains the next pending command, it can read the previous pending command from the DDR and then determine whether the previous pending command carries the prefix of the first type of command.

[0219] For example, the SoC first sends a command P1 and stores P1 in the DDR. Then, the SoC obtains a waiting command P2. The previous command is P1.

[0220] When the SoC obtains the next command to be sent P2, it can read the previous cached command P1, and then determine whether P1 includes the prefix of the command to be sent P2. If P1 includes the prefix of the command to be sent P2, the SoC determines that the prefix of the command to be sent P2 does not need to be sent, and executes step 107; otherwise, if P1 does not include the prefix of the first type of command, the SoC determines that the prefix of the command to be sent needs to be sent, and executes step 108.

[0221] In the above example, after sending P2, the SoC can store P2 in the DDR and delete P1 stored in the DDR. Furthermore, after the SoC sends the next command P3, it can store P3 in the DDR and delete P2 stored in the DDR, and so on.

[0222] Optionally, the SoC may also determine whether the preamble of the command to be sent needs to be sent as follows:

[0223] When the command preparation mode is enabled, the SoC can determine whether the current pending command is the first command sent to the DDIC. If the current pending command is the first command sent to the DDIC, the SoC determines that the preamble of the pending command needs to be sent. If the current pending command is not the first command sent to the DDIC, the SoC determines that the preamble of the pending command does not need to be sent.

[0224] 107: Send the main part of the command to be sent to the display screen.

[0225] For example, the main body of the first-category command is the second instruction in Table 1. When the previous command carries the prefix of the first-category command, the display screen can combine the prefix of the first-category command appended to the end of the previous command and the main body of the first-category command received this time to form a complete first-category command, and then execute the action indicated by the first-category command, i.e., adjust the timing parameters.

[0226] The method for obtaining the main body of the command to be sent can be referred to the above embodiment and will not be repeated here.

[0227] 108: Send the pending command to the display screen.

[0228] The specific implementation of step 107 and step 108 is the same as that of step 102 and will not be repeated here.

[0229] In the above embodiment, the command preparation mode may be enabled by default, and therefore step 101 may not be performed.

[0230] When the command preparation mode is enabled, each time the SoC sends a second-class command, it will add the prefix of the first-class command to the end of it. Therefore, as long as the first-class command currently to be sent is not the first command sent after the command preparation mode is enabled, it can generally be assumed that the previous command carries the prefix of the first-class command. Therefore, in some embodiments, the aforementioned step 106 may not be executed, but after determining that the command to be sent belongs to the first-class command, the main part of the command to be sent is directly sent.

[0231] In some optional embodiments, the SoC may also, when command standby mode is enabled, choose whether to append the prefix of the first-category command to the end of the second-category command based on the specific usage of the electronic device. For example, for a display screen, when command standby mode is enabled, the SoC may determine, based on past operation logs, whether the currently running application requires refresh rate adjustment. Specifically, if the currently running application generally does not adjust its refresh rate during operation, such as a web browser, system desktop, or document reader, which generally do not adjust the screen refresh rate during operation, the SoC may not append the prefix of the first-category command to the end of the second-category command. If the currently running application frequently requires refresh rate adjustment during operation, the SoC may append the prefix of the first-category command to the end of each second-category command so that the display screen can promptly execute the switching schedule action when the screen refresh rate needs to be adjusted. For example, various video applications and large-scale games often require a higher screen refresh rate to enhance the user's visual experience. At the same time, when these applications are closed, the SoC also needs to reduce the increased refresh rate. Therefore, when running these applications, the SoC may append the prefix of the first-category command to the end of each second-category command.

[0232] In other optional embodiments, the SoC may also send the prefix of the first type of command alone when it does not need to send a command. For example, if the SoC does not send a command to the display screen for a certain period of time (e.g., 1 second), the SoC may send the prefix of the first type of command alone without appending the signature of the first type of command to the end of the second type of command when sending the second type of command.

[0233] In some electronic devices, SoC uses a command queue to send commands to the display screen. When SoC sends commands to the display screen through the command queue, the structure of the hardware layer and software layer of the electronic device used to execute the method of the present application can be seen in Figure 7 .

[0234] like Figure 7As shown, the electronic device includes a hardware layer and a software layer, wherein the hardware layer includes a CPU, a cache 710 and a display screen 720, and a command queue 711 is set in the cache 710. The software layer includes a system library, which is provided with a first judgment module 701, a type identification module 702, an addition module 703, a second judgment module 704, a communication module 705, and a communication interface 706. The cache 710 can be specifically Figure 1 A specific storage area within the internal memory of an electronic device, or may be Figure 2 DDR within the SoC shown.

[0235] When the CPU needs the display to perform specific actions, such as turning the display on and off, adjusting timing parameters, and performing electrostatic protection detection, it can generate corresponding commands, that is, Figure 7 Pending commands are shown.

[0236] After receiving the pending command, the first determination module 701 determines whether the command preparation mode of the electronic device is enabled. If so, the pending command is passed to the type identification module 702. If not, the pending command is written into the command queue in the cache.

[0237] After writing the to-be-sent command into the command queue, the first judgment module 701 also sends the to-be-sent command to the communication module. After receiving the to-be-sent command, the communication module can send the to-be-sent command to the DDIC.

[0238] Optionally, after writing the to-be-sent command into the command queue, the first determination module 701 may send notification information to the communication module, instructing the communication module to read the to-be-sent command written into the command queue, and then send the to-be-sent command to the DDIC.

[0239] After the type identification module 702 obtains the pending command, it identifies whether the pending command is a first-category command or a second-category command. If it is identified that the pending command is a first-category command, it passes the pending command to the second judgment module 704. If it is identified that the pending command is a second-category command, it passes the pending command to the adding module 703.

[0240] After writing the second type of command into the command queue, the type identification module 702 also sends the second type of command to the communication module. After receiving the second type of command, the communication module can send the second type of command to the DDIC.

[0241] Optionally, after writing the second type command into the command queue, the type identification module 702 may send notification information to the communication module, instructing the communication module to read the second type command written into the command queue, and then send the second type command to the DDIC.

[0242] After the adding module 703 obtains the pending command, it adds the prefix of the first category command to the end of the pending command, and then writes the pending command and the prefix of the first category command into the command queue. When writing the pending command and the prefix of the first category command, the adding module can first write the instructions contained in the pending command to the command queue one by one, and after the instructions contained in the pending command are written, the prefix of the first category command is written immediately. Taking the timing parameter adjustment command shown in Table 1 as an example, the adding module can write the instructions contained in the pending command to the command queue one by one, and then write the first instruction in Table 1.

[0243] After writing the second type of command into the command queue, the adding module 703 also sends the second type of command to the communication module. After receiving the second type of command, the communication module can send the second type of command to the DDIC.

[0244] Optionally, after writing the second type of command into the command queue, the adding module 703 may send notification information to the communication module, instructing the communication module to read the second type of command written into the command queue, and then send the second type of command to the DDIC.

[0245] After obtaining the pending command, the second determination module 704 determines whether the preamble of the pending command needs to be sent. If the preamble does not need to be sent, the second determination module extracts the body of the pending command to obtain the body of the pending command, and then writes the body of the pending command to the command queue. If the preamble needs to be sent, the second determination module writes the pending command to the command queue.

[0246] The second judgment module 704 can read the command previously stored in the command queue from the command queue, and judge whether the read command includes the prefix of the first category of commands. If the read command includes the prefix of the first category of commands, it is judged that the prefix of the to-be-sent command does not need to be sent; if the read command does not include the prefix of the first category of commands, it is judged that the prefix of the to-be-sent command needs to be sent.

[0247] After writing the first type of command into the command queue, the second determination module 704 also sends the first type of command to the communication module. After receiving the first type of command, the communication module can send the first type of command to the DDIC.

[0248] Optionally, after writing the first type of command into the command queue, the second determination module 704 may send notification information to the communication module, instructing the communication module to read the first type of command written into the command queue, and then send the first type of command to the DDIC.

[0249] The communication module 705 is used to establish a communication channel between the SoC and the DDIC, and then send commands from the SoC to the DDIC through the communication channel.

[0250] Optionally, the communication module may detect in real time whether there are new commands in the command queue according to a certain polling period.

[0251] The communication interface 706 may be the aforementioned MDP interface.

[0252] It should be noted that the command sending method provided in this application can be applied to the communication process between the SoC and the display screen. In addition, it can also be applied to the communication process between the SoC and other input / output modules of the electronic device. The input / output modules of the electronic device may include: Figure 1 The camera 153, sensor 140 (such as an optical fingerprint sensor), etc. are shown.

[0253] For any input / output module, developers can classify commands that implement a certain function as first-class commands among all commands used for communication between the SoC and the module, and commands that implement other functions as second-class commands. Generally, commands that require the highest timeliness of the implemented functions can be identified as first-class commands. For example, in the communication process between the SoC and the display, if the SoC cannot adjust the timing parameter command in time, the screen will experience problems such as screen distortion and flickering. Therefore, the function of adjusting the timing parameters has the highest timeliness requirement, and the timing parameter adjustment command is set as the first-class command of the display.

[0254] Please refer to Figure 8 , below, taking the interaction process between the SoC and the display screen as an example, a specific application scenario of the command sending method provided by this application is described. In this embodiment, the timing parameter adjustment command is a first-category command, and other commands except the timing parameter adjustment command belong to the second-category command.

[0255] like Figure 8 As shown, after the SoC and the display are both started, the SoC generates a wake-up command in response to the user's wake-up operation, and then executes step A1 to send the wake-up command to switch the display from the sleep state to the wake-up state, that is, to light up the display that is in the off state.

[0256] Before the SoC sends the wake-up command (writing it to the command queue), the display is in sleep mode and command preparation mode is disabled. The SoC sends the wake-up command without adding the preamble to the timing parameter adjustment command. Once the SoC wakes up the display, command preparation mode is enabled.

[0257] After the display is awakened, the SoC and the display may present images to the user at a default refresh rate. For example, the SoC and the display may present images to the user at a refresh rate of 60 Hz.

[0258] After the display is awakened, the SoC needs to press Figure 3 The method shown is to send data frames to the display screen at regular intervals so as to send the image data to be displayed to the display screen through the data frames. The SoC may generate or not generate commands to be sent to the display screen as needed. Therefore, each data frame may carry or not carry a command (or several instructions constituting a command).

[0259] Assume that at time T1, the SoC needs to perform an ESD protection test on the display screen. The SoC generates a test command. Before sending the test command, the SoC determines that command preparation mode is enabled and that the test command to be sent belongs to the second category. The SoC then executes step A2, appending the prefix of the timing parameter adjustment command to the end of the test command. The SoC then executes step A3, sending the test command with the prefix of the timing parameter adjustment command.

[0260] After receiving the above protection detection command and the preamble of the timing parameter adjustment command, the display first responds to the protection detection command, performs electrostatic protection detection, feeds back the detection results to the SoC, and then caches the preamble of the timing parameter adjustment command in the memory of the DDIC.

[0261] After sending the protection detection command, the SoC responds to the user's request to start the video application and launches it. To ensure a better user experience while watching videos, the SoC needs to increase the screen refresh rate, for example, from the default 60Hz to 90Hz. Therefore, the SoC generates an adjust timing parameter command. This adjust timing parameter command triggers the display to switch from timing parameters matching the 60Hz refresh rate to timing parameters matching the 90Hz refresh rate.

[0262] After receiving the timing parameter adjustment command, the SoC determines that the command preparation mode is enabled and that the previous command sent carried the prefix of the timing parameter adjustment command. Therefore, the SoC executes step A4 and sends the main body of the timing parameter adjustment command. The main body of the timing parameter adjustment command is used to indicate the timing parameters that match the 90Hz refresh rate among the multiple timing parameters stored in the display screen. Taking the timing parameter adjustment command shown in Table 1 as an example, in the above process, only the second instruction in Table 1 needs to be sent.

[0263] After receiving the main part of the timing parameter adjustment command, the display screen can use the prefix of the timing parameter adjustment command stored in the aforementioned memory and the main part of the timing parameter adjustment command received this time to combine into a complete timing parameter adjustment command, and then execute the action indicated by the timing parameter adjustment command, that is, switch the timing parameters, thereby switching the timing parameters used by the display screen from the timing parameters matching the refresh rate of 60Hz to the timing parameters matching the refresh rate of 90Hz.

[0264] from Figure 8 As can be seen from the application scenarios shown, the command sending method provided by this application mainly includes:

[0265] When the obtained command to be sent is a second-category command, the command to be sent and a preamble of the first-category command are sent to the input / output module.

[0266] When the obtained command to be sent is a first-category command, the main body of the first-category command is sent to the input / output module.

[0267] The first type of command has a higher priority than the second type of command. Command priorities can be pre-set during development. For a specific I / O module, commands that need to be sent and completed within a clock cycle during the interaction between the SoC and the I / O module can be set to high priority, while commands that do not need to be sent and completed within a clock cycle can be set to low priority.

[0268] For example, during the interaction between the SoC and the display screen, the command for adjusting the timing parameters needs to be sent and completed within one clock cycle, so the command for adjusting the timing parameters is set to a high priority. Other commands except the command for adjusting the timing parameters do not need to be sent and completed within one clock cycle, so other commands except the command for adjusting the timing parameters are set to a low priority.

[0269] An embodiment of the present application also provides a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the command sending method provided in any embodiment of the present application.

[0270] An embodiment of the present application also provides a computer program product, comprising a plurality of executable computer instructions. When the computer instructions of the product are executed, they are specifically used to implement the command sending method provided in any embodiment of the present application.

Claims

1. A method for sending a command, characterized in that: Applied to an electronic device, the electronic device includes a system-on-chip (SoC) and an input / output module, the method includes: In response to receiving a first operation input by a user, the SoC generates a first command and a preamble of a command for adjusting timing parameters, wherein the first command is used to perform the first operation; The SoC sends the first command and a preamble of a timing parameter adjustment command to the input / output module; In response to receiving a second operation input by a user, the SoC generates a main body of the timing parameter adjustment command; The SoC sends the main part of the timing parameter adjustment command to the input / output module.

2. The sending method according to claim 1, wherein: After the SoC generates the first command and the preamble of the timing parameter adjustment command, the SoC further includes: The SoC identifies a type of the first command; The SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module, including: After the SoC recognizes that the first command is a second-category command, the SoC sends the first command and a preamble of a timing parameter adjustment command to the input / output module; the second-category command includes commands other than the timing parameter adjustment command.

3. The sending method according to claim 2, wherein: Before the SoC identifies the type of the first command, the method further includes: The SoC determines whether the command preparation mode is in an enabled state; After the SoC determines that the command preparation mode is in a disabled state, the SoC sends the first command to the input / output module; The SoC identifies a type of the first command, including: After the SoC determines that the command preparation mode is enabled, the SoC identifies the type of the first command.

4. The sending method according to claim 3, wherein: The SoC determines whether the command preparation mode is enabled, including: The SoC determines whether the input / output module is in a dormant state; If the input / output module is in a dormant state, the SoC determines that the command preparation mode is in a disabled state; If the input / output module is in a non-sleep state, the SoC determines that the command preparation mode is in an enabled state.

5. The sending method according to claim 3, wherein: The SoC determines whether the command preparation mode is enabled, including: The SoC determines whether the energy consumption mode of the electronic device is an energy-saving mode; If the energy consumption mode of the electronic device is the energy-saving mode, the SoC determines that the command preparation mode is in a disabled state; If the energy consumption mode of the electronic device is a non-energy-saving mode, the SoC determines that the command preparation mode is in an enabled state.

6. The sending method according to any one of claims 1 to 5, characterized in that: The SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module, including: The SoC sends the first command to the input / output module; The SoC sends a preamble of the timing parameter adjustment command to the input / output module.

7. The sending method according to any one of claims 1 to 5, characterized in that: The SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module, including: The SoC adds a prefix of the timing parameter adjustment command to the end of the first command to obtain a first command carrying the prefix of the timing parameter adjustment command; The SoC sends the first command carrying the prefix portion of the timing parameter adjustment command to the input / output module.

8. The sending method according to any one of claims 1 to 5, characterized in that: Before the SoC sends the main part of the timing parameter adjustment command to the input / output module, the method further includes: The SoC determines whether it is necessary to send the preamble of the timing parameter adjustment command; After the SoC determines that the preamble of the timing parameter adjustment command needs to be sent, the SoC sends the timing parameter adjustment command to the input / output module; The SoC sends the main part of the timing parameter adjustment command to the input / output module, including: After the SoC determines that it is not necessary to send the preamble of the timing parameter adjustment command, the SoC sends the body of the timing parameter adjustment command to the input / output module.

9. The sending method according to claim 2, wherein: The SoC includes a type identification module; The SoC identifies a type of the first command, including: The type identification module identifies a type of the first command.

10. The sending method according to claim 9, characterized in that: The SoC includes an adding module, a communication module and a communication interface; After the SoC recognizes that the first command is a command of the second type, the SoC sends the first command and a preamble of a timing parameter adjustment command to the input / output module, including: After the type identification module identifies that the first command is a command of the second type, the type identification module sends the first command to the adding module; In response to receiving the first command, the adding module adds a prefix of the timing parameter adjustment command to the end of the first command to obtain a first command carrying the prefix of the timing parameter adjustment command; The adding module sends the first command carrying the prefix of the timing parameter adjustment command to the communication module; In response to receiving the first command carrying the prefix portion of the timing parameter adjustment command, the communication module sends the first command carrying the prefix portion of the timing parameter adjustment command to the input / output module through the communication interface.

11. The sending method according to claim 10, wherein: The SoC includes a second judgment module; The SoC sends the main part of the timing parameter adjustment command to the input / output module, including: In response to receiving the timing parameter adjustment command, the second judgment module judges whether it is necessary to send a preamble of the timing parameter adjustment command; After the second judgment module determines that it is not necessary to send the preamble of the timing parameter adjustment command, the second judgment module sends the body of the timing parameter adjustment command to the communication module; In response to receiving the main portion of the adjust timing parameter command, the communication module sends the main portion of the adjust timing parameter command to the input / output module through the communication interface.

12. The sending method according to claim 11, characterized in that: The SoC includes a cache, and a command queue is provided in the cache; The second judgment module judges whether it is necessary to send the preamble of the timing parameter adjustment command, including: The second judgment module reads the command stored in the command queue and sent to the input / output module; The second judgment module judges whether the read command includes the prefix of the timing parameter adjustment command; If the read command includes the prefix of the timing parameter adjustment command, the second judgment module determines that it is not necessary to send the prefix of the timing parameter adjustment command; If the read command does not include the prefix of the timing parameter adjustment command, the second determination module determines that the prefix of the timing parameter adjustment command needs to be sent.

13. The sending method according to claim 9, wherein: The SoC includes a first judgment module; Before the type identification module identifies the type of the first command, the method further includes: The first judgment module obtains the first command; The first determination module determines whether the command preparation mode is enabled; After the first determination module determines that the command preparation mode is in the enabled state, the first determination module sends the first command to the type identification module.

14. The sending method according to claim 13, wherein: The SoC includes a communication module and a communication interface. After the first determination module determines whether the command preparation mode is enabled, the SoC further includes: After the first determination module determines that the command preparation mode is in a disabled state, the first determination module sends the first command to the communication module; In response to receiving the first command, the communication module sends the first command to the input / output module through the communication interface.

15. The sending method according to any one of claims 1 to 5, characterized in that: The first command includes a screen-on command for lighting up the display screen; the prefix of the timing parameter adjustment command is the first instruction, and the main body of the timing parameter adjustment command is the second instruction; The display screen includes a display screen integrated chip DDIC; the DDIC includes a memory and a plurality of register groups; each of the register groups includes a plurality of registers; and the memory stores a plurality of sets of timing parameters.

16. The sending method according to claim 15, characterized in that: After the SoC sends the first command and the preamble of the timing parameter adjustment command to the input / output module, the method further includes: After receiving the first instruction, the DDIC searches for a target register group in the plurality of register groups; the target register group is a register group corresponding to the register group identifier carried by the first instruction; After the SoC sends the main part of the timing parameter adjustment command to the input / output module, the method further includes: After receiving the second instruction, the DDIC searches for the target register in the plurality of registers in the target register group; the target register is the register in the target register group corresponding to the register address carried by the second instruction; The DDIC writes the identifier carried by the second instruction into the target register; The DDIC reads the timing parameter corresponding to the identifier stored in the target register from the memory; The DDIC adjusts the refresh rate of the display screen according to the read timing parameters.

17. The sending method according to any one of claims 1 to 5, characterized in that: The first operation includes an operation of lighting up the screen or an operation of turning off the screen.

18. The sending method according to any one of claims 1 to 5, characterized in that: The second operation includes an operation of opening a game application or an operation of sliding a list.

19. An electronic device, characterized in that: The electronic device includes a system-on-chip (SoC), a memory, and an input / output module; The memory is used to store one or more programs; The SoC is configured to execute the one or more programs to perform the following actions: In response to receiving a first operation input by a user, the SoC generates a first command and a preamble of a command for adjusting timing parameters, wherein the first command is used to perform the first operation; The SoC sends the first command and a preamble of a timing parameter adjustment command to the input / output module; In response to receiving a second operation input by a user, the SoC generates a main body of the timing parameter adjustment command; The SoC sends the main part of the timing parameter adjustment command to the input / output module.

20. A computer storage medium, characterized in that Used to store a computer program, which, when executed, is specifically used to implement the command sending method according to any one of claims 1 to 18.

Citation Information

Patent Citations

  • Display timing parameter adaptive adjusting method for display control device

    CN101025882A

  • Method and device for executing program of SPI interface memory

    CN101819560A

Cited By

  • Command sending method, storage medium, and device

    WO2023000776A1