Hi Jan, Philipp,
I reviewed this patch series, and while I don't have any
objections to the code-level changes, but my question
is more specifically about how the IPU/CSI deals with
receiving RGB565 over a parallel bus.
My understanding was that if the CSI receives RGB565
over a parallel 8-bit sensor bus, the CSI_SENS_DATA_FORMAT
register field is programmed to RGB565, and the CSI outputs
ARGB8888. Then IDMAC component packing can be setup to
write pixels to memory as RGB565. Does that not work?
Assuming that above does not work (and indeed parallel RGB565
must be handled as pass-through), then I think support for capturing
parallel RGB555 as pass-through should be added to this series as
well.
Also what about RGB565 over a 16-bit parallel sensor bus? The
reference manual hints that perhaps this could be treated as
non-passthrough ("on the fly processing"), e.g. could be passed
on to the IC pre-processor:
16 bit RGB565
This is the only mode that allows on the fly processing of 16
bit data. In this mode the
CSI is programmed to receive 16 bit generic data. In this mode
the interface is
restricted to be in "non-gated mode" and the CSI#_DATA_SOURCE
bit has to be set
If the external device is 24bit - the user can connect a 16 bit
sample of it (RGB565
format). The IPU has to be configured in the same way as the
case of
CSI#_SENS_DATA_FORMAT=RGB565
Thanks,
Steve
On 05/03/2018 09:41 AM, Jan Luebbe wrote:
The IPU can only capture RGB565 with two 8-bit cycles in bayer/generic
mode on the parallel bus, compared to a specific mode on MIPI CSI-2.
To handle this, we extend imx_media_pixfmt with a cycles per pixel
field, which is used for generic formats on the parallel bus.
Before actually adding RGB565_2X8 support for the parallel bus, this
series simplifies handing of the the different configurations for RGB565
between parallel and MIPI CSI-2 in imx-media-capture. This avoids having
to explicitly pass on the format in the second patch.
Jan Luebbe (2):
media: imx: capture: refactor enum_/try_fmt
media: imx: add support for RGB565_2X8 on parallel bus
drivers/staging/media/imx/imx-media-capture.c | 38 +++++++--------
drivers/staging/media/imx/imx-media-csi.c | 47 +++++++++++++++++--
drivers/staging/media/imx/imx-media-utils.c | 1 +
drivers/staging/media/imx/imx-media.h | 2 +
4 files changed, 63 insertions(+), 25 deletions(-)