SPRUIL1D May 2019 – December 2024 DRA829J , DRA829J-Q1 , DRA829V , DRA829V-Q1 , TDA4VM , TDA4VM-Q1
The MFLAG mechanism allows a dynamic increase of the priority of DISPC real-time traffic, when required, based on the fullness of the DISPC DMA read buffers.
The MFLAG mechanism is used when fullness of the DMA buffers is critical (close to underflow). The mechanism is implemented for all DMA buffers of the video pipelines.
Programmable buffer thresholds (forming hysteresis) are used to configure when a local MFLAG signal is generated. The 1-bit MFLAG signal is generated on DISPC master port in order to inform the system that the outstanding requests from DISPC shall be considered with higher priority in order to get faster interconnect responses. The MFLAG signal is asynchronous to any ongoing interconnect transaction.
Each pipeline maintains its own MFLAG bit. The MFLAG bit is asserted depending on the fullness of the DMA buffers associated with the pipeline and depending on the thresholds programmed by software. All MFLAG signals are OR-ed together to generate the single 1-bit MFLAG for the master port connected to the DISPC DMA engine.
The threshold for video pipelines corresponds to the fullness of the associated DMA buffer, and is defined by two threshold parameters:
Summary of the MFLAG value, based on DMA read buffer fullness:
Similarly, the MFLAG is set based on fullness and the transition history on the out bound writeback pipeline. There is no pre-fetch state for out bound DMA controller. The MFLAG is set when the buffer fullness rises above the HT_MFLAG bit-field value. The MFLAG is cleared only when the buffer fullness falls back below the LT_MFLAG bit-field value. In between these two fullness states, the MFLAG bit keeps the previous value.
By default, the MFLAG mechanism is disabled (DSS0_COMMON_DISPC_GLOBAL_MFLAG_ATTRIBUTE[1-0] MFLAG_CTRL register field = 0x0), and the MFLAG signal is low (de-asserted). The arbitration scheme for the pipelines is the same as described in Section 12.6.4.6.9, DISPC DMA Arbitration. That is, round-robin either between high-priority pipelines, or between normal-priority pipelines (if all pipelines are of normal priority).
When the MFLAG_CTRL register field is set to 0x2, the MFLAG mechanism is enabled, and the MFLAG signal is dynamically set to 0 or 1, depending on DMA buffer fullness and programmed threshold levels, as explained previously in this section. In this case, the arbitration scheme for the pipelines is round-robin between those high-priority pipelines, which have asserted their local MFLAG signals. If there are no high-priority pipelines with their local MFLAG signals asserted, then the arbitration scheme is the same as described in Section 12.6.4.6.9, DISPC DMA Arbitration.
The DSS0_COMMON_DISPC_GLOBAL_MFLAG_ATTRIBUTE[6] MFLAG_START bit defines the following additional rules for the MFLAG mechanism: