SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
The DISPC provides flexible mechanisms for efficient implementation of rotation using the DISPC, its DMA engine, and the rotation engine of the TILER. The rotation is handled only through the TILER, which supplies the encoded pixels to the DISPC.
No rotation or mirroring is supported when accessing the SDRAM directly.
The TILER supports:
When accessing YUV4:2:2 data, each 32-bit value loaded into the DMA buffer can represent either:
The reading from the DMA buffer supports the extraction of the two pixels, regardless of the rotation. When the pixels are not consecutive on the same line (90- to 270-degree rotation), the chrominance sample of the first pixel of each 32-bit value is duplicated for the second pixel in the same 32-bit value.
The rotation flag DISPC_VIDn_ATTRIBUTES[13:12] ROTATION and DISPC_VIDn_ATTRIBUTES[4:1] FORMAT bit fields define the processing to extract the pixels from YUV4:2:2 32-bit values. Software must ensure that the settings of the ROTATION and FORMAT bit fields are coherent with the rotation and mirroring defined through the address format in the TILER-specific address map. For more information, see Section 15.2, Dynamic Memory Manager, inSection 15.1, Memory Subsystem.
For YUV4:2:0 NV12, 2D tiled memory access cases, the DISPC_VIDn_ATTRIBUTES[13:12] ROTATION bit field should be set properly to match with the intended rotation of the use case.
Table 11-63 describes the register settings of the DISPC when accessing, rotating, and mirroring an image using the TILER. A physical base address (PBA) for each rotation is determined and set as the buffer address (BA). The row incremental is determined and set in ROW_INC. The value of the pixel increment, PIXEL_INC, is set to 0x1 (contiguous pixels).
Rotation | Registers | Rotation With and Without Mirroring |
---|---|---|
0 degree | DISPC_GFX_BA_j/DISPC_VIDp_BA_j/DISPC_WB_BA_j | PBA0 |
DISPC_GFX_PIXEL_INC/DISPC_VIDp_PIXEL_INC/DISPC_WB_PIXEL_INC | 1 to 16 | |
DISPC_GFX_ROW_INC/DISPC_VIDp_ROW_INC/DISPC_WB_ROW_INC | ROW0 | |
90 degrees | DISPC_GFX_BA_j/DISPC_VIDp_BA_j/DISPC_WB_BA_j | PBA90 |
DISPC_GFX_PIXEL_INC/ DISPC_VIDp_PIXEL_INC/DISPC_WB_PIXEL_INC | 1 to 16 | |
DISPC_GFX_ROW_INC/ DISPC_VIDp_ROW_INC/DISPC_WB_ROW_INC | ROW90 | |
180 degrees | DISPC_GFX_BA_j/DISPC_VIDp_BA_j/DISPC_WB_BA_j | PBA180 |
DISPC_GFX_PIXEL_INC/DISPC_VIDp_PIXEL_INC/DISPC_WB_PIXEL_INC | 1 to 16 | |
DISPC_GFX_ROW_INC/ DISPC_VIDp_ROW_INC/DISPC_WB_ROW_INC | ROW180 | |
270 degrees | DISPC_GFX_BA_j/DISPC_VIDp_BA_j/DISPC_WB_BA_j | PBA270 |
DISPC_GFX_PIXEL_INC/DISPC_VIDp_PIXEL_INC/DISPC_WB_PIXEL_INC | 1 to 16 | |
DISPC_GFX_ROW_INC/ DISPC_VIDp_ROW_INC/DISPC_WB_ROW_INC | ROW270 |
For YUV format, in addition to the DISPC_VIDp_BA_j register used for the Y component, the DISPC_VIDp_BA_UV_j register must be set to define the base address of the UV frame buffer in memory.
The DISPC_WB_ROW_INC register can be used only in 2D mode (using the Tiler). In order to use the DISPC_WB_ROW_INC register, the DISPC_WB_ATTRIBUTES[8] BURSTTYPE bit must be set to 1.
The PBA rotation is determined by:
Where PBA is the physical base address of the image in the memory.
The ROW rotation is determined by:
Table 11-64 and Table 11-65 list the DISPC rotation mode and rotation orientation definitions, respectively.
8-Bit Tiled | 16-Bit Tiled | 32-Bit Tiled | Page Tiled | |
---|---|---|---|---|
Mode | 0 | 1 | 2 | 3 |
Type of Orientation | Value |
---|---|
0-degree view | 0x0 |
180-degree view with mirroring | 0x1 |
0-degree view with mirroring | 0x2 |
180-degree view | 0x3 |
270-degree view with mirroring | 0x4 |
270-degree view | 0x5 |
90-degree view | 0x6 |
90-degree view with mirroring | 0x7 |
For YUV4:2:0 progressive pixel format, because the value of the DISPC_VIDp_ROW_INC register is defined for the Y buffer, the DISPC_VIDp_ATTRIBUTES[22] DOUBLESTRIDE bit must be set to 1 when rotating the picture by 0 and 180 degrees, and must be reset to 0 when rotating the picture by 90 and 270 degrees.
For YUV4:2:0 interlaced pixel format, because the value of the DISPC_VIDp_ROW_INC register is defined for the Y buffer, the DISPC_VIDp_ATTRIBUTES[22] DOUBLESTRIDE bit must be set to 1 when rotating the picture by 0 and 180 degrees. Rotations of 90 and 270 degrees are not supported with this pixel format.