drivers: dma: pxp: Add support for ARGB8888 format

Add support for ARGB8888 pixel format as the camera pipeline on i.MX
RT11xx could output images in this format

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
This commit is contained in:
Phi Bang Nguyen 2024-02-13 15:19:06 +01:00 committed by Fabio Baltieri
parent 94afc4ee3d
commit 8b191103d7
2 changed files with 8 additions and 2 deletions

View File

@ -99,6 +99,11 @@ static int dma_mcux_pxp_configure(const struct device *dev, uint32_t channel,
output_buffer_cfg.pixelFormat = kPXP_OutputPixelFormatRGB888;
bytes_per_pixel = 3;
break;
case DMA_MCUX_PXP_FMT_ARGB8888:
ps_buffer_cfg.pixelFormat = kPXP_PsPixelFormatARGB8888;
output_buffer_cfg.pixelFormat = kPXP_OutputPixelFormatARGB8888;
bytes_per_pixel = 4;
break;
default:
return -ENOTSUP;
}

View File

@ -34,7 +34,8 @@
#define DMA_MCUX_PXP_CMD_ROTATE_180 2
#define DMA_MCUX_PXP_CMD_ROTATE_270 3
#define DMA_MCUX_PXP_FMT_RGB565 0
#define DMA_MCUX_PXP_FMT_RGB888 1
#define DMA_MCUX_PXP_FMT_RGB565 0
#define DMA_MCUX_PXP_FMT_RGB888 1
#define DMA_MCUX_PXP_FMT_ARGB8888 2
#endif /* ZEPHYR_INCLUDE_DRIVERS_DMA_MCUX_PXP_H_ */