aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2013-09-30 10:13:39 -0400
committerPhilipp Zabel <p.zabel@pengutronix.de>2014-06-04 05:06:52 -0400
commit39b9004d1f626b88b775c7655d3f286e135dfec6 (patch)
tree3d439afd8cff80424b05b78aebe00e23b0ed6b7f
parentd1db0eea852497762cab43b905b879dfcd3b8987 (diff)
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>
-rw-r--r--drivers/gpu/Makefile1
-rw-r--r--drivers/gpu/ipu-v3/Kconfig7
-rw-r--r--drivers/gpu/ipu-v3/Makefile (renamed from drivers/staging/imx-drm/ipu-v3/Makefile)2
-rw-r--r--drivers/gpu/ipu-v3/ipu-common.c (renamed from drivers/staging/imx-drm/ipu-v3/ipu-common.c)2
-rw-r--r--drivers/gpu/ipu-v3/ipu-dc.c (renamed from drivers/staging/imx-drm/ipu-v3/ipu-dc.c)3
-rw-r--r--drivers/gpu/ipu-v3/ipu-di.c (renamed from drivers/staging/imx-drm/ipu-v3/ipu-di.c)2
-rw-r--r--drivers/gpu/ipu-v3/ipu-dmfc.c (renamed from drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c)2
-rw-r--r--drivers/gpu/ipu-v3/ipu-dp.c (renamed from drivers/staging/imx-drm/ipu-v3/ipu-dp.c)2
-rw-r--r--drivers/gpu/ipu-v3/ipu-prv.h (renamed from drivers/staging/imx-drm/ipu-v3/ipu-prv.h)2
-rw-r--r--drivers/staging/imx-drm/Kconfig11
-rw-r--r--drivers/staging/imx-drm/Makefile1
-rw-r--r--drivers/staging/imx-drm/imx-hdmi.c2
-rw-r--r--drivers/staging/imx-drm/imx-tve.c2
-rw-r--r--drivers/staging/imx-drm/ipuv3-crtc.c2
-rw-r--r--drivers/staging/imx-drm/ipuv3-plane.c2
-rw-r--r--drivers/video/Kconfig1
-rw-r--r--include/video/imx-ipu-v3.h (renamed from drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h)0
17 files changed, 21 insertions, 23 deletions
diff --git a/drivers/gpu/Makefile b/drivers/gpu/Makefile
index d8a22c2a579d..70da9eb52a42 100644
--- a/drivers/gpu/Makefile
+++ b/drivers/gpu/Makefile
@@ -1,2 +1,3 @@
1obj-y += drm/ vga/ 1obj-y += drm/ vga/
2obj-$(CONFIG_TEGRA_HOST1X) += host1x/ 2obj-$(CONFIG_TEGRA_HOST1X) += host1x/
3obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/
diff --git a/drivers/gpu/ipu-v3/Kconfig b/drivers/gpu/ipu-v3/Kconfig
new file mode 100644
index 000000000000..2f228a2f2a48
--- /dev/null
+++ b/drivers/gpu/ipu-v3/Kconfig
@@ -0,0 +1,7 @@
1config 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.
diff --git a/drivers/staging/imx-drm/ipu-v3/Makefile b/drivers/gpu/ipu-v3/Makefile
index 28ed72e98a96..d21cc37d0498 100644
--- a/drivers/staging/imx-drm/ipu-v3/Makefile
+++ b/drivers/gpu/ipu-v3/Makefile
@@ -1,3 +1,3 @@
1obj-$(CONFIG_DRM_IMX_IPUV3_CORE) += imx-ipu-v3.o 1obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o
2 2
3imx-ipu-v3-objs := ipu-common.o ipu-dc.o ipu-di.o ipu-dp.o ipu-dmfc.o 3imx-ipu-v3-objs := ipu-common.o ipu-dc.o ipu-di.o ipu-dp.o ipu-dmfc.o
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index ca85d3d70ae3..7e1f614e7fbc 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -31,7 +31,7 @@
31 31
32#include <drm/drm_fourcc.h> 32#include <drm/drm_fourcc.h>
33 33
34#include "imx-ipu-v3.h" 34#include <video/imx-ipu-v3.h>
35#include "ipu-prv.h" 35#include "ipu-prv.h"
36 36
37static inline u32 ipu_cm_read(struct ipu_soc *ipu, unsigned offset) 37static inline u32 ipu_cm_read(struct ipu_soc *ipu, unsigned offset)
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/gpu/ipu-v3/ipu-dc.c
index d5de8bb5c803..9f1e5efa3acf 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c
+++ b/drivers/gpu/ipu-v3/ipu-dc.c
@@ -20,8 +20,7 @@
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/io.h> 21#include <linux/io.h>
22 22
23#include "../imx-drm.h" 23#include <video/imx-ipu-v3.h>
24#include "imx-ipu-v3.h"
25#include "ipu-prv.h" 24#include "ipu-prv.h"
26 25
27#define DC_MAP_CONF_PTR(n) (0x108 + ((n) & ~0x1) * 2) 26#define DC_MAP_CONF_PTR(n) (0x108 + ((n) & ~0x1) * 2)
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-di.c b/drivers/gpu/ipu-v3/ipu-di.c
index 82a9ebad697c..42e60b447ae7 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-di.c
+++ b/drivers/gpu/ipu-v3/ipu-di.c
@@ -20,7 +20,7 @@
20#include <linux/err.h> 20#include <linux/err.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22 22
23#include "imx-ipu-v3.h" 23#include <video/imx-ipu-v3.h>
24#include "ipu-prv.h" 24#include "ipu-prv.h"
25 25
26struct ipu_di { 26struct ipu_di {
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c b/drivers/gpu/ipu-v3/ipu-dmfc.c
index 45213017fa4b..e1493ab36ca2 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c
+++ b/drivers/gpu/ipu-v3/ipu-dmfc.c
@@ -17,7 +17,7 @@
17#include <linux/errno.h> 17#include <linux/errno.h>
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include "imx-ipu-v3.h" 20#include <video/imx-ipu-v3.h>
21#include "ipu-prv.h" 21#include "ipu-prv.h"
22 22
23#define DMFC_RD_CHAN 0x0000 23#define DMFC_RD_CHAN 0x0000
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dp.c b/drivers/gpu/ipu-v3/ipu-dp.c
index 58f87c8d7c07..e17fa3f7c4b6 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-dp.c
+++ b/drivers/gpu/ipu-v3/ipu-dp.c
@@ -19,7 +19,7 @@
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/err.h> 20#include <linux/err.h>
21 21
22#include "imx-ipu-v3.h" 22#include <video/imx-ipu-v3.h>
23#include "ipu-prv.h" 23#include "ipu-prv.h"
24 24
25#define DP_SYNC 0 25#define DP_SYNC 0
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-prv.h b/drivers/gpu/ipu-v3/ipu-prv.h
index 4df00501adc2..5cb075fdd48c 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-prv.h
+++ b/drivers/gpu/ipu-v3/ipu-prv.h
@@ -22,7 +22,7 @@ struct ipu_soc;
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24 24
25#include "imx-ipu-v3.h" 25#include <video/imx-ipu-v3.h>
26 26
27#define IPUV3_CHANNEL_CSI0 0 27#define IPUV3_CHANNEL_CSI0 0
28#define IPUV3_CHANNEL_CSI1 1 28#define IPUV3_CHANNEL_CSI1 1
diff --git a/drivers/staging/imx-drm/Kconfig b/drivers/staging/imx-drm/Kconfig
index c6e8ba7b3e4e..82fb758a29bc 100644
--- a/drivers/staging/imx-drm/Kconfig
+++ b/drivers/staging/imx-drm/Kconfig
@@ -39,19 +39,10 @@ config DRM_IMX_LDB
39 Choose this to enable the internal LVDS Display Bridge (LDB) 39 Choose this to enable the internal LVDS Display Bridge (LDB)
40 found on i.MX53 and i.MX6 processors. 40 found on i.MX53 and i.MX6 processors.
41 41
42config 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
51config DRM_IMX_IPUV3 42config DRM_IMX_IPUV3
52 tristate "DRM Support for i.MX IPUv3" 43 tristate "DRM Support for i.MX IPUv3"
53 depends on DRM_IMX 44 depends on DRM_IMX
54 depends on DRM_IMX_IPUV3_CORE 45 depends on IMX_IPUV3_CORE
55 help 46 help
56 Choose this if you have a i.MX5 or i.MX6 processor. 47 Choose this if you have a i.MX5 or i.MX6 processor.
57 48
diff --git a/drivers/staging/imx-drm/Makefile b/drivers/staging/imx-drm/Makefile
index 129e3a3f59f1..582c438d8cbd 100644
--- a/drivers/staging/imx-drm/Makefile
+++ b/drivers/staging/imx-drm/Makefile
@@ -6,7 +6,6 @@ obj-$(CONFIG_DRM_IMX) += imxdrm.o
6obj-$(CONFIG_DRM_IMX_PARALLEL_DISPLAY) += parallel-display.o 6obj-$(CONFIG_DRM_IMX_PARALLEL_DISPLAY) += parallel-display.o
7obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o 7obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o
8obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o 8obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o
9obj-$(CONFIG_DRM_IMX_IPUV3_CORE) += ipu-v3/
10 9
11imx-ipuv3-crtc-objs := ipuv3-crtc.o ipuv3-plane.o 10imx-ipuv3-crtc-objs := ipuv3-crtc.o ipuv3-plane.o
12obj-$(CONFIG_DRM_IMX_IPUV3) += imx-ipuv3-crtc.o 11obj-$(CONFIG_DRM_IMX_IPUV3) += imx-ipuv3-crtc.o
diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c
index d47dedd2cdb4..461f224d26ab 100644
--- a/drivers/staging/imx-drm/imx-hdmi.c
+++ b/drivers/staging/imx-drm/imx-hdmi.c
@@ -27,8 +27,8 @@
27#include <drm/drm_crtc_helper.h> 27#include <drm/drm_crtc_helper.h>
28#include <drm/drm_edid.h> 28#include <drm/drm_edid.h>
29#include <drm/drm_encoder_slave.h> 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#include "imx-hdmi.h" 32#include "imx-hdmi.h"
33#include "imx-drm.h" 33#include "imx-drm.h"
34 34
diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
index 575533f4fd64..5bcb40516656 100644
--- a/drivers/staging/imx-drm/imx-tve.c
+++ b/drivers/staging/imx-drm/imx-tve.c
@@ -30,8 +30,8 @@
30#include <drm/drmP.h> 30#include <drm/drmP.h>
31#include <drm/drm_fb_helper.h> 31#include <drm/drm_fb_helper.h>
32#include <drm/drm_crtc_helper.h> 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#include "imx-drm.h" 35#include "imx-drm.h"
36 36
37#define TVE_COM_CONF_REG 0x00 37#define TVE_COM_CONF_REG 0x00
diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c
index c48f640db006..d6913d2e6f77 100644
--- a/drivers/staging/imx-drm/ipuv3-crtc.c
+++ b/drivers/staging/imx-drm/ipuv3-crtc.c
@@ -30,7 +30,7 @@
30#include <drm/drm_gem_cma_helper.h> 30#include <drm/drm_gem_cma_helper.h>
31#include <drm/drm_fb_cma_helper.h> 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#include "imx-drm.h" 34#include "imx-drm.h"
35#include "ipuv3-plane.h" 35#include "ipuv3-plane.h"
36 36
diff --git a/drivers/staging/imx-drm/ipuv3-plane.c b/drivers/staging/imx-drm/ipuv3-plane.c
index 27a8d735dae0..02b4486435a0 100644
--- a/drivers/staging/imx-drm/ipuv3-plane.c
+++ b/drivers/staging/imx-drm/ipuv3-plane.c
@@ -17,7 +17,7 @@
17#include <drm/drm_fb_cma_helper.h> 17#include <drm/drm_fb_cma_helper.h>
18#include <drm/drm_gem_cma_helper.h> 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#include "ipuv3-plane.h" 21#include "ipuv3-plane.h"
22 22
23#define to_ipu_plane(x) container_of(x, struct ipu_plane, base) 23#define to_ipu_plane(x) container_of(x, struct ipu_plane, base)
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index c7b4f0f927b1..8bf495ffb020 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -20,6 +20,7 @@ source "drivers/char/agp/Kconfig"
20source "drivers/gpu/vga/Kconfig" 20source "drivers/gpu/vga/Kconfig"
21 21
22source "drivers/gpu/host1x/Kconfig" 22source "drivers/gpu/host1x/Kconfig"
23source "drivers/gpu/ipu-v3/Kconfig"
23 24
24menu "Direct Rendering Manager" 25menu "Direct Rendering Manager"
25source "drivers/gpu/drm/Kconfig" 26source "drivers/gpu/drm/Kconfig"
diff --git a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
index c4d14ead5837..c4d14ead5837 100644
--- a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h
+++ b/include/video/imx-ipu-v3.h