Time sequence adjustment method and apparatus, computer-readable storage medium and electronic device

By using the Kalman filtering algorithm to estimate and adjust the clock cycle on the DP receiver, the problem of image data distortion at the DP receiver is solved, and the accurate recovery and normal output of image data are achieved.

WO2025091584A1PCT designated stage expired Publication Date: 2025-05-08ANALOGIX (SHANGHAI) SEMICONDUCTOR CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/133020
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-02
Filing Date
2023-11-21
Publication Date
2025-05-08

AI Technical Summary

Technical Problem

The image data recovered by the DP receiver is distorted or cannot be output normally, mainly due to the mismatch between the clock frequency of the DP transmitter and the receiver.

Method used

The Kalman filtering algorithm is used to process the first row period of the receiver, estimate the second row period that matches the transmitter, and adjust the output clock according to the period.

Benefits of technology

By adjusting the output clock, its frequency is basically matched with the source clock frequency, ensuring that the restored image data is basically consistent with the original data, and avoiding distortion and output problems of the image data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023133020_08052025_PF_FP_ABST
    Figure CN2023133020_08052025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are a time sequence adjustment method and apparatus, a computer-readable storage medium and an electronic device. The time sequence adjustment method comprises: when a data stream output by a transmitting end of a display port is received, determining a first line cycle according to the data stream, the first line cycle being a line cycle of the data stream under an output clock, and the output clock being a clock domain of a receiving end of the display port; at least using a Kalman filtering algorithm to process the first line cycle to obtain a second line cycle, the second line cycle being a line cycle of the data stream under a source clock, and the source clock being a clock domain of the transmitting end; and, according to the second line cycle, adjusting the output clock. The present disclosure solves the problem that in the prior art, image data recovered by DP receiving ends is distorted or even cannot be normally output.
Need to check novelty before this filing date? Find Prior Art

Description

Timing adjustment method, device, computer-readable storage medium, and electronic device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This disclosure claims priority to the Chinese patent application filed with the China Patent Office on November 2, 2023, with application number 202311453271.8 and application name “Timing Adjustment Method, Device, Computer-Readable Storage Medium and Electronic Device”, the entire contents of which are incorporated by reference in this disclosure. Technical Field

[0003] The present disclosure relates to the technical field of data transmission, and in particular to a timing adjustment method, device, computer-readable storage medium, and electronic device. Background Art

[0004] In the DP (Display Port) protocol, transmission timing information on the Main Link is generated based on the image data content. On the DP transmitter, the image data resolution and refresh rate are fixed. A stable pixel clock corresponds to a stable line length, resulting in a fixed line length for each line of image data. However, due to clock domain variations, when restoring image timing on the DP receiver, line lengths may increase or decrease, making it impossible to maintain consistent resolution across each line. This can lead to image distortion or incorrect output when converting downstream images.

[0005] Summary of the Invention

[0006] The main purpose of the present disclosure is to provide a timing adjustment method, device, computer-readable storage medium and electronic device to at least solve the problem in the prior art that the image data restored by the DP receiving end is distorted or even cannot be output normally.

[0007] In order to achieve the above-mentioned purpose, according to one aspect of the present disclosure, a timing adjustment method is provided, including: when receiving a data stream output by a transmitting end of a display interface, determining a first line period according to the data stream, the first line period being the line period of the data stream under an output clock, and the output clock being the clock domain of the receiving end of the display interface; processing the first line period using at least a Kalman filtering algorithm to obtain a second line period, the second line period being the line period of the data stream under a source clock, and the source clock being the clock domain of the transmitting end; and adjusting the output clock according to the second line period.

[0008] Optionally, determining the first line period based on the data stream includes: restoring the data stream to obtain image data and the output clock; extracting two adjacent identical blanking identifiers from the image data, the blanking identifiers including at least one of a blanking start identifier and a blanking end identifier; and determining that the clock period of the two adjacent identical blanking identifiers under the output clock is the first line period.

[0009] Optionally, the transmitting end outputs the data stream through at least one link, one link corresponds to at least one first FIFO queue and at least one second FIFO queue, and uses at least a Kalman filter algorithm to process the first row cycle to obtain a second row cycle, including: writing the first row cycle into the first FIFO queue corresponding to the link according to the link corresponding to the first row cycle; when the first FIFO queue is not empty, reading the first row cycle from the first FIFO queue, and inputting the first row cycle into the Kalman filter, so that the Kalman filter outputs a second initial row cycle, the second initial row cycle consisting of the second row cycle and multiple decimal data; writing the second initial row cycle into the corresponding second FIFO queue; reading the second initial row cycle from the second FIFO queue, and inputting the second initial row cycle into the Kalman filter for iterative calculation; truncating part of the decimal data of the second initial row cycle and performing superposition processing on the truncated decimal data, generating and sending the second row cycle based on the truncated second initial row cycle and the accumulated error obtained by the superposition processing.

[0010] Optionally, the first line cycle is input into the Kalman filter so that the Kalman filter outputs a second initial line cycle, including: inputting the first line cycle into the Kalman filter so that the Kalman filter predicts the system state based on the first line cycle to obtain the second initial line cycle, the system state is the clock cycle of two adjacent identical blanking identifiers in the data stream under the source clock, and the blanking identifier includes at least one of a blanking start identifier and a blanking end identifier.

[0011] Optionally, writing the first row cycle into the first FIFO queue corresponding to the link includes: when a first interrupt is triggered, writing the first row cycle into the first FIFO queue corresponding to the link, and ending the first interrupt, the first interrupt carries an interrupt number generated according to the link and the data flow number, reading the second initial row cycle from the second FIFO queue includes: when a second interrupt is triggered, reading the second row cycle from the second FIFO queue according to a predetermined algorithm, and ending the second interrupt, the predetermined algorithm includes one of the following: a round-robin scheduling algorithm, a priority scheduling algorithm, and the second interrupt carries the interrupt number.

[0012] Optionally, the source clock is a row clock or a pixel clock. When the source clock is the row clock, after the first row period is processed by the Kalman filter algorithm to obtain the second row period, the method further includes: performing clock domain conversion on the second row period to obtain the row period of the first row period under the pixel clock. When the source clock is the pixel clock, before the first row period is processed by the Kalman filter algorithm to obtain the second row period, the method further includes: performing clock domain conversion on the first row period to obtain the row period of the first row period under the pixel clock.

[0013] Optionally, the output clock is adjusted according to the second row period, including: calculating a division ratio according to the second row period and a reference clock period in a phase-locked loop; and controlling the phase-locked loop to generate a corresponding adjustment clock signal according to the division ratio to recover at least one of the following: the phase of the output clock and the frequency of the output clock.

[0014] According to another aspect of the present disclosure, a timing adjustment device is provided, including: a determination unit, configured to, upon receiving a data stream output by a transmitting end of a display interface, determine a first line period based on the data stream, the first line period being the line period of the data stream under an output clock, the output clock being the clock domain of the receiving end of the display interface; a processing unit, configured to process the first line period using at least a Kalman filtering algorithm to obtain a second line period, the second line period being the line period of the data stream under a source clock, the source clock being the clock domain of the transmitting end; and an adjustment unit, configured to adjust the output clock according to the second line period.

[0015] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.

[0016] According to another aspect of the present disclosure, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include being configured to execute any one of the methods described.

[0017] By applying the technical solution disclosed in the present invention, based on the first row period, at least the Kalman filtering algorithm is used to predict and estimate the second row period, so as to obtain a second row period that stably reflects the pixel row length of the transmitting end, and then the estimated second row period is used to adjust the output clock, thereby ensuring that the adjusted output clock frequency is basically matched with the source clock frequency, thereby ensuring that the image data recovered according to the adjusted output clock is basically consistent with the original data, avoiding the problem of distortion of the recovered image data or even failure to output normally. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which constitute part of the present disclosure, are intended to provide a further understanding of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are intended to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the accompanying drawings:

[0019] FIG1 shows a hardware structure block diagram of a mobile terminal for executing a timing adjustment method provided in an embodiment of the present disclosure;

[0020] FIG2 shows a flow chart of a timing adjustment method according to an embodiment of the present disclosure;

[0021] FIG3 shows a schematic diagram of a Kalman filter software and hardware implementation structure according to an embodiment of the present disclosure;

[0022] FIG4 shows a schematic diagram of a Kalman filter algorithm flow according to an embodiment of the present disclosure;

[0023] FIG5 shows a workflow diagram of a first FIFO queue provided according to an embodiment of the present disclosure;

[0024] FIG6 shows a flowchart of a second FIFO queue according to an embodiment of the present disclosure;

[0025] FIG7 shows a schematic diagram of timing adjustment at a receiving end according to an embodiment of the present disclosure;

[0026] FIG8 shows another schematic diagram of timing adjustment at a receiving end according to an embodiment of the present disclosure;

[0027] FIG9 shows a schematic diagram of a timing adjustment process according to an embodiment of the present disclosure;

[0028] FIG10 shows a structural block diagram of a timing adjustment device provided according to an embodiment of the present disclosure.

[0029] The figures include the following reference numerals: 102, processor; 104, memory; 106, transmission device; 108, input and output device. DETAILED DESCRIPTION

[0030] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0031] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.

[0032] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate for the embodiments of the present disclosure described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes, methods, products, or apparatus.

[0033] As introduced in the background technology, there is a problem in the prior art that the image data recovered by the DP receiving end is distorted or even cannot be output normally due to the mismatch in clock frequency between the DP sending end and the DP receiving end. In order to solve the above technical problem, the embodiments of the present disclosure provide a timing adjustment method, device, computer-readable storage medium and electronic device.

[0034] The technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present disclosure.

[0035] The method embodiments provided in the embodiments of the present disclosure can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal of a timing adjustment method of an embodiment of the present disclosure. As shown in Figure 1, the mobile terminal may include one or more (only one is shown in Figure 1) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that the structure shown in Figure 1 is only for illustration and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than those shown in Figure 1, or have a configuration different from that shown in Figure 1.

[0036] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the timing adjustment method in the embodiment of the present disclosure. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the method described. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. The transmission device 106 is used to receive or send data via a network. A specific example of the network may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0037] In this embodiment, a timing adjustment method running on a mobile terminal, a computer terminal, a processor or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0038] FIG2 is a flow chart of a timing adjustment method according to an embodiment of the present disclosure. As shown in FIG2 , the method includes the following steps:

[0039] Step S201: upon receiving a data stream output by a transmitting end of a display interface, determining a first line period according to the data stream, where the first line period is a line period of the data stream under an output clock, and the output clock is a clock domain of a receiving end of the display interface;

[0040] Specifically, the line period is the time required to scan a row of pixels, or the number of pixels in a row, also known as the line length. Driven by the output clock, the receiving end samples the received signal and recovers a pixel clock that matches the transmitting end's clock, thereby recovering accurate data. Generally, the receiving end samples the received signal on the rising or falling edge of the output clock. The clock domain of the receiving end is generally the link clock.

[0041] Step S202: Process the first row period using at least a Kalman filter algorithm to obtain a second row period, where the second row period is a row period of the data stream under a source clock, where the source clock is a clock domain of the transmitting end.

[0042] Specifically, the clock domain of the source clock is generally a main link (Main Link) domain.

[0043] Step S203: adjusting the output clock according to the second row period.

[0044] Through the described embodiment, first, based on the data stream sent by the transmitting end of the display interface, the first line period of the data stream under the output clock is determined; then, at least a Kalman filter algorithm is used to process the first line period to obtain a second line period of the data stream under the source clock; finally, the output clock is adjusted based on the obtained second line period. Compared with the problem in the prior art that the image data recovered by the DP receiving end is distorted or even cannot be output normally due to the mismatch in the clock frequency of the DP transmitting end and the DP receiving end, the present disclosure predicts and estimates the second line period based on the first line period using at least a Kalman filter algorithm to obtain a second line period that stably reflects the pixel row length of the transmitting end, and then adjusts the output clock using the estimated second line period, ensuring that the adjusted output clock frequency is substantially matched with the source clock frequency, thereby ensuring that the image data recovered based on the adjusted output clock is substantially consistent with the original data, avoiding the problem that the recovered image data is distorted or even cannot be output normally.

[0045] In an optional solution, determining the first line period based on the data stream includes: recovering the data stream to obtain image data and the output clock; extracting two adjacent identical blanking identifiers from the image data, the blanking identifiers including at least one of a blanking start (Blanking Start, abbreviated as BS) identifier and a blanking end (Blanking End, abbreviated as BE) identifier; and determining that the clock period of the two adjacent identical blanking identifiers under the output clock is the first line period.

[0046] In the embodiment, the received data stream is first restored to obtain image data including a blanking marker and an output clock, and then the number of clock cycles of two adjacent blanking start markers or two adjacent blanking end markers under the output clock is used to measure the line length of the image data to obtain the first line period. This can more accurately obtain the first line period corresponding to the data stream, providing more accurate data support for the subsequent estimation of the second line period.

[0047] Specifically, the image data generally includes a BS flag, a field blanking flag, a timer value, a virtual display, a BE flag, pixel data, a filling start flag, filling data, and a filling end flag.

[0048] In an exemplary embodiment, at least the Kalman filter algorithm is used to process the first line period to obtain the second line period, including: using the Kalman filter algorithm to process the first line period to obtain a system state representing the clock period of two adjacent identical blanking identifiers in the data stream under the source clock, and the system state is the second line period.

[0049] Of course, in addition to the embodiments, those skilled in the art may also use other methods to implement the determination of the second row period. In the present disclosure, the transmitting end outputs the data stream through at least one link. That is, the transmitting end adopts a single-stream transport mode (SST) or a multi-stream transport mode (MST) to transmit the data stream. One link corresponds to at least one first FIFO queue and at least one second FIFO queue. As shown in Figures 3 and 4, step S202: using at least a Kalman filter algorithm to process the first row period to obtain the second row period includes the following specific steps:

[0050] Step S2021: According to the link corresponding to the first row period, write the first row period into the first FIFO queue corresponding to the link;

[0051] Specifically, the link corresponding to the first row period is a link for transmitting the data stream of the first row period.The first FIFO queue and the second FIFO queue can be hardware-designed FIFOs or software-designed FIFOs.

[0052] Step S2022: If the first FIFO queue is not empty, read the first line period from the first FIFO queue, and input the first line period into a Kalman filter, so that the Kalman filter outputs a second initial line period, where the second initial line period is composed of the second line period and a plurality of fractional data.

[0053] Specifically, the Kalman filter is used to execute a Kalman filter algorithm, and may be a hardware-designed device or a software-designed device. The second initial row period is an original period value of the data stream under a source clock estimated using the Kalman filter algorithm. The second initial row period is a decimal. The decimal data is a decimal data value of the second initial row period.

[0054] Step S2023: writing the second initial row period into the corresponding second FIFO queue;

[0055] Step S2024: reading the second initial row period from the second FIFO queue, and inputting the second initial row period into the Kalman filter for iterative calculation;

[0056] Specifically, the Kalman filter algorithm uses the system state at the previous moment and the measurement value at the current moment to obtain the optimal estimate of the system state of the dynamic system at the current moment. Therefore, after obtaining the second initial row period, the second initial row period needs to be fed back to the input end of the Kalman filter.

[0057] Step S2025: truncate part of the fractional data of the second initial line period and perform superposition processing on the truncated fractional data, generate the second line period according to the truncated second initial line period and the accumulated error obtained by the superposition processing, and send it out.

[0058] Specifically, since the Kalman filter algorithm is a cyclic iterative algorithm, the Kalman filter algorithm performs truncation every time it obtains the second row period, and correspondingly obtains a truncated decimal data. The accumulated error is obtained by superimposing these truncated decimal data.

[0059] In the embodiment, the first row period is dynamically filtered by the Kalman filter algorithm, which can further ensure that a second row period that stably reflects the pixel row length of the transmitting end is obtained, further realize the timing adjustment of the receiving end, and thus further ensure that the image data recovered by the receiving end is relatively accurate and reliable. In addition, since the Kalman filter algorithm is an iterative algorithm, it requires the system state calculated at the previous moment and the measurement value at the current moment to calculate the system state at the current moment. The present disclosure can balance the difference between the measurement value interval and the system state interval by setting a two-level FIFO queue, making the two basically the same, further facilitating the execution of the Kalman filter algorithm. In addition, the present disclosure allocates a first FIFO queue and a second FIFO queue to the transmission link of each data stream, so that multiple transmission links share the Kalman filter computing resources, realizes the time-sharing execution of the data stream iterative calculation of each link, and can obtain the second row period corresponding to each link, avoiding the problem of designing separate computing resources for each link and causing resource waste.

[0060] Of course, by setting the first FIFO queue and the second FIFO queue, it is also possible to prevent the loss of multi-link data during the input and output process, avoid frequent bus operations, and reduce the burden on the processor.

[0061] To further ensure flexibility in timing adjustment, in one optional method, the Kalman filter is a device that implements a Kalman filter algorithm, and the first FIFO queue and the second FIFO queue are implemented in software. Compared to a pure hardware implementation, the present disclosure utilizes a combination of software and hardware to provide the ability to programmatically modify and update the dynamic filtering algorithm later.

[0062] In addition, the second line period is generated and issued based on the truncated second initial line period and the cumulative error obtained by the superposition processing. Specifically, when the cumulative error is greater than a threshold, the truncated second initial line period is corrected according to the cumulative error to obtain the second line period; when the cumulative error is not greater than the threshold, the truncated second initial line period is directly output as the second line period.

[0063] Furthermore, the second initial line period after truncation is corrected according to the accumulated error to obtain the second line period, including: adding the second initial line period after truncation to an average value of the accumulated error to obtain the second line period.

[0064] It should be noted that step S2025 can be implemented by software, by hardware, or by a combination of software and hardware. In the embodiment that needs to be implemented by hardware, the number of digits of the truncated decimal data is specifically determined according to the number of decimal digits that can be stored by the hardware generation logic itself, that is, according to the number of decimal digits that can be stored by the hardware generation logic, the number of decimal digits that exceeds the number of decimal digits of the hardware generation logic is truncated, and the error accumulation method is used for superposition processing, and each iteration outputs the decimal part that matches the hardware generation logic. The truncation process can be implemented by hardware, and the accumulation process of the decimal part can be implemented by software, so as to achieve the purpose of hardware and software coordination.

[0065] According to other embodiments of the present disclosure, the first line period is input into a Kalman filter so that the Kalman filter outputs a second initial line period, including: inputting the first line period into the Kalman filter so that the Kalman filter predicts the system state based on the first line period to obtain the second initial line period, the system state being the clock period of two adjacent identical blanking identifiers in the data stream under the source clock, the blanking identifier including at least one of a blanking start identifier and a blanking end identifier. The present disclosure defines the system state and the measurement value on both sides of the transmitting end and the receiving end of the display interface, respectively, and uses dynamic filtering to estimate the system state representing the line period of the transmitting end from the measurement value representing the line period of the receiving end, thereby further achieving a system state output that stably reflects the line period of the transmitting end.

[0066] Specifically, the specific process of constructing the Kalman filter and using the Kalman filter to perform dynamic filtering can be as follows:

[0067] Define the initial state at time T0: Z = Z[0], X = X[0], H = h0, P = P[0], R = r0, Q = q0. The initial value Z[0] of the measurement value Z represents the measurement value at time T0. For example, the number of line clock cycles between two adjacent BEs, the number of line clock cycles between two adjacent BSs, the number of pixel clock cycles between two adjacent BEs, and the number of pixel clock cycles between two adjacent BSs. Select the initial state X[0] of the system state X. Here, you can choose the observed value of the system state, such as the observed value of the system state at time T0, or other valid estimates of the system state. Select the observation coefficient H, which is the ratio between the measured value and the system state, as a constant h0. From a measurement perspective, the measured value can have a certain linear proportional relationship with the system state. The accumulated line cycles of multiple pixel rows over a period of time can be used as the measurement value for calculation. For example, the system state calculated by observing the BS interval for five line cycles is one-fifth of the measured value. Select the initial states q0 and r0 for the error coefficients Q and R. The error coefficients modify the Kalman filter calculation process, allowing users to adjust it based on the actual system. They can remain unchanged after the initial state selection. Select the intermediate value P of the calculation process and the initial value P[0]. For example, state 0 is generally selected.

[0068] As shown in Figure 4, the calculation is performed iteratively, with calculations performed at each iteration time k. The result is the system state X at iteration time k. The iteration interval is the measurement interval. The calculation process is as follows: X[k] = X[k-1]; P[k] = P[k-1] + q0; temp = (P[k] × h0 / (P[k] × h0 × h0 + r0)); X[k] = X[k] + temp × (Z[k] - h0 × X[k]); P[k] = (1 - temp × h0) × P[k].

[0069] Step S2021 of the present disclosure: Writing the first row cycle to the first FIFO queue corresponding to the link, specifically includes: upon triggering a first interrupt, writing the first row cycle to the first FIFO queue corresponding to the link and ending the first interrupt, the first interrupt carrying an interrupt number generated based on the numbers of the link and the data stream. The interrupt number is used to identify the link and data stream corresponding to the first row cycle and is a unique number for the first row cycle. Step S2024 of the present disclosure: Reading the second initial row cycle from the second FIFO queue, specifically includes: upon triggering a second interrupt, reading the second row cycle from the second FIFO queue according to a predetermined algorithm, and ending the second interrupt, the predetermined algorithm including one of the following: a round-robin scheduling algorithm or a priority scheduling algorithm, the second interrupt carrying the interrupt number. The present disclosure combines FIFO queues and interrupts to meet real-time processing requirements and further improve timing adjustment efficiency. Furthermore, by using round-robin scheduling or priority scheduling methods to read the second row cycle from the second FIFO queue, the iterations of the parallel loop can be distributed to multiple threads, further accelerating the timing adjustment progress of each link.

[0070] In addition, the specific implementation method of step S2022: reading the first row cycle from the first FIFO queue is the same as the implementation method of step S2024, and the specific implementation method of step S2023: writing the second initial row cycle into the corresponding second FIFO queue is the same as the specific implementation method of step S2021, and will not be repeated here.

[0071] In a specific embodiment, as shown in FIG5 , upon obtaining the first line cycle of the nth link, a first interrupt corresponding to the nth link is triggered; a measurement value count is performed; the first line cycle corresponding to the nth link is read and written to the first FIFO queue; and the first interrupt corresponding to the nth link is terminated. As shown in FIG6 , upon writing the system status of the nth link into the second FIFO, a second interrupt corresponding to the nth link is triggered; a system status value count is performed; the system status is read from the second FIFO, and the generation logic for the second line cycle is updated based on the system status, i.e., the output of the second line cycle is updated; and the second interrupt corresponding to the nth link is terminated.

[0072] In actual application, the source clock is a row clock or a pixel clock, that is, the system state of the Kalman filter can be the clock cycle of the same two adjacent blanking mark intervals under the clock domain of the row clock of the transmitting end, or it can be the clock cycle of the same two adjacent blanking mark intervals under the clock domain of the pixel clock of the transmitting end. In order to further achieve accurate adjustment of the clock timing of the output end corresponding to the above two situations, in some optional embodiments of the present disclosure, when the source clock is the row clock, after using the Kalman filter algorithm to process the first row cycle to obtain the second row cycle, the method further includes: performing clock domain conversion on the second row cycle to obtain the row cycle of the first row cycle under the pixel clock. When the source clock is the pixel clock, before using the Kalman filter algorithm to process the first row cycle to obtain the second row cycle, the method further includes: performing clock domain conversion on the first row cycle to obtain the row cycle of the first row cycle under the pixel clock.

[0073] That is, as shown in Figure 7, when the system state is the clock period in the clock domain of the transmitter's line clock, the measured value input to the Kalman filter on the receiver side is the clock period of the image data in the clock domain of the line clock. The Kalman filter output is still the clock period estimated in the clock domain of the line clock, which is then converted to the clock period in the clock domain of the pixel clock after cross-clock domain conversion. As shown in Figure 8, when the system state is the clock period in the clock domain of the transmitter's pixel clock, the measured value input to the Kalman filter on the receiver side is the clock period of the image data in the clock domain of the pixel clock, obtained after clock conversion from the clock domain of the line clock. The Kalman filter output is the clock period estimated in the clock domain of the pixel clock.

[0074] To further address the problem of distorted or even inoperable image data recovered by the DP receiving end due to clock frequency mismatch between the DP transmitting end and the DP receiving end, the output clock is optionally adjusted based on the second line period, including: calculating a frequency division ratio based on the second line period and a reference clock period in a phase-locked loop (PLL); and controlling the phase-locked loop (PLL) to generate a corresponding adjustment clock signal based on the frequency division ratio to recover at least one of the following: the phase of the output clock and the frequency of the output clock. By calculating a fractional frequency division ratio between the second line period and the reference clock period in the phase-locked loop, and then controlling the PLL to generate the adjustment clock signal for image data recovery based on the fractional frequency division ratio, the resolution of the recovered image data is further ensured to be substantially consistent with that of the transmitting end, further ensuring the accuracy and reliability of the recovered image data.

[0075] This embodiment relates to a specific timing adjustment method, as shown in FIG9 , including the following steps:

[0076] Step S1: After receiving the data stream from the main link at the transmitting end, recover the clock cycles of two adjacent identical blanking marks observed on the main link to obtain the first line period;

[0077] Step S2: triggering the Kalman filter circuit to perform dynamic filtering calculation on the first line period to obtain two adjacent clock periods of the same blanking mark according to the transmitter standard as the second line period;

[0078] Step S3: According to the second row period, combined with the reference clock period in the PLL, the frequency adjustment circuit is controlled to perform frequency adjustment calculations and output a dynamically changing frequency control fractional division ratio;

[0079] Step S4: Based on the fractional frequency division ratio, the PLL is controlled to generate an adjustment clock signal corresponding to the image pixel, which is used for image data recovery and fed back to the frequency adjustment circuit for dynamic adjustment reference.

[0080] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0081] The embodiments of the present disclosure also provide a timing adjustment device. It should be noted that the timing adjustment device of the embodiments of the present disclosure can be used to execute the timing adjustment method provided by the embodiments of the present disclosure. The device is used to implement the embodiments and preferred implementation methods, and the details that have been explained will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and conceivable.

[0082] The following introduces the timing adjustment device provided by the embodiment of the present disclosure.

[0083] FIG10 is a schematic diagram of a timing adjustment device according to an embodiment of the present disclosure. As shown in FIG10 , the device includes:

[0084] The determining unit 10 is configured to, upon receiving a data stream output by a transmitting end of a display interface, determine a first line period based on the data stream, where the first line period is a line period of the data stream under an output clock, where the output clock is a clock domain of a receiving end of the display interface;

[0085] Specifically, the line period is the time required to scan a row of pixels, or the number of pixels in a row, also known as the line length. Driven by the output clock, the receiving end samples the received signal and recovers a pixel clock that matches the transmitting end's clock, thereby recovering accurate data. Generally, the receiving end samples the received signal on the rising or falling edge of the output clock. The receiving end's clock domain is typically the line clock.

[0086] The processing unit 20 is configured to process the first row period using at least a Kalman filter algorithm to obtain a second row period, where the second row period is a row period of the data stream under a source clock, where the source clock is a clock domain of the transmitting end;

[0087] The adjustment unit 30 is configured to adjust the output clock according to the second row period.

[0088] According to the embodiment, a determination unit determines a first line period of the data stream under the output clock based on the data stream sent by the transmitting end of the display interface; a processing unit processes the first line period using at least a Kalman filter algorithm to obtain a second line period of the data stream under the source clock; and an adjustment unit adjusts the output clock based on the obtained second line period. Compared to the prior art problem of image data recovered by the DP receiving end being distorted or even unable to be output normally due to clock frequency mismatch between the DP transmitting end and the DP receiving end, the present disclosure predicts and estimates the second line period based on the first line period using at least a Kalman filter algorithm to obtain a second line period that stably reflects the pixel row length of the transmitting end. The output clock is then adjusted using the estimated second line period, ensuring that the adjusted output clock frequency substantially matches the source clock frequency, thereby ensuring that the image data recovered based on the adjusted output clock is substantially consistent with the original data, thereby avoiding the problem of the recovered image data being distorted or even unable to be output normally.

[0089] In an optional scheme, the determination unit includes: a recovery module, configured to recover the data stream to obtain image data and the output clock; an extraction module, configured to extract two adjacent identical blanking identifiers from the image data, the blanking identifiers including at least one of a blanking start identifier and a blanking end identifier; a determination module, configured to determine that the clock period of the two adjacent identical blanking identifiers under the output clock is the first line period.

[0090] In the embodiment, the received data stream is recovered to obtain image data including a blanking marker and an output clock. The number of clock cycles of two adjacent blanking start markers or two adjacent blanking end markers under the output clock is used to measure the line length of the image data to obtain the first line period. The first line period corresponding to the data stream can be obtained more accurately, providing more accurate data support for the subsequent estimation of the second line period.

[0091] Specifically, the image data generally includes a BS flag, a field blanking flag, a timer value, a virtual display, a BE flag, pixel data, a filling start flag, filling data, and a filling end flag.

[0092] In an exemplary embodiment, the processing unit includes: a processing module configured to use a Kalman filtering algorithm to process the first row period to obtain a system state representing the clock period of two adjacent identical blanking identifiers in the data stream under the source clock, and the system state is the second row period.

[0093] Of course, in addition to the embodiments described above, those skilled in the art may also implement determination of the second row period in other ways. In the present disclosure, the transmitting end outputs the data stream through at least one link. That is, the transmitting end transmits the data stream in a single-stream transmission mode or a multi-stream transmission mode. One of the links corresponds to at least one first FIFO queue and at least one second FIFO queue. The processing unit includes:

[0094] a first writing module configured to write the first row period into the first FIFO queue corresponding to the link according to the link corresponding to the first row period;

[0095] Specifically, the link corresponding to the first row period is a link for transmitting the data stream of the first row period.The first FIFO queue and the second FIFO queue can be hardware-designed FIFOs or software-designed FIFOs.

[0096] a first reading module configured to, when the first FIFO queue is not empty, read the first line period from the first FIFO queue, and input the first line period into a Kalman filter, so that the Kalman filter outputs a second initial line period, where the second initial line period consists of the second line period and a plurality of fractional data;

[0097] Specifically, the Kalman filter is used to execute a Kalman filter algorithm, and may be a hardware-designed device or a software-designed device. The second initial row period is an original period value of the data stream under a source clock estimated using the Kalman filter algorithm. The second initial row period is a decimal. The decimal data is a decimal data value of the second initial row period.

[0098] a second writing module, configured to write the second initial row period into the corresponding second FIFO queue;

[0099] a second reading module configured to read the second initial line period from the second FIFO queue, and input the second initial line period into the Kalman filter for iterative calculation;

[0100] Specifically, the Kalman filter algorithm uses the system state at the previous moment and the measurement value at the current moment to obtain the optimal estimate of the system state of the dynamic system at the current moment. Therefore, after obtaining the second initial row period, the second initial row period needs to be fed back to the input end of the Kalman filter.

[0101] The truncation module is configured to truncate part of the fractional data of the second initial line period and perform superposition processing on the truncated fractional data, and generate and send the second line period based on the truncated second initial line period and the accumulated error obtained by the superposition processing.

[0102] Specifically, since the Kalman filter algorithm is a cyclic iterative algorithm, the Kalman filter algorithm performs truncation every time it obtains the second row period, and correspondingly obtains a truncated decimal data. The accumulated error is obtained by superimposing these truncated decimal data.

[0103] In the embodiment, the first row period is dynamically filtered by the Kalman filter algorithm, which can further ensure that a second row period that stably reflects the pixel row length of the transmitting end is obtained, further realize the timing adjustment of the receiving end, and thus further ensure that the image data recovered by the receiving end is relatively accurate and reliable. In addition, since the Kalman filter algorithm is an iterative algorithm, it requires the system state calculated at the previous moment and the measurement value at the current moment to calculate the system state at the current moment. The present disclosure can balance the difference between the measurement value interval and the system state interval by setting a two-level FIFO queue, making the two basically the same, further facilitating the execution of the Kalman filter algorithm. In addition, the present disclosure allocates a first FIFO queue and a second FIFO queue to the transmission link of each data stream, so that multiple transmission links share the Kalman filter computing resources, realizes the time-sharing execution of the data stream iterative calculation of each link, and can obtain the second row period corresponding to each link, avoiding the problem of designing separate computing resources for each link and causing resource waste.

[0104] Of course, by setting the first FIFO queue and the second FIFO queue, it is also possible to prevent the loss of multi-link data during the input and output process, avoid frequent bus operations, and reduce the burden on the processor.

[0105] To further ensure flexibility in timing adjustment, in one optional method, the Kalman filter is a device that implements a Kalman filter algorithm, and the first FIFO queue and the second FIFO queue are implemented in software. Compared to a pure hardware implementation, the present disclosure utilizes a combination of software and hardware to provide the ability to programmatically modify and update the dynamic filtering algorithm later.

[0106] In addition, the truncation module may specifically include: a correction submodule, configured to correct the truncated second initial line period according to the accumulated error when the accumulated error is greater than a threshold, so as to obtain the second line period; and an output submodule, configured to directly output the truncated second initial line period as the second line period when the accumulated error is not greater than a threshold.

[0107] Furthermore, the correction submodule is further configured to add the truncated second initial line period to the average value of the accumulated errors to obtain the second line period.

[0108] It should be noted that the truncation module can be implemented in software, hardware, or a combination of software and hardware. In the embodiment that needs to be implemented in hardware, the number of digits of the truncated decimal data is specifically determined according to the number of decimal digits that can be stored by the hardware generation logic itself, that is, according to the number of decimal digits that can be stored by the hardware generation logic, the number of decimal digits that exceeds the number of decimal digits of the hardware generation logic is truncated, and the error accumulation method is used for superposition processing, and each iteration outputs the decimal part that matches the hardware generation logic. The truncation process can be implemented by hardware, and the accumulation process of the decimal part can be implemented by software, so as to achieve the purpose of hardware and software coordination.

[0109] According to other embodiments of the present disclosure, the first reading module includes: an input submodule configured to input the first line period into the Kalman filter, so that the Kalman filter predicts the system state based on the first line period to obtain the second initial line period, and the system state is the clock period of two adjacent identical blanking identifiers in the data stream under the source clock, and the blanking identifier includes at least one of a blanking start identifier and a blanking end identifier. The present disclosure defines the system state and the measurement value on both sides of the transmitting end and the receiving end of the display interface respectively, and uses dynamic filtering to estimate the system state representing the line period of the transmitting end from the measurement value representing the line period of the receiving end, thereby further achieving a system state output that stably reflects the line period of the transmitting end.

[0110] Specifically, the specific process of constructing the Kalman filter and using the Kalman filter to perform dynamic filtering can be as follows:

[0111] Define the initial state at time T0: Z = Z[0], X = X[0], H = h0, P = P[0], R = r0, Q = q0. The initial value Z[0] of the measurement value Z represents the measurement value at time T0. For example, the number of line clock cycles between two adjacent BEs, the number of line clock cycles between two adjacent BSs, the number of pixel clock cycles between two adjacent BEs, and the number of pixel clock cycles between two adjacent BSs. Select the initial state X[0] of the system state X. Here, you can choose the observed value of the system state, such as the observed value of the system state at time T0, or other valid estimates of the system state. Select the observation coefficient H, which is the ratio between the measured value and the system state, as a constant h0. From a measurement perspective, the measured value can have a certain linear proportional relationship with the system state. The accumulated line cycles of multiple pixel rows over a period of time can be used as the measurement value for calculation. For example, the system state calculated by observing the BS interval for five line cycles is one-fifth of the measured value. Select the initial states q0 and r0 for the error coefficients Q and R. The error coefficients modify the Kalman filter calculation process, allowing users to adjust it based on the actual system. They can remain unchanged after the initial state selection. Select the intermediate value P of the calculation process and the initial value P[0]. For example, state 0 is generally selected.

[0112] The calculation is performed iteratively, performing the calculation at each iteration time k. The result is the system state X at iteration time k. The iteration interval is the measurement interval. The calculation process is as follows: X[k] = X[k-1]; P[k] = P[k-1] + q0; temp = (P[k] × h0 / (P[k] × h0 × h0 + r0)); X[k] = X[k] + temp × (Z[k] - h0 × X[k]); P[k] = (1 - temp × h0) × P[k].

[0113] The first writing module of the present disclosure specifically includes: a writing submodule, which is configured to write the first row cycle into the first FIFO queue corresponding to the link and end the first interrupt when the first interrupt is triggered, and the first interrupt carries an interrupt number generated according to the number of the link and the data stream. The interrupt number is used to characterize the link and data stream corresponding to the first row cycle, and is a unique number of the first row cycle. The second reading module of the present disclosure specifically includes: a reading submodule, which is configured to read the second row cycle from the second FIFO queue according to a predetermined algorithm when the second interrupt is triggered, and end the second interrupt. The predetermined algorithm includes one of the following: a cyclic scheduling algorithm, a priority scheduling algorithm, and the second interrupt carries the interrupt number. The present disclosure combines FIFO queues and interrupts to meet real-time processing requirements and further improve the efficiency of timing adjustment. And by reading the second row cycle from the second FIFO queue through cyclic scheduling or priority scheduling methods, the iteration of the parallel loop can be distributed to multiple threads, further speeding up the timing adjustment progress of each link.

[0114] In addition, the specific implementation method of reading the first row cycle from the first FIFO queue in the first reading module is the same as the implementation method of the second reading module, and the specific implementation method of writing the second initial row cycle into the corresponding second FIFO queue in the second writing module is the same as the specific implementation method of the first writing module, which will not be repeated here.

[0115] In a specific embodiment, as shown in FIG5 , upon obtaining the first line cycle of the nth link, a first interrupt corresponding to the nth link is triggered; a measurement value count is performed; the first line cycle corresponding to the nth link is read and written to the first FIFO queue; and the first interrupt corresponding to the nth link is terminated. As shown in FIG6 , upon writing the system status of the nth link into the second FIFO, a second interrupt corresponding to the nth link is triggered; a system status value count is performed; the system status is read from the second FIFO, and the generation logic for the second line cycle is updated based on the system status, i.e., the output of the second line cycle is updated; and the second interrupt corresponding to the nth link is terminated.

[0116] In actual application, the source clock is a row clock or a pixel clock, that is, the system state of the Kalman filter can be the clock cycle of the same two adjacent blanking mark intervals under the clock domain of the row clock of the transmitting end, or it can be the clock cycle of the same two adjacent blanking mark intervals under the clock domain of the pixel clock of the transmitting end. In order to further achieve accurate adjustment of the clock timing of the output end corresponding to the above two situations, in some optional embodiments of the present disclosure, the device also includes: a first conversion unit, which is configured to, when the source clock is the row clock, process the first row cycle using the Kalman filter algorithm to obtain the second row cycle, and then perform clock domain conversion on the second row cycle to obtain the row cycle of the first row cycle under the pixel clock. The device also includes: a second conversion unit, which is configured to, when the source clock is the pixel clock, process the first row cycle using the Kalman filter algorithm to obtain the second row cycle, and then perform clock domain conversion on the first row cycle to obtain the row cycle of the first row cycle under the pixel clock.

[0117] That is, as shown in Figure 7, when the system state is the clock period in the clock domain of the transmitter's line clock, the measured value input to the Kalman filter on the receiver side is the clock period of the image data in the clock domain of the line clock. The Kalman filter output is still the clock period estimated in the clock domain of the line clock, which is then converted to the clock period in the clock domain of the pixel clock after cross-clock domain conversion. As shown in Figure 8, when the system state is the clock period in the clock domain of the transmitter's pixel clock, the measured value input to the Kalman filter on the receiver side is the clock period of the image data in the clock domain of the pixel clock, obtained after clock conversion from the clock domain of the line clock. The Kalman filter output is the clock period estimated in the clock domain of the pixel clock.

[0118] To further address the issue of distorted or even non-normal output of image data recovered by the DP receiving end due to clock frequency mismatch between the DP transmitting end and the DP receiving end, the adjustment unit optionally includes: a calculation module configured to calculate a frequency division ratio based on the second line period and a reference clock period in the phase-locked loop; and a control module configured to control the phase-locked loop to generate a corresponding adjustment clock signal based on the frequency division ratio to recover at least one of the following: the phase of the output clock and the frequency of the output clock. By calculating the fractional frequency division ratio between the second line period and the reference clock period in the phase-locked loop, and then controlling the PLL to generate the adjustment clock signal for image data recovery based on the fractional frequency division ratio, the resolution of the recovered image data is further ensured to be substantially consistent with that of the transmitting end, further ensuring the accuracy and reliability of the recovered image data.

[0119] The timing adjustment device includes a processor and a memory. The determining unit, the processing unit, and the adjusting unit are all stored in the memory as program units. The processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; alternatively, the modules are located in different processors in any combination.

[0120] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be provided, and by adjusting kernel parameters, the problem of distortion or even failure of normal output of image data restored by the DP receiving end in the prior art can be at least solved.

[0121] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0122] An embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the timing adjustment method.

[0123] Specifically, the timing adjustment method includes:

[0124] Step S201: upon receiving a data stream output by a transmitting end of a display interface, determining a first line period according to the data stream, where the first line period is a line period of the data stream under an output clock, and the output clock is a clock domain of a receiving end of the display interface;

[0125] Specifically, the line period is the time required to scan a row of pixels, or the number of pixels in a row, also known as the line length. Driven by the output clock, the receiving end samples the received signal and recovers a pixel clock that matches the transmitting end's clock, thereby recovering accurate data. Generally, the receiving end samples the received signal on the rising or falling edge of the output clock. The receiving end's clock domain is typically the line clock.

[0126] Step S202: Process the first row period using at least a Kalman filter algorithm to obtain a second row period, where the second row period is a row period of the data stream under a source clock, where the source clock is a clock domain of the transmitting end.

[0127] Specifically, the clock domain of the source clock is generally the main link domain.

[0128] Step S203: adjusting the output clock according to the second row period.

[0129] Optionally, determining the first line period based on the data stream includes: restoring the data stream to obtain image data and the output clock; extracting two adjacent identical blanking identifiers from the image data, the blanking identifiers including at least one of a blanking start identifier and a blanking end identifier; and determining that the clock period of the two adjacent identical blanking identifiers under the output clock is the first line period.

[0130] Optionally, the transmitting end outputs the data stream through at least one link, one link corresponds to at least one first FIFO queue and at least one second FIFO queue, and uses at least a Kalman filter algorithm to process the first row cycle to obtain a second row cycle, including: writing the first row cycle into the first FIFO queue corresponding to the link according to the link corresponding to the first row cycle; when the first FIFO queue is not empty, reading the first row cycle from the first FIFO queue, and inputting the first row cycle into the Kalman filter, so that the Kalman filter outputs a second initial row cycle, the second initial row cycle consisting of the second row cycle and multiple decimal data; writing the second initial row cycle into the corresponding second FIFO queue; reading the second initial row cycle from the second FIFO queue, and inputting the second initial row cycle into the Kalman filter for iterative calculation; truncating part of the decimal data of the second initial row cycle and performing superposition processing on the truncated decimal data, generating and sending the second row cycle based on the truncated second initial row cycle and the accumulated error obtained by the superposition processing.

[0131] Optionally, the first line cycle is input into the Kalman filter so that the Kalman filter outputs a second initial line cycle, including: inputting the first line cycle into the Kalman filter so that the Kalman filter predicts the system state based on the first line cycle to obtain the second initial line cycle, the system state is the clock cycle of two adjacent identical blanking identifiers in the data stream under the source clock, and the blanking identifier includes at least one of a blanking start identifier and a blanking end identifier.

[0132] Optionally, writing the first row cycle into the first FIFO queue corresponding to the link includes: when a first interrupt is triggered, writing the first row cycle into the first FIFO queue corresponding to the link, and ending the first interrupt, the first interrupt carries an interrupt number generated according to the link and the data flow number, reading the second initial row cycle from the second FIFO queue includes: when a second interrupt is triggered, reading the second row cycle from the second FIFO queue according to a predetermined algorithm, and ending the second interrupt, the predetermined algorithm includes one of the following: a round-robin scheduling algorithm, a priority scheduling algorithm, and the second interrupt carries the interrupt number.

[0133] Optionally, the source clock is a row clock or a pixel clock. When the source clock is the row clock, after the first row period is processed by the Kalman filter algorithm to obtain the second row period, the method further includes: performing clock domain conversion on the second row period to obtain the row period of the first row period under the pixel clock. When the source clock is the pixel clock, before the first row period is processed by the Kalman filter algorithm to obtain the second row period, the method further includes: performing clock domain conversion on the first row period to obtain the row period of the first row period under the pixel clock.

[0134] Optionally, the output clock is adjusted according to the second row period, including: calculating a division ratio according to the second row period and a reference clock period in a phase-locked loop; and controlling the phase-locked loop to generate a corresponding adjustment clock signal according to the division ratio to recover at least one of the following: the phase of the output clock and the frequency of the output clock.

[0135] An embodiment of the present disclosure provides a processor, which is configured to run a program, wherein the timing adjustment method is executed when the program is run.

[0136] An embodiment of the present disclosure provides a device, comprising a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the following steps are implemented:

[0137] Step S201: upon receiving a data stream output by a transmitting end of a display interface, determining a first line period according to the data stream, where the first line period is a line period of the data stream under an output clock, and the output clock is a clock domain of a receiving end of the display interface;

[0138] Step S202: Process the first row period using at least a Kalman filter algorithm to obtain a second row period, where the second row period is a row period of the data stream under a source clock, where the source clock is a clock domain of the transmitting end.

[0139] Step S203: adjusting the output clock according to the second row period.

[0140] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0141] The device may specifically be a graphics adapter or a docking station including a display interface.

[0142] The present disclosure also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program for initializing at least the following method steps:

[0143] Step S201: upon receiving a data stream output by a transmitting end of a display interface, determining a first line period according to the data stream, where the first line period is a line period of the data stream under an output clock, and the output clock is a clock domain of a receiving end of the display interface;

[0144] Step S202: Process the first row period using at least a Kalman filter algorithm to obtain a second row period, where the second row period is a row period of the data stream under a source clock, where the source clock is a clock domain of the transmitting end.

[0145] Step S203: adjusting the output clock according to the second row period.

[0146] Obviously, those skilled in the art will appreciate that the various modules or steps of the present disclosure can be implemented using a general-purpose computing device, can be centralized on a single computing device, or distributed across a network of multiple computing devices, can be implemented using program code executable by the computing device, and thus can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present disclosure is not limited to any particular combination of hardware and software.

[0147] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0148] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0149] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0151] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0152] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0153] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0154] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, commodity, or apparatus that includes the element.

[0155] From the above description, it can be seen that the embodiments described in this disclosure achieve the following technical effects:

[0156] 1) The timing adjustment method disclosed herein first determines the first line period of the data stream under the output clock based on the data stream sent by the transmitting end of the display interface; then at least uses a Kalman filter algorithm to process the first line period to obtain the second line period of the data stream under the source clock; finally, adjusts the output clock based on the obtained second line period. Compared with the problem in the prior art where the image data recovered by the DP receiving end is distorted or even cannot be output normally due to the mismatch in the clock frequencies of the DP transmitting end and the DP receiving end, the present disclosure uses at least a Kalman filter algorithm to predict and estimate the second line period based on the first line period to obtain a second line period that stably reflects the pixel row length of the transmitting end, and then uses the estimated second line period to adjust the output clock, ensuring that the adjusted output clock frequency is basically matched with the source clock frequency, thereby ensuring that the image data recovered based on the adjusted output clock is basically consistent with the original data, avoiding the problem that the recovered image data is distorted or even cannot be output normally.

[0157] 2) The timing adjustment device disclosed herein determines the first line period of the data stream under the output clock based on the data stream sent by the transmitting end of the display interface by a determination unit; processes the first line period by at least a Kalman filter algorithm by a processing unit to obtain the second line period of the data stream under the source clock; and adjusts the output clock by an adjustment unit based on the obtained second line period. Compared with the problem in the prior art where the image data recovered by the DP receiving end is distorted or even cannot be output normally due to the mismatch in the clock frequencies of the DP transmitting end and the DP receiving end, the timing adjustment device disclosed herein predicts and estimates the second line period based on the first line period by at least a Kalman filter algorithm to obtain a second line period that stably reflects the pixel row length of the transmitting end, and then adjusts the output clock using the estimated second line period, thereby ensuring that the adjusted output clock frequency is substantially matched with the source clock frequency, thereby ensuring that the image data recovered based on the adjusted output clock is substantially consistent with the original data, thereby avoiding the problem that the recovered image data is distorted or even cannot be output normally.

[0158] The foregoing description is merely a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Those skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present disclosure shall be included within the scope of protection of the present disclosure.

Claims

1. A timing adjustment method, characterized in that: include: In case of receiving a data stream output by a transmitting end of a display interface, determining a first line period according to the data stream, wherein the first line period is a line period of the data stream under an output clock, and the output clock is a clock domain of a receiving end of the display interface; At least using a Kalman filter algorithm to process the first row period to obtain a second row period, where the second row period is a row period of the data stream under a source clock, and the source clock is a clock domain of the transmitting end; The output clock is adjusted according to the second row period.

2. The method according to claim 1, characterized in that Determining a first row period according to the data stream includes: Restoring the data stream to obtain image data and the output clock; Extracting two adjacent identical blanking marks from the image data, wherein the blanking marks include at least one of a blanking start mark and a blanking end mark; A clock period of two adjacent identical blanking marks under the output clock is determined to be the first row period.

3. The method according to claim 1, characterized in that The transmitting end outputs the data stream through at least one link, one of the links corresponds to at least one first FIFO queue and at least one second FIFO queue, and at least a Kalman filter algorithm is used to process the first row cycle to obtain a second row cycle, including: According to the link corresponding to the first row period, writing the first row period into the first FIFO queue corresponding to the link; When the first FIFO queue is not empty, reading the first line period from the first FIFO queue, and inputting the first line period into a Kalman filter, so that the Kalman filter outputs a second initial line period, wherein the second initial line period is composed of the second line period and a plurality of decimal data; Writing the second initial row period into the corresponding second FIFO queue; Reading the second initial row period from the second FIFO queue, and inputting the second initial row period into the Kalman filter for iterative calculation; A portion of the fractional data of the second initial line period is truncated and the truncated fractional data is superimposed, and the second line period is generated and issued according to the truncated second initial line period and the accumulated error obtained by the superimposition process.

4. The method according to claim 3, characterized in that Inputting the first line period into a Kalman filter so that the Kalman filter outputs a second initial line period comprises: The first line cycle is input into the Kalman filter, so that the Kalman filter predicts the system state according to the first line cycle to obtain the second initial line cycle, the system state is the clock cycle of two adjacent identical blanking markers in the data stream under the source clock, and the blanking marker includes at least one of a blanking start marker and a blanking end marker.

5. The method according to claim 3, characterized in that: Writing the first row cycle into the first FIFO queue corresponding to the link includes: in the case of triggering a first interrupt, writing the first row cycle into the first FIFO queue corresponding to the link, and ending the a first interrupt, the first interrupt carrying an interrupt number generated according to the numbers of the link and the data flow, Reading the second initial row cycle from the second FIFO queue includes: when the second interrupt is triggered, reading the second row cycle from the second FIFO queue according to a predetermined algorithm, and ending the second interrupt, the predetermined algorithm includes one of the following: a round-robin scheduling algorithm, a priority scheduling algorithm, and the second interrupt carries the interrupt number.

6. The method according to claim 1, characterized in that The source clock is a line clock or a pixel clock, In the case where the source clock is the row clock, after the first row period is processed by using a Kalman filter algorithm to obtain a second row period, the method further includes: performing clock domain conversion on the second row period to obtain a row period of the first row period under a pixel clock, When the source clock is the pixel clock, the first line period is processed by a Kalman filter algorithm to obtain a second line period, and the method further includes: performing clock domain conversion on the first line period to obtain a line period of the first line period under the pixel clock.

7. The method according to claim 1, characterized in that According to the second row period, adjusting the output clock includes: Calculating a frequency division ratio according to the second row period and a reference clock period in a phase-locked loop; According to the frequency division ratio, the phase-locked loop is controlled to generate a corresponding adjustment clock signal to recover at least one of the following: the phase of the output clock and the frequency of the output clock.

8. A timing adjustment device, characterized in that: include: A determining unit configured to determine, when receiving a data stream output by a transmitting end of a display interface, a first line period according to the data stream, wherein the first line period is a line period of the data stream under an output clock, and the output clock is a clock domain of a receiving end of the display interface; A processing unit is configured to process the first row period by at least using a Kalman filter algorithm to obtain a second row period, where the second row period is a row period of the data stream under a source clock, and the source clock is a clock domain of the transmitting end; The adjustment unit is configured to adjust the output clock according to the second row period.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include being configured to execute the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Circuit for correcting an output clock frequency in a receiving device

    CN102100021A

  • Video clock recovery method and apparatus thereof

    CN106341127A

  • Display synchronization method and video display terminal

    CN108235098A

  • Display synchronization

    US20180061303A1

  • Data conversion and high definition multimedia interface receiving device

    US20220124282A1