diff options
author | Dave Airlie <airlied@redhat.com> | 2017-04-06 15:34:46 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-04-06 15:34:46 -0400 |
commit | 0e961332147851d16038d52323fc50e23dcbdfa3 (patch) | |
tree | 0f18a54d4f2a983ff61fb40541aee6e0aa0a4b37 | |
parent | 3eda2f5983f63c61e686efce21a8e624074c934e (diff) | |
parent | 3d1df96ad46856ce850be5ac112eab919cbe1cab (diff) |
Merge tag 'imx-drm-next-2017-04-04' of git://git.pengutronix.de/git/pza/linux into drm-next
imx-drm module/dependency changes
- The PRE/PRG drivers added an unwanted DRM dependency to the ipu-v3 driver.
Remove the dependency by conditionally disabling PRE/PRG support depending
on CONFIG_DRM.
- Merge the imx-ipuv3-crtc module into the imxdrm module. There is no reason
anymore for a separation between core drm driver and crtc/plane drivers,
especially since commit eb8c88808c83 ("drm/imx: add deferred plane
disabling"), which added a dependency on imx-ipuv3-crtc to the imxdrm
module.
* tag 'imx-drm-next-2017-04-04' of git://git.pengutronix.de/git/pza/linux:
drm/imx: merge imx-drm-core and ipuv3-crtc in one module
gpu: ipu-v3: don't depend on DRM being enabled
-rw-r--r-- | drivers/gpu/drm/imx/Kconfig | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/imx/Makefile | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/imx/imx-drm-core.c | 18 | ||||
-rw-r--r-- | drivers/gpu/drm/imx/imx-drm.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/imx/ipuv3-crtc.c | 8 | ||||
-rw-r--r-- | drivers/gpu/ipu-v3/Makefile | 6 | ||||
-rw-r--r-- | drivers/gpu/ipu-v3/ipu-common.c | 5 |
7 files changed, 30 insertions, 19 deletions
diff --git a/drivers/gpu/drm/imx/Kconfig b/drivers/gpu/drm/imx/Kconfig index f2c9ae822149..c9e439c82241 100644 --- a/drivers/gpu/drm/imx/Kconfig +++ b/drivers/gpu/drm/imx/Kconfig | |||
@@ -31,13 +31,6 @@ config DRM_IMX_LDB | |||
31 | Choose this to enable the internal LVDS Display Bridge (LDB) | 31 | Choose this to enable the internal LVDS Display Bridge (LDB) |
32 | found on i.MX53 and i.MX6 processors. | 32 | found on i.MX53 and i.MX6 processors. |
33 | 33 | ||
34 | config DRM_IMX_IPUV3 | ||
35 | tristate | ||
36 | depends on DRM_IMX | ||
37 | depends on IMX_IPUV3_CORE | ||
38 | default y if DRM_IMX=y | ||
39 | default m if DRM_IMX=m | ||
40 | |||
41 | config DRM_IMX_HDMI | 34 | config DRM_IMX_HDMI |
42 | tristate "Freescale i.MX DRM HDMI" | 35 | tristate "Freescale i.MX DRM HDMI" |
43 | select DRM_DW_HDMI | 36 | select DRM_DW_HDMI |
diff --git a/drivers/gpu/drm/imx/Makefile b/drivers/gpu/drm/imx/Makefile index f3ecd8903d97..16ecef33e008 100644 --- a/drivers/gpu/drm/imx/Makefile +++ b/drivers/gpu/drm/imx/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | imxdrm-objs := imx-drm-core.o | 2 | imxdrm-objs := imx-drm-core.o ipuv3-crtc.o ipuv3-plane.o |
3 | 3 | ||
4 | obj-$(CONFIG_DRM_IMX) += imxdrm.o | 4 | obj-$(CONFIG_DRM_IMX) += imxdrm.o |
5 | 5 | ||
@@ -7,6 +7,5 @@ obj-$(CONFIG_DRM_IMX_PARALLEL_DISPLAY) += parallel-display.o | |||
7 | obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o | 7 | obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o |
8 | obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o | 8 | obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o |
9 | 9 | ||
10 | imx-ipuv3-crtc-objs := ipuv3-crtc.o ipuv3-plane.o | ||
11 | obj-$(CONFIG_DRM_IMX_IPUV3) += imx-ipuv3-crtc.o | 10 | obj-$(CONFIG_DRM_IMX_IPUV3) += imx-ipuv3-crtc.o |
12 | obj-$(CONFIG_DRM_IMX_HDMI) += dw_hdmi-imx.o | 11 | obj-$(CONFIG_DRM_IMX_HDMI) += dw_hdmi-imx.o |
diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index 1888bf3920fc..50add2f9e250 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c | |||
@@ -422,7 +422,23 @@ static struct platform_driver imx_drm_pdrv = { | |||
422 | .of_match_table = imx_drm_dt_ids, | 422 | .of_match_table = imx_drm_dt_ids, |
423 | }, | 423 | }, |
424 | }; | 424 | }; |
425 | module_platform_driver(imx_drm_pdrv); | 425 | |
426 | static struct platform_driver * const drivers[] = { | ||
427 | &imx_drm_pdrv, | ||
428 | &ipu_drm_driver, | ||
429 | }; | ||
430 | |||
431 | static int __init imx_drm_init(void) | ||
432 | { | ||
433 | return platform_register_drivers(drivers, ARRAY_SIZE(drivers)); | ||
434 | } | ||
435 | module_init(imx_drm_init); | ||
436 | |||
437 | static void __exit imx_drm_exit(void) | ||
438 | { | ||
439 | platform_unregister_drivers(drivers, ARRAY_SIZE(drivers)); | ||
440 | } | ||
441 | module_exit(imx_drm_exit); | ||
426 | 442 | ||
427 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); | 443 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); |
428 | MODULE_DESCRIPTION("i.MX drm driver core"); | 444 | MODULE_DESCRIPTION("i.MX drm driver core"); |
diff --git a/drivers/gpu/drm/imx/imx-drm.h b/drivers/gpu/drm/imx/imx-drm.h index 295434b199db..f6dd64be9cd5 100644 --- a/drivers/gpu/drm/imx/imx-drm.h +++ b/drivers/gpu/drm/imx/imx-drm.h | |||
@@ -29,6 +29,8 @@ int imx_drm_init_drm(struct platform_device *pdev, | |||
29 | int preferred_bpp); | 29 | int preferred_bpp); |
30 | int imx_drm_exit_drm(void); | 30 | int imx_drm_exit_drm(void); |
31 | 31 | ||
32 | extern struct platform_driver ipu_drm_driver; | ||
33 | |||
32 | void imx_drm_mode_config_init(struct drm_device *drm); | 34 | void imx_drm_mode_config_init(struct drm_device *drm); |
33 | 35 | ||
34 | struct drm_gem_cma_object *imx_drm_fb_get_obj(struct drm_framebuffer *fb); | 36 | struct drm_gem_cma_object *imx_drm_fb_get_obj(struct drm_framebuffer *fb); |
diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3-crtc.c index dab9d50ffd8c..5456c15d962c 100644 --- a/drivers/gpu/drm/imx/ipuv3-crtc.c +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c | |||
@@ -465,16 +465,10 @@ static int ipu_drm_remove(struct platform_device *pdev) | |||
465 | return 0; | 465 | return 0; |
466 | } | 466 | } |
467 | 467 | ||
468 | static struct platform_driver ipu_drm_driver = { | 468 | struct platform_driver ipu_drm_driver = { |
469 | .driver = { | 469 | .driver = { |
470 | .name = "imx-ipuv3-crtc", | 470 | .name = "imx-ipuv3-crtc", |
471 | }, | 471 | }, |
472 | .probe = ipu_drm_probe, | 472 | .probe = ipu_drm_probe, |
473 | .remove = ipu_drm_remove, | 473 | .remove = ipu_drm_remove, |
474 | }; | 474 | }; |
475 | module_platform_driver(ipu_drm_driver); | ||
476 | |||
477 | MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>"); | ||
478 | MODULE_DESCRIPTION(DRIVER_DESC); | ||
479 | MODULE_LICENSE("GPL"); | ||
480 | MODULE_ALIAS("platform:imx-ipuv3-crtc"); | ||
diff --git a/drivers/gpu/ipu-v3/Makefile b/drivers/gpu/ipu-v3/Makefile index 1ab9bceee755..8cdf9e4ae772 100644 --- a/drivers/gpu/ipu-v3/Makefile +++ b/drivers/gpu/ipu-v3/Makefile | |||
@@ -2,4 +2,8 @@ obj-$(CONFIG_IMX_IPUV3_CORE) += imx-ipu-v3.o | |||
2 | 2 | ||
3 | imx-ipu-v3-objs := ipu-common.o ipu-cpmem.o ipu-csi.o ipu-dc.o ipu-di.o \ | 3 | imx-ipu-v3-objs := ipu-common.o ipu-cpmem.o ipu-csi.o ipu-dc.o ipu-di.o \ |
4 | ipu-dp.o ipu-dmfc.o ipu-ic.o ipu-image-convert.o \ | 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 | ||
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index 7aefccec31b1..16d556816b5f 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c | |||
@@ -1401,7 +1401,8 @@ static int ipu_probe(struct platform_device *pdev) | |||
1401 | 1401 | ||
1402 | ipu->id = of_alias_get_id(np, "ipu"); | 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 | ipu->prg_priv = ipu_prg_lookup_by_phandle(&pdev->dev, | 1406 | ipu->prg_priv = ipu_prg_lookup_by_phandle(&pdev->dev, |
1406 | "fsl,prg", ipu->id); | 1407 | "fsl,prg", ipu->id); |
1407 | if (!ipu->prg_priv) | 1408 | if (!ipu->prg_priv) |
@@ -1538,8 +1539,10 @@ static struct platform_driver imx_ipu_driver = { | |||
1538 | }; | 1539 | }; |
1539 | 1540 | ||
1540 | static struct platform_driver * const drivers[] = { | 1541 | static struct platform_driver * const drivers[] = { |
1542 | #if IS_ENABLED(CONFIG_DRM) | ||
1541 | &ipu_pre_drv, | 1543 | &ipu_pre_drv, |
1542 | &ipu_prg_drv, | 1544 | &ipu_prg_drv, |
1545 | #endif | ||
1543 | &imx_ipu_driver, | 1546 | &imx_ipu_driver, |
1544 | }; | 1547 | }; |
1545 | 1548 | ||