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

gpu: ipu-v3: don't depend on DRM being enabled

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>

authored by

Lucas Stach and committed by
Philipp Zabel
30310c83 7d5ed292

+9 -2
+5 -1
drivers/gpu/ipu-v3/Makefile
··· 2 2 3 3 imx-ipu-v3-objs := ipu-common.o ipu-cpmem.o ipu-csi.o ipu-dc.o ipu-di.o \ 4 4 ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-image-convert.o \ 5 - ipu-pre.o ipu-prg.o ipu-smfc.o ipu-vdi.o 5 + ipu-smfc.o ipu-vdi.o 6 + 7 + ifdef CONFIG_DRM 8 + imx-ipu-v3-objs += ipu-pre.o ipu-prg.o 9 + endif
+4 -1
drivers/gpu/ipu-v3/ipu-common.c
··· 1401 1401 1402 1402 ipu->id = of_alias_get_id(np, "ipu"); 1403 1403 1404 - if (of_device_is_compatible(np, "fsl,imx6qp-ipu")) { 1404 + if (of_device_is_compatible(np, "fsl,imx6qp-ipu") && 1405 + IS_ENABLED(CONFIG_DRM)) { 1405 1406 ipu->prg_priv = ipu_prg_lookup_by_phandle(&pdev->dev, 1406 1407 "fsl,prg", ipu->id); 1407 1408 if (!ipu->prg_priv) ··· 1539 1538 }; 1540 1539 1541 1540 static struct platform_driver * const drivers[] = { 1541 + #if IS_ENABLED(CONFIG_DRM) 1542 1542 &ipu_pre_drv, 1543 1543 &ipu_prg_drv, 1544 + #endif 1544 1545 &imx_ipu_driver, 1545 1546 }; 1546 1547