Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpu: ipu-v3: Move i.MX IPUv3 core driver out of staging

The i.MX Image Processing Unit (IPU) contains a number of image processing
blocks that sit right in the middle between DRM and V4L2. Some of the modules,
such as Display Controller, Processor, and Interface (DC, DP, DI) or CMOS
Sensor Interface (CSI) and their FIFOs could be assigned to either framework,
but others, such as the dma controller (IDMAC) and image converter (IC) can
be used by both.
The IPUv3 core driver provides an internal API to access the modules, to be
used by both DRM and V4L2 IPUv3 drivers.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+21 -23
+1
drivers/gpu/Makefile
··· 1 1 obj-y += drm/ vga/ 2 2 obj-$(CONFIG_TEGRA_HOST1X) += host1x/ 3 + obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/
+7
drivers/gpu/ipu-v3/Kconfig
··· 1 + config IMX_IPUV3_CORE 2 + tristate "IPUv3 core support" 3 + depends on SOC_IMX5 || SOC_IMX6Q || SOC_IMX6SL || ARCH_MULTIPLATFORM 4 + depends on RESET_CONTROLLER 5 + help 6 + Choose this if you have a i.MX5/6 system and want to use the Image 7 + Processing Unit. This option only enables IPU base support.
+1 -10
drivers/staging/imx-drm/Kconfig
··· 39 39 Choose this to enable the internal LVDS Display Bridge (LDB) 40 40 found on i.MX53 and i.MX6 processors. 41 41 42 - config DRM_IMX_IPUV3_CORE 43 - tristate "IPUv3 core support" 44 - depends on DRM_IMX 45 - depends on RESET_CONTROLLER 46 - help 47 - Choose this if you have a i.MX5/6 system and want 48 - to use the IPU. This option only enables IPU base 49 - support. 50 - 51 42 config DRM_IMX_IPUV3 52 43 tristate "DRM Support for i.MX IPUv3" 53 44 depends on DRM_IMX 54 - depends on DRM_IMX_IPUV3_CORE 45 + depends on IMX_IPUV3_CORE 55 46 help 56 47 Choose this if you have a i.MX5 or i.MX6 processor. 57 48
-1
drivers/staging/imx-drm/Makefile
··· 6 6 obj-$(CONFIG_DRM_IMX_PARALLEL_DISPLAY) += parallel-display.o 7 7 obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o 8 8 obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o 9 - obj-$(CONFIG_DRM_IMX_IPUV3_CORE) += ipu-v3/ 10 9 11 10 imx-ipuv3-crtc-objs := ipuv3-crtc.o ipuv3-plane.o 12 11 obj-$(CONFIG_DRM_IMX_IPUV3) += imx-ipuv3-crtc.o
+1 -1
drivers/staging/imx-drm/imx-hdmi.c
··· 27 27 #include <drm/drm_crtc_helper.h> 28 28 #include <drm/drm_edid.h> 29 29 #include <drm/drm_encoder_slave.h> 30 + #include <video/imx-ipu-v3.h> 30 31 31 - #include "ipu-v3/imx-ipu-v3.h" 32 32 #include "imx-hdmi.h" 33 33 #include "imx-drm.h" 34 34
+1 -1
drivers/staging/imx-drm/imx-tve.c
··· 30 30 #include <drm/drmP.h> 31 31 #include <drm/drm_fb_helper.h> 32 32 #include <drm/drm_crtc_helper.h> 33 + #include <video/imx-ipu-v3.h> 33 34 34 - #include "ipu-v3/imx-ipu-v3.h" 35 35 #include "imx-drm.h" 36 36 37 37 #define TVE_COM_CONF_REG 0x00
+1 -1
drivers/staging/imx-drm/ipu-v3/Makefile drivers/gpu/ipu-v3/Makefile
··· 1 - obj-$(CONFIG_DRM_IMX_IPUV3_CORE) += imx-ipu-v3.o 1 + obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o 2 2 3 3 imx-ipu-v3-objs := ipu-common.o ipu-dc.o ipu-di.o ipu-dp.o ipu-dmfc.o
drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h include/video/imx-ipu-v3.h
+1 -1
drivers/staging/imx-drm/ipu-v3/ipu-common.c drivers/gpu/ipu-v3/ipu-common.c
··· 31 31 32 32 #include <drm/drm_fourcc.h> 33 33 34 - #include "imx-ipu-v3.h" 34 + #include <video/imx-ipu-v3.h> 35 35 #include "ipu-prv.h" 36 36 37 37 static inline u32 ipu_cm_read(struct ipu_soc *ipu, unsigned offset)
+1 -2
drivers/staging/imx-drm/ipu-v3/ipu-dc.c drivers/gpu/ipu-v3/ipu-dc.c
··· 20 20 #include <linux/delay.h> 21 21 #include <linux/io.h> 22 22 23 - #include "../imx-drm.h" 24 - #include "imx-ipu-v3.h" 23 + #include <video/imx-ipu-v3.h> 25 24 #include "ipu-prv.h" 26 25 27 26 #define DC_MAP_CONF_PTR(n) (0x108 + ((n) & ~0x1) * 2)
+1 -1
drivers/staging/imx-drm/ipu-v3/ipu-di.c drivers/gpu/ipu-v3/ipu-di.c
··· 20 20 #include <linux/err.h> 21 21 #include <linux/platform_device.h> 22 22 23 - #include "imx-ipu-v3.h" 23 + #include <video/imx-ipu-v3.h> 24 24 #include "ipu-prv.h" 25 25 26 26 struct ipu_di {
+1 -1
drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c drivers/gpu/ipu-v3/ipu-dmfc.c
··· 17 17 #include <linux/errno.h> 18 18 #include <linux/io.h> 19 19 20 - #include "imx-ipu-v3.h" 20 + #include <video/imx-ipu-v3.h> 21 21 #include "ipu-prv.h" 22 22 23 23 #define DMFC_RD_CHAN 0x0000
+1 -1
drivers/staging/imx-drm/ipu-v3/ipu-dp.c drivers/gpu/ipu-v3/ipu-dp.c
··· 19 19 #include <linux/io.h> 20 20 #include <linux/err.h> 21 21 22 - #include "imx-ipu-v3.h" 22 + #include <video/imx-ipu-v3.h> 23 23 #include "ipu-prv.h" 24 24 25 25 #define DP_SYNC 0
+1 -1
drivers/staging/imx-drm/ipu-v3/ipu-prv.h drivers/gpu/ipu-v3/ipu-prv.h
··· 22 22 #include <linux/clk.h> 23 23 #include <linux/platform_device.h> 24 24 25 - #include "imx-ipu-v3.h" 25 + #include <video/imx-ipu-v3.h> 26 26 27 27 #define IPUV3_CHANNEL_CSI0 0 28 28 #define IPUV3_CHANNEL_CSI1 1
+1 -1
drivers/staging/imx-drm/ipuv3-crtc.c
··· 30 30 #include <drm/drm_gem_cma_helper.h> 31 31 #include <drm/drm_fb_cma_helper.h> 32 32 33 - #include "ipu-v3/imx-ipu-v3.h" 33 + #include <video/imx-ipu-v3.h> 34 34 #include "imx-drm.h" 35 35 #include "ipuv3-plane.h" 36 36
+1 -1
drivers/staging/imx-drm/ipuv3-plane.c
··· 17 17 #include <drm/drm_fb_cma_helper.h> 18 18 #include <drm/drm_gem_cma_helper.h> 19 19 20 - #include "ipu-v3/imx-ipu-v3.h" 20 + #include "video/imx-ipu-v3.h" 21 21 #include "ipuv3-plane.h" 22 22 23 23 #define to_ipu_plane(x) container_of(x, struct ipu_plane, base)
+1
drivers/video/Kconfig
··· 20 20 source "drivers/gpu/vga/Kconfig" 21 21 22 22 source "drivers/gpu/host1x/Kconfig" 23 + source "drivers/gpu/ipu-v3/Kconfig" 23 24 24 25 menu "Direct Rendering Manager" 25 26 source "drivers/gpu/drm/Kconfig"