i.MX PXP scaler/CSC driver
Subsystems (3)
v3 cover i.MX PXP scaler/CSC driver
The Pixel Pipeline (PXP) is a memory-to-memory graphics processing engine that supports scaling, colorspace conversion, alpha blending, rotation, and pixel conversion via lookup table. Different versions are present on various i.MX SoCs from i.MX23 to i.MX7. The latest versions on i.MX6ULL and i.MX7D have grown an additional pipeline for dithering and e-ink update processing that is ignored by this driver.
This series adds a V4L2 mem-to-mem scaler/CSC driver for the PXP version found on i.MX6ULL SoCs which is a size reduced variant of the i.MX7 PXP. The driver uses only the legacy pipeline, so it should be reasonably easy to extend it to work with the older PXP versions found on i.MX6UL, i.MX6SX, i.MX6SL, i.MX28, and i.MX23. The driver supports scaling and colorspace conversion. There is currently no support for rotation, alpha-blending, and the LUTs.
Changes since v2:
- fix Kconfig whitespace
- remove unused defines
- fix video_unregister_device/v4l2_m2m_release order in pxp_remove
- use GPL-2.0+ instead of GPL-2.0-or-later SPDX license identifer
- remove pxp_default_ycbcr_enc/quantization, always map to default encoding/quantization
- rename pxp_fixup_colorimetry to pxp_fixup_colorimetry_cap
regards
Philipp
Philipp Zabel (4):
dt-bindings: media: Add i.MX Pixel Pipeline binding
ARM: dts: imx6ull: add pxp support
media: imx-pxp: add i.MX Pixel Pipeline driver
MAINTAINERS: add entry for i.MX PXP media mem2mem driver
.../devicetree/bindings/media/fsl-pxp.txt | 26 + MAINTAINERS | 7 + arch/arm/boot/dts/imx6ul.dtsi | 8 + arch/arm/boot/dts/imx6ull.dtsi | 6 + drivers/media/platform/Kconfig | 9 + drivers/media/platform/Makefile | 2 + drivers/media/platform/imx-pxp.c | 1752 +++++++++++++++++ drivers/media/platform/imx-pxp.h | 1685 ++++++++++++++++ 8 files changed, 3495 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/fsl-pxp.txt create mode 100644 drivers/media/platform/imx-pxp.c create mode 100644 drivers/media/platform/imx-pxp.h
Signature · 1 line
2.18.0
PATCH v3 1/4 dt-bindings: media: Add i.MX Pixel Pipeline binding
Add DT binding documentation for the Pixel Pipeline (PXP) found on various NXP i.MX SoCs.
---
No changes since v2.
--- .../devicetree/bindings/media/fsl-pxp.txt | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/fsl-pxp.txt
Documentation/devicetree/bindings/media/fsl-pxp.txt new file +26 -0
@@ -0,0 +1,26 @@ +Freescale Pixel Pipeline +======================== + +The Pixel Pipeline (PXP) is a memory-to-memory graphics processing engine +that supports scaling, colorspace conversion, alpha blending, rotation, and +pixel conversion via lookup table. Different versions are present on various +i.MX SoCs from i.MX23 to i.MX7. + +Required properties: +- compatible: should be "fsl,<soc>-pxp", where SoC can be one of imx23, imx28, + imx6dl, imx6sl, imx6ul, imx6sx, imx6ull, or imx7d. +- reg: the register base and size for the device registers +- interrupts: the PXP interrupt, two interrupts for imx6ull and imx7d. +- clock-names: should be "axi" +- clocks: the PXP AXI clock + +Example: + +pxp at 21cc000 { + compatible = "fsl,imx6ull-pxp"; + reg = <0x021cc000 0x4000>; + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "axi"; + clocks = <&clks IMX6UL_CLK_PXP>; +};
Signature · 1 line
2.18.0
PATCH v3 1/4 dt-bindings: media: Add i.MX Pixel Pipeline binding
Hi Philipp,
Quoted 19 lines · Philipp Zabel
Add DT binding documentation for the Pixel Pipeline (PXP) found on various NXP i.MX SoCs.
Signed-off-by Philipp Zabel <[email protected]>Reviewed-by Rob Herring <[email protected]>---
No changes since v2.--- .../devicetree/bindings/media/fsl-pxp.txt | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/fsl-pxp.txtDocumentation/devicetree/bindings/media/fsl-pxp.txt new file +1
-0@@ -0,0 +1,26 @@ +Freescale Pixel Pipeline
Documentation/devicetree/bindings/media/fsl-pxp.txt line 11
Quoted 10 lines
Documentation/devicetree/bindings/media/fsl-pxp.txt new file +10
-0+======================== + +The Pixel Pipeline (PXP) is a memory-to-memory graphics processing engine +that supports scaling, colorspace conversion, alpha blending, rotation, and +pixel conversion via lookup table. Different versions are present on various +i.MX SoCs from i.MX23 to i.MX7. + +Required properties: +- compatible: should be "fsl,<soc>-pxp", where SoC can be one of imx23, imx28, + imx6dl, imx6sl, imx6ul, imx6sx, imx6ull, or imx7d.
Is imx6q also compatible ?
Best regards
Philippe
Signature · 1 line
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles
PATCH v3 1/4 dt-bindings: media: Add i.MX Pixel Pipeline binding
Hi Philippe,
On Thu, 2018-09-06 at 12:36 +0200, Philippe De Muyter wrote:
[...]
Quoted 16 lines
Quoted 1 line
---
/dev/null+++
b/Documentation/devicetree/bindings/media/fsl-pxp.txtDocumentation/devicetree/bindings/media/fsl-pxp.txt line 11
Quoted 12 lines
Documentation/devicetree/bindings/media/fsl-pxp.txt new file +11
-0@@ -0,0 +1,26 @@ +Freescale Pixel Pipeline +======================== + +The Pixel Pipeline (PXP) is a memory-to-memory graphics processing engine +that supports scaling, colorspace conversion, alpha blending, rotation, and +pixel conversion via lookup table. Different versions are present on various +i.MX SoCs from i.MX23 to i.MX7. + +Required properties: +- compatible: should be "fsl,<soc>-pxp", where SoC can be one of imx23, imx28, + imx6dl, imx6sl, imx6ul, imx6sx, imx6ull, or imx7d.Is imx6q also compatible ?
There is no pixel pipeline on i.MX6Q. It has the IPU image converter that can be used for scaling and colorspace conversion instead [1].
[1] https://patchwork.linuxtv.org/patch/51045/
regards
Philipp
PATCH v3 2/4 ARM: dts: imx6ull: add pxp support
In reply to Philipp ZabelAdd the device node for the i.MX6ULL Pixel Pipeline (PXP).
---
No changes since v2.
--- arch/arm/boot/dts/imx6ul.dtsi | 8 ++++++++ arch/arm/boot/dts/imx6ull.dtsi | 6 ++++++ 2 files changed, 14 insertions(+)
arch/arm/boot/dts/imx6ul.dtsi +8 -0
@@ -945,6 +945,14 @@ status = "disabled"; }; + pxp: pxp at 21cc000 { + compatible = "fsl,imx6ul-pxp"; + reg = <0x021cc000 0x4000>; + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "axi"; + clocks = <&clks IMX6UL_CLK_PXP>; + }; + qspi: qspi at 21e0000 { #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/imx6ull.dtsi +6 -0
@@ -57,3 +57,9 @@ }; }; }; + +&pxp { + compatible = "fsl,imx6ull-pxp"; + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>; +};
Signature · 1 line
2.18.0
PATCH v3 3/4 media: imx-pxp: add i.MX Pixel Pipeline driver
In reply to Philipp ZabelAdd a V4L2 mem-to-mem scaler/CSC driver for the Pixel Pipeline (PXP) version found on i.MX6ULL SoCs. A similar variant is used on i.MX7D.
Since this driver only uses the legacy pipeline, it should be reasonably easy to extend it to work with the older PXP versions found on i.MX6UL, i.MX6SX, i.MX6SL, i.MX28, and i.MX23.
The driver supports scaling and colorspace conversion. There is currently no support for rotation, alpha-blending, and the LUTs.
---
Changes since v2:
- fix Kconfig whitespace
- remove unused defines
- fix video_unregister_device/v4l2_m2m_release order in pxp_remove
- use GPL-2.0+ instead of GPL-2.0-or-later SPDX license identifer
- remove pxp_default_ycbcr_enc/quantization, always map to default encoding/quantization
- rename pxp_fixup_colorimetry to pxp_fixup_colorimetry_cap
--- drivers/media/platform/Kconfig | 9 + drivers/media/platform/Makefile | 2 + drivers/media/platform/imx-pxp.c | 1752 ++++++++++++++++++++++++++++++ drivers/media/platform/imx-pxp.h | 1685 ++++++++++++++++++++++++++++ 4 files changed, 3448 insertions(+) create mode 100644 drivers/media/platform/imx-pxp.c create mode 100644 drivers/media/platform/imx-pxp.h
drivers/media/platform/Kconfig +9 -0
@@ -181,6 +181,15 @@ config VIDEO_CODA config VIDEO_IMX_VDOA def_tristate VIDEO_CODA if SOC_IMX6Q || COMPILE_TEST +config VIDEO_IMX_PXP + tristate "i.MX Pixel Pipeline (PXP)" + depends on VIDEO_DEV && VIDEO_V4L2 && (ARCH_MXC || COMPILE_TEST) + select VIDEOBUF2_DMA_CONTIG + select V4L2_MEM2MEM_DEV + help + The i.MX Pixel Pipeline is a memory-to-memory engine for scaling, + color space conversion, and rotation. + config VIDEO_MEDIATEK_JPEG tristate "Mediatek JPEG Codec driver" depends on MTK_IOMMU_V1 || COMPILE_TEST
drivers/media/platform/Makefile +2 -0
@@ -25,6 +25,8 @@ obj-$(CONFIG_VIDEO_TI_CAL) += ti-vpe/ obj-$(CONFIG_VIDEO_MX2_EMMAPRP) += mx2_emmaprp.o obj-$(CONFIG_VIDEO_CODA) += coda/ +obj-$(CONFIG_VIDEO_IMX_PXP) += imx-pxp.o + obj-$(CONFIG_VIDEO_SH_VEU) += sh_veu.o obj-$(CONFIG_CEC_GPIO) += cec-gpio/
drivers/media/platform/imx-pxp.c new file +1752 -0
1,752 lines not on this page · raw message
drivers/media/platform/imx-pxp.h new file +1685 -0
1,225 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.18.0
Part of the diff is not shown here. View the raw message.
PATCH v3 4/4 MAINTAINERS: add entry for i.MX PXP media mem2mem driver
In reply to Philipp Zabel--- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+)
MAINTAINERS +7 -0
@@ -8994,6 +8994,13 @@ F: drivers/staging/media/imx/ F: include/linux/imx-media.h F: include/media/imx.h +MEDIA DRIVER FOR FREESCALE IMX PXP +M: Philipp Zabel <[email protected]> +L: linux-media at vger.kernel.org +T: git git://linuxtv.org/media_tree.git +S: Maintained +F: drivers/media/platform/imx-pxp.[ch] + MEDIA DRIVERS FOR HELENE M: Abylay Ospan <[email protected]> L: linux-media at vger.kernel.org
Signature · 1 line
2.18.0