Skip to content

Commit

Permalink
gpu: ipu-v3: Move i.MX IPUv3 core driver out of staging
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philipp Zabel committed Jun 4, 2014
1 parent d1db0ee commit 39b9004
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 23 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
obj-y += drm/ vga/
obj-$(CONFIG_TEGRA_HOST1X) += host1x/
obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/
7 changes: 7 additions & 0 deletions drivers/gpu/ipu-v3/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
config IMX_IPUV3_CORE
tristate "IPUv3 core support"
depends on SOC_IMX5 || SOC_IMX6Q || SOC_IMX6SL || ARCH_MULTIPLATFORM
depends on RESET_CONTROLLER
help
Choose this if you have a i.MX5/6 system and want to use the Image
Processing Unit. This option only enables IPU base support.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
obj-$(CONFIG_DRM_IMX_IPUV3_CORE) += imx-ipu-v3.o
obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o

imx-ipu-v3-objs := ipu-common.o ipu-dc.o ipu-di.o ipu-dp.o ipu-dmfc.o
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include <drm/drm_fourcc.h>

#include "imx-ipu-v3.h"
#include <video/imx-ipu-v3.h>
#include "ipu-prv.h"

static inline u32 ipu_cm_read(struct ipu_soc *ipu, unsigned offset)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
#include <linux/delay.h>
#include <linux/io.h>

#include "../imx-drm.h"
#include "imx-ipu-v3.h"
#include <video/imx-ipu-v3.h>
#include "ipu-prv.h"

#define DC_MAP_CONF_PTR(n) (0x108 + ((n) & ~0x1) * 2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <linux/err.h>
#include <linux/platform_device.h>

#include "imx-ipu-v3.h"
#include <video/imx-ipu-v3.h>
#include "ipu-prv.h"

struct ipu_di {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <linux/errno.h>
#include <linux/io.h>

#include "imx-ipu-v3.h"
#include <video/imx-ipu-v3.h>
#include "ipu-prv.h"

#define DMFC_RD_CHAN 0x0000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <linux/io.h>
#include <linux/err.h>

#include "imx-ipu-v3.h"
#include <video/imx-ipu-v3.h>
#include "ipu-prv.h"

#define DP_SYNC 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct ipu_soc;
#include <linux/clk.h>
#include <linux/platform_device.h>

#include "imx-ipu-v3.h"
#include <video/imx-ipu-v3.h>

#define IPUV3_CHANNEL_CSI0 0
#define IPUV3_CHANNEL_CSI1 1
Expand Down
11 changes: 1 addition & 10 deletions drivers/staging/imx-drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,10 @@ config DRM_IMX_LDB
Choose this to enable the internal LVDS Display Bridge (LDB)
found on i.MX53 and i.MX6 processors.

config DRM_IMX_IPUV3_CORE
tristate "IPUv3 core support"
depends on DRM_IMX
depends on RESET_CONTROLLER
help
Choose this if you have a i.MX5/6 system and want
to use the IPU. This option only enables IPU base
support.

config DRM_IMX_IPUV3
tristate "DRM Support for i.MX IPUv3"
depends on DRM_IMX
depends on DRM_IMX_IPUV3_CORE
depends on IMX_IPUV3_CORE
help
Choose this if you have a i.MX5 or i.MX6 processor.

Expand Down
1 change: 0 additions & 1 deletion drivers/staging/imx-drm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ obj-$(CONFIG_DRM_IMX) += imxdrm.o
obj-$(CONFIG_DRM_IMX_PARALLEL_DISPLAY) += parallel-display.o
obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o
obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o
obj-$(CONFIG_DRM_IMX_IPUV3_CORE) += ipu-v3/

imx-ipuv3-crtc-objs := ipuv3-crtc.o ipuv3-plane.o
obj-$(CONFIG_DRM_IMX_IPUV3) += imx-ipuv3-crtc.o
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/imx-drm/imx-hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include <drm/drm_crtc_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_encoder_slave.h>
#include <video/imx-ipu-v3.h>

#include "ipu-v3/imx-ipu-v3.h"
#include "imx-hdmi.h"
#include "imx-drm.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/imx-drm/imx-tve.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#include <drm/drmP.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_crtc_helper.h>
#include <video/imx-ipu-v3.h>

#include "ipu-v3/imx-ipu-v3.h"
#include "imx-drm.h"

#define TVE_COM_CONF_REG 0x00
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/imx-drm/ipuv3-crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <drm/drm_gem_cma_helper.h>
#include <drm/drm_fb_cma_helper.h>

#include "ipu-v3/imx-ipu-v3.h"
#include <video/imx-ipu-v3.h>
#include "imx-drm.h"
#include "ipuv3-plane.h"

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/imx-drm/ipuv3-plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <drm/drm_fb_cma_helper.h>
#include <drm/drm_gem_cma_helper.h>

#include "ipu-v3/imx-ipu-v3.h"
#include "video/imx-ipu-v3.h"
#include "ipuv3-plane.h"

#define to_ipu_plane(x) container_of(x, struct ipu_plane, base)
Expand Down
1 change: 1 addition & 0 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ source "drivers/char/agp/Kconfig"
source "drivers/gpu/vga/Kconfig"

source "drivers/gpu/host1x/Kconfig"
source "drivers/gpu/ipu-v3/Kconfig"

menu "Direct Rendering Manager"
source "drivers/gpu/drm/Kconfig"
Expand Down
File renamed without changes.

0 comments on commit 39b9004

Please sign in to comment.