Skip to content

Commit

Permalink
gpu: ipu-v3: don't depend on DRM being enabled
Browse files Browse the repository at this point in the history
The PRE/PRG drivers, which need the DRM infrastructure, are only used
from the output path, so we skip building them into the ipu-v3 driver
if CONFIG_DRM is not enabled.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
  • Loading branch information
Lucas Stach authored and Philipp Zabel committed Apr 4, 2017
1 parent 7d5ed29 commit 30310c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion drivers/gpu/ipu-v3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o

imx-ipu-v3-objs := ipu-common.o ipu-cpmem.o ipu-csi.o ipu-dc.o ipu-di.o \
ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-image-convert.o \
ipu-pre.o ipu-prg.o ipu-smfc.o ipu-vdi.o
ipu-smfc.o ipu-vdi.o

ifdef CONFIG_DRM
imx-ipu-v3-objs += ipu-pre.o ipu-prg.o
endif
5 changes: 4 additions & 1 deletion drivers/gpu/ipu-v3/ipu-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,8 @@ static int ipu_probe(struct platform_device *pdev)

ipu->id = of_alias_get_id(np, "ipu");

if (of_device_is_compatible(np, "fsl,imx6qp-ipu")) {
if (of_device_is_compatible(np, "fsl,imx6qp-ipu") &&
IS_ENABLED(CONFIG_DRM)) {
ipu->prg_priv = ipu_prg_lookup_by_phandle(&pdev->dev,
"fsl,prg", ipu->id);
if (!ipu->prg_priv)
Expand Down Expand Up @@ -1538,8 +1539,10 @@ static struct platform_driver imx_ipu_driver = {
};

static struct platform_driver * const drivers[] = {
#if IS_ENABLED(CONFIG_DRM)
&ipu_pre_drv,
&ipu_prg_drv,
#endif
&imx_ipu_driver,
};

Expand Down

0 comments on commit 30310c8

Please sign in to comment.