Dear All, This patch contains a driver for the JPEG codec integrated peripheral found in the Samsung Exynos4 SoC. The driver is implemented within the V4L2 framework as a mem-to-mem device. It presents two video nodes to userspace, one for the encoding part, and one for the decoding part. >From a userspace point of view the encoding process is typical (S_FMT, REQBUF, optionally QUERYBUF, QBUF, STREAMON, DQBUF) for both the source and destination queues. The decoding process requires that the source queue performs S_FMT, REQBUF, (QUERYBUF), QBUF and STREAMON. After STREAMON on the source queue, it is possible to perform G_FMT on the destination queue to find out the processed image width and height in order to be able to allocate an appropriate buffer - it is assumed that the user does not pass the compressed image width and height but instead this information is parsed from the jpeg input. Although this is done in kernel, there seems no better way since the JPEG IP in this SoC cannot stop after it parses the jpeg input header, so once it starts operation, it needs to already have an appropriately-sized buffer to store decompression results. Then REQBUF, QBUF and STREAMON on the destination queue complete the decoding and it is possible to DQBUF from both queues and finish the operation. During encoding the available formats are: V4L2_PIX_FMT_RGB565X and V4L2_PIX_FMT_YUYV for source and V4L2_PIX_FMT_YUYV and V4L2_PIX_FMT_YUV420 for destination. During decoding the available formats are: V4L2_PIX_FMT_JPEG for source and V4L2_PIX_FMT_YUYV and V4L2_PIX_FMT_YUV420 for destination. In order for the driver to work a separate board definition and device registration patch is required; it is sent to linux-samsung-soc mailing list. Andrzej Pietrasiewicz Andrzej Pietrasiewicz (1): ARM: EXYNOS4: JPEG: driver initial release drivers/media/video/Kconfig | 8 + drivers/media/video/Makefile | 1 + drivers/media/video/s5p-jpeg/Makefile | 3 + drivers/media/video/s5p-jpeg/jpeg-core.c | 1381 ++++++++++++++++++++++++++++++ drivers/media/video/s5p-jpeg/jpeg-core.h | 116 +++ drivers/media/video/s5p-jpeg/jpeg-hw.h | 766 +++++++++++++++++ drivers/media/video/s5p-jpeg/jpeg-regs.h | 280 ++++++ 7 files changed, 2555 insertions(+), 0 deletions(-) create mode 100644 drivers/media/video/s5p-jpeg/Makefile create mode 100644 drivers/media/video/s5p-jpeg/jpeg-core.c create mode 100644 drivers/media/video/s5p-jpeg/jpeg-core.h create mode 100644 drivers/media/video/s5p-jpeg/jpeg-hw.h create mode 100644 drivers/media/video/s5p-jpeg/jpeg-regs.h -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html