From 24d62400347506a13f863b4cfa84c4c43ff27767 Mon Sep 17 00:00:00 2001 From: Liu Ying Date: Wed, 3 Apr 2019 15:06:12 +0800 Subject: [PATCH] MLK-21378-3 gpu: imx: Add imx8_pc support Fast-forward imx8_pc driver from imx_4.14.y. Signed-off-by: Liu Ying --- .../bindings/display/imx/fsl-imx-drm.txt | 16 ++ drivers/gpu/imx/Kconfig | 5 + drivers/gpu/imx/Makefile | 1 + drivers/gpu/imx/imx8_pc.c | 218 ++++++++++++++++++ include/video/imx8-pc.h | 33 +++ 5 files changed, 273 insertions(+) create mode 100644 drivers/gpu/imx/imx8_pc.c create mode 100644 include/video/imx8-pc.h diff --git a/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt index 594e931b09e2..681da9b42cd4 100644 --- a/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt @@ -226,6 +226,22 @@ dcss_drm: dcss@0x32e00000 { }; }; +Freescale i.MX8 PC (Pixel Combiner) +============================================= +Required properties: +- compatible: should be "fsl,-pixel-combiner" +- reg: should be register base and length as documented in the + datasheet +- power-domains: phandle pointing to power domain + +example: + +pixel-combiner@56020000 { + compatible = "fsl,imx8qm-pixel-combiner"; + reg = <0x0 0x56020000 0x0 0x10000>; + power-domains = <&pd_dc0>; +}; + Freescale i.MX8 PRG (Prefetch Resolve Gasket) ============================================= Required properties: diff --git a/drivers/gpu/imx/Kconfig b/drivers/gpu/imx/Kconfig index 589631d44519..f3184aec15d3 100644 --- a/drivers/gpu/imx/Kconfig +++ b/drivers/gpu/imx/Kconfig @@ -1,3 +1,8 @@ +config IMX8_PC + tristate + default y if IMX_DPU_CORE=y + default m if IMX_DPU_CORE=m + config IMX8_PRG tristate default y if IMX_DPU_CORE=y diff --git a/drivers/gpu/imx/Makefile b/drivers/gpu/imx/Makefile index 3c4310858e3b..37701682e5b4 100644 --- a/drivers/gpu/imx/Makefile +++ b/drivers/gpu/imx/Makefile @@ -1,3 +1,4 @@ +obj-$(CONFIG_IMX8_PC) += imx8_pc.o obj-$(CONFIG_IMX8_PRG) += imx8_prg.o obj-$(CONFIG_IMX8_DPRC) += imx8_dprc.o diff --git a/drivers/gpu/imx/imx8_pc.c b/drivers/gpu/imx/imx8_pc.c new file mode 100644 index 000000000000..73b3b4bc269d --- /dev/null +++ b/drivers/gpu/imx/imx8_pc.c @@ -0,0 +1,218 @@ +/* + * Copyright 2018-2019 NXP + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ +#include +#include +#include +#include +#include +#include