SPRUJ28E November 2021 – September 2024 AM68 , AM68A , TDA4AL-Q1 , TDA4VE-Q1 , TDA4VL-Q1
For each line to be fetched, the DMA engine address generator:
The meaning of the address bits is as follows:
The address extension bits are defined by the programmable parameter DSS0_VID_BA_EXT_0/DSS0_VID_BA_EXT_1 and DSS0_VID_BA_UV_EXT_0/DSS0_VID_BA_UV_EXT_1 registers, optionally used to extend the BA memory addressing to 48-bit addressed external memory space (that is, to extend DISPC address space into 4GB+ space).
The DDR scan pixel addresses are generated by the DMA engine in order to read data from the system memory. The base address defines the start address of the first pixel, and then the address is incremented based on the number of pixels per line, offset between two consecutive lines and number of lines. The DSS0_VID_ROW_INC register allow the access to a frame using 1D bursts (but as a two-dimensional block) by adding a fixed address offset at the end of a line. The ROW_INC can also be used to skip lines from the input frame.
The byte address of each pixel in the frame buffer located in the system memory is determined by:
Pixel address = base_address + x × (bpp/8) + y × (width × (bpp/8) + increment), where:
In cases where the DMA controller is doing a flip/mirror (see Section 12.6.3.6.4, DISPC Flip/Mirror Support) or fetching a compressed frame buffer (see DISPC Compressed Data Format Support), the above equation for pixel byte address needs to be modified according to those features.
Since the base address is aligned on pixel size boundary the horizontal resolution is one pixel. In case of YUV422 formats, the resolution is 4 bytes (2 pixels). In case of RGB24 packed format the resolution is 4 pixels. In case of Y frame buffer (YUV-NV12 format) the resolution is one byte. The vertical resolution is one line.
In case of YUV422 non-planar format, the number of pixels per line shall be a multiple of 2 pixels and the size of a pixel shall be considered as 2 bytes. In case of YUV planar format (YUV420-NV12, YUV420-NV21, YUV422-NV12, YUV422-NV21), the Y buffer shall be considered as an 8-bit frame buffer, and the CbCr shall be considered as a 16-bit frame buffer. The pixel size is 1 byte and 2 bytes respectively for Y and CbCr.
For two-plane pixel formats (YUV420-NV12, YUV420-NV21, YUV422-NV12, YUV422-NV21, RGB565-A8), the pixel values are defined in two separate buffers (Y and UV buffers). The first buffer consists of Y values (8 bits for each Y sample) or 16-bit RGB value. The second buffer consists of CbCr values (16 bits for each pair of CbCr samples) or 8-bit Alpha value. The base address, the number of bytes to skip between pixels and between lines of each buffer are defined by separate registers:
In case of interlaced mode, DSS0_VID_BA_0 and DSS0_VID_BA_UV_0 registers define the base address of the even field, and DSS0_VID_BA_1 and DSS0_VID_BA_UV_1 registers define the base address of the odd field.
Table 12-336 summarizes the register settings for a simple access of a picture in the system memory.
Pipeline Registers | Value |
---|---|
DSS0_VID_BA_0(1) and DSS0_VID_BA_1(2) / DSS0_WB_BA_0 and DSS0_WB_BA_1 | The physical base address (PBA) of image in the memory for all formats and Y buffer. |
DSS0_VID_BA_EXT_0 and DSS0_VID_BA_EXT_1 / DSS0_WB_BA_EXT_0 and DSS0_WB_BA_EXT_1 | Address extension bits of PBA for all formats and Y buffer. |
DSS0_VID_BA_UV_0(1) and DSS0_VID_BA_UV_1(2) / DSS0_WB_BA_UV_0 and DSS0_WB_BA_UV_1 | The physical base address (PBA) of UV buffers image in the memory. |
DSS0_VID_BA_UV_EXT_0 and DSS0_VID_BA_UV_EXT_1 / DSS0_WB_BA_UV_EXT_0 and DSS0_WB_BA_UV_EXT_1 | Address extension bits of PBA for UV buffers. |
DSS0_VID_PIXEL_INC / DSS0_WB_PIXEL_INC | 1 or other in pixel incremental value. |
DSS0_VID_ROW_INC / DSS0_WB_ROW_INC | 1 or other in row incremental value. Used for Y buffer. |
DSS0_VID_ROW_INC_UV / DSS0_WB_ROW_INC_UV | 1 or other in row incremental value. Used for UV buffer. |
An interconnect request (128 bits) corresponds to one or several pixels, depending on the bits per pixel. Therefore, the DMA engine determines the appropriate burst sequence to optimize the fetching of each new line. The DMA engine must prevent a single burst from crossing two lines. The DMA engine supports only 1D burst. 1D burst is used, if the fetch data is linear in memory. The size of the burst can be one of the following values:
The DMA controller supports the start address of a row of pixels to be aligned to any arbitrary boundary in memory (with the restriction that a 32-bit format is aligned to 32-bit boundary, a 16-bit format is aligned to a 16-bit boundary, a 8-bit format is aligned to a 8-bit boundary, etc.). However, it operates most efficiently when the start address of a row is aligned to the max burst boundary of 8x128-bit. For all other cases of unaligned rows the DMA will need to go through non-optimal transactions at the start and end of each row, till it can issue a max burst of 8x128.
While accessing a compressed frame buffer (through the FBDC module), the base-address needs to be aligned to 256 bytes. In this case, the DMA will always issue a burst of 16x128-bit.