From patchwork Tue Mar 21 06:42:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffy Chen X-Patchwork-Id: 9636075 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9D462602CC for ; Tue, 21 Mar 2017 06:42:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A8F327B81 for ; Tue, 21 Mar 2017 06:42:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BA1B27C0C; Tue, 21 Mar 2017 06:42:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 540A327B81 for ; Tue, 21 Mar 2017 06:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=g+eo9VUeH6Ro/YS6bXM0sIgBK/qZ1p6yqbplWRKi/AQ=; b=WrB /zNwqTT/llffyyGHFA2HALO0yjcDB73BTqbSoF1zb/a+rnVAe1DdJ6FVxPEcyScKCalLkB8fZbxe+ QAep2fHkl3Ef7itmmQtwhyXvtwGnct4LvwgthtXwdWr4+5dgpqweo8Bd5+GdAj9s5mtcDPv0MakWo LponTiIkCZh9FXQ+KzxQuZQYb9Es55NgLfAAZCoqE4wQYqgOy1fspWj1zkNeCK30spsvGHa1ee1QN qfWbKTKDXZ3LEmCNoivdlZvxu/R7WjdepJLKI91wzE9wK2VEglfPsHJXHdhpkLIXV7HkMbPpTOQvn qCgL7vqHtmeXUg+DTcHNcMyqHRR4uag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cqDVK-0004BP-0K; Tue, 21 Mar 2017 06:42:50 +0000 Received: from regular1.263xmail.com ([211.150.99.140]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cqDVE-000498-KZ; Tue, 21 Mar 2017 06:42:48 +0000 Received: from jeffy.chen?rock-chips.com (unknown [192.168.165.105]) by regular1.263xmail.com (Postfix) with ESMTP id 415824CE6; Tue, 21 Mar 2017 14:42:16 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from smtp.263.net (sg-smtp01.263.net [54.255.195.220]) by smtp.263.net (Postfix) with ESMTP id 51C2D41B; Tue, 21 Mar 2017 14:42:15 +0800 (CST) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id AD358DF30C; Tue, 21 Mar 2017 14:42:15 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: mark.yao@rock-chips.com X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <631a325d63badf4fc1dbdb9adfc26637> X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 5088GX0L85; Tue, 21 Mar 2017 14:42:16 +0800 (CST) From: Jeffy Chen To: Mark Yao Subject: [PATCH v7] drm/rockchip: Refactor the component match logic. Date: Tue, 21 Mar 2017 14:42:11 +0800 Message-Id: <1490078531-5100-1-git-send-email-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170320_234246_116404_4718F3AA X-CRM114-Status: GOOD ( 15.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jeffy Chen , linux-rockchip@lists.infradead.org, Brian Norris , Douglas Anderson , dri-devel@lists.freedesktop.org, Tomasz Figa , Andrzej Hajda , Sean Paul , Guenter Roeck , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently we are adding all components from the dts, if one of their drivers been disabled, we would not be able to bring up others. Refactor component match logic, follow exynos drm. Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda Acked-by: Mark Yao Tested-by: Heiko Stuebner --- Changes in v7: Add Heiko Stuebner 's Tested-by. Changes in v6: Add Mark Yao 's Acked-by. Changes in v5: Fix compile error reported by Heiko Stuebner . Changes in v4: Use platform_driver helpers to register/unregister drivers. Fix null pointer error reported by Heiko Stuebner . Changes in v3: Address Andrzej Hajda 's comments. Changes in v2: Address Sean Paul 's comments. drivers/gpu/drm/rockchip/Kconfig | 10 +- drivers/gpu/drm/rockchip/Makefile | 16 +-- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 9 +- drivers/gpu/drm/rockchip/cdn-dp-core.c | 8 +- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 8 +- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 10 +- drivers/gpu/drm/rockchip/inno_hdmi.c | 10 +- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 138 +++++++++++++++--------- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 6 ++ drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 8 +- 10 files changed, 115 insertions(+), 108 deletions(-) diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index 0e4eb84..50c41c0 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -13,7 +13,7 @@ config DRM_ROCKCHIP IP found on the SoC. config ROCKCHIP_ANALOGIX_DP - tristate "Rockchip specific extensions for Analogix DP driver" + bool "Rockchip specific extensions for Analogix DP driver" depends on DRM_ROCKCHIP select DRM_ANALOGIX_DP help @@ -22,7 +22,7 @@ config ROCKCHIP_ANALOGIX_DP on RK3288 based SoC, you should selet this option. config ROCKCHIP_CDN_DP - tristate "Rockchip cdn DP" + bool "Rockchip cdn DP" depends on DRM_ROCKCHIP depends on EXTCON select SND_SOC_HDMI_CODEC if SND_SOC @@ -33,7 +33,7 @@ config ROCKCHIP_CDN_DP option. config ROCKCHIP_DW_HDMI - tristate "Rockchip specific extensions for Synopsys DW HDMI" + bool "Rockchip specific extensions for Synopsys DW HDMI" depends on DRM_ROCKCHIP select DRM_DW_HDMI help @@ -43,7 +43,7 @@ config ROCKCHIP_DW_HDMI option. config ROCKCHIP_DW_MIPI_DSI - tristate "Rockchip specific extensions for Synopsys DW MIPI DSI" + bool "Rockchip specific extensions for Synopsys DW MIPI DSI" depends on DRM_ROCKCHIP select DRM_MIPI_DSI help @@ -53,7 +53,7 @@ config ROCKCHIP_DW_MIPI_DSI option. config ROCKCHIP_INNO_HDMI - tristate "Rockchip specific extensions for Innosilicon HDMI" + bool "Rockchip specific extensions for Innosilicon HDMI" depends on DRM_ROCKCHIP help This selects support for Rockchip SoC specific extensions diff --git a/drivers/gpu/drm/rockchip/Makefile b/drivers/gpu/drm/rockchip/Makefile index c931e2a..fa8dc9d 100644 --- a/drivers/gpu/drm/rockchip/Makefile +++ b/drivers/gpu/drm/rockchip/Makefile @@ -3,14 +3,14 @@ # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o \ - rockchip_drm_gem.o rockchip_drm_psr.o rockchip_drm_vop.o + rockchip_drm_gem.o rockchip_drm_psr.o \ + rockchip_drm_vop.o rockchip_vop_reg.o rockchipdrm-$(CONFIG_DRM_FBDEV_EMULATION) += rockchip_drm_fbdev.o -obj-$(CONFIG_ROCKCHIP_ANALOGIX_DP) += analogix_dp-rockchip.o -obj-$(CONFIG_ROCKCHIP_CDN_DP) += cdn-dp.o -cdn-dp-objs := cdn-dp-core.o cdn-dp-reg.o -obj-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o -obj-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o -obj-$(CONFIG_ROCKCHIP_INNO_HDMI) += inno_hdmi.o +rockchipdrm-$(CONFIG_ROCKCHIP_ANALOGIX_DP) += analogix_dp-rockchip.o +rockchipdrm-$(CONFIG_ROCKCHIP_CDN_DP) += cdn-dp-core.o cdn-dp-reg.o +rockchipdrm-$(CONFIG_ROCKCHIP_DW_HDMI) += dw_hdmi-rockchip.o +rockchipdrm-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o +rockchipdrm-$(CONFIG_ROCKCHIP_INNO_HDMI) += inno_hdmi.o -obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o rockchip_vop_reg.o +obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index 8548e82..91ebe5c 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -507,7 +507,7 @@ static const struct of_device_id rockchip_dp_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids); -static struct platform_driver rockchip_dp_driver = { +struct platform_driver rockchip_dp_driver = { .probe = rockchip_dp_probe, .remove = rockchip_dp_remove, .driver = { @@ -516,10 +516,3 @@ static struct platform_driver rockchip_dp_driver = { .of_match_table = of_match_ptr(rockchip_dp_dt_ids), }, }; - -module_platform_driver(rockchip_dp_driver); - -MODULE_AUTHOR("Yakir Yang "); -MODULE_AUTHOR("Jeff chen "); -MODULE_DESCRIPTION("Rockchip Specific Analogix-DP Driver Extension"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index fd79a70..e1796d0 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -1243,7 +1243,7 @@ static const struct dev_pm_ops cdn_dp_pm_ops = { cdn_dp_resume) }; -static struct platform_driver cdn_dp_driver = { +struct platform_driver cdn_dp_driver = { .probe = cdn_dp_probe, .remove = cdn_dp_remove, .shutdown = cdn_dp_shutdown, @@ -1254,9 +1254,3 @@ static struct platform_driver cdn_dp_driver = { .pm = &cdn_dp_pm_ops, }, }; - -module_platform_driver(cdn_dp_driver); - -MODULE_AUTHOR("Chris Zhong "); -MODULE_DESCRIPTION("cdn DP Driver"); -MODULE_LICENSE("GPL v2"); diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index f84f9ae..9360250 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c @@ -1304,7 +1304,7 @@ static int dw_mipi_dsi_remove(struct platform_device *pdev) return 0; } -static struct platform_driver dw_mipi_dsi_driver = { +struct platform_driver dw_mipi_dsi_driver = { .probe = dw_mipi_dsi_probe, .remove = dw_mipi_dsi_remove, .driver = { @@ -1312,9 +1312,3 @@ static struct platform_driver dw_mipi_dsi_driver = { .name = DRIVER_NAME, }, }; -module_platform_driver(dw_mipi_dsi_driver); - -MODULE_DESCRIPTION("ROCKCHIP MIPI DSI host controller driver"); -MODULE_AUTHOR("Chris Zhong "); -MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:" DRIVER_NAME); diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index a6d4a02..976ea79 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -326,7 +326,7 @@ static int dw_hdmi_rockchip_remove(struct platform_device *pdev) return 0; } -static struct platform_driver dw_hdmi_rockchip_pltfm_driver = { +struct platform_driver dw_hdmi_rockchip_pltfm_driver = { .probe = dw_hdmi_rockchip_probe, .remove = dw_hdmi_rockchip_remove, .driver = { @@ -334,11 +334,3 @@ static struct platform_driver dw_hdmi_rockchip_pltfm_driver = { .of_match_table = dw_hdmi_rockchip_dt_ids, }, }; - -module_platform_driver(dw_hdmi_rockchip_pltfm_driver); - -MODULE_AUTHOR("Andy Yan "); -MODULE_AUTHOR("Yakir Yang "); -MODULE_DESCRIPTION("Rockchip Specific DW-HDMI Driver Extension"); -MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:dwhdmi-rockchip"); diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index 006260d..7d9b75e 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -923,7 +923,7 @@ static const struct of_device_id inno_hdmi_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, inno_hdmi_dt_ids); -static struct platform_driver inno_hdmi_driver = { +struct platform_driver inno_hdmi_driver = { .probe = inno_hdmi_probe, .remove = inno_hdmi_remove, .driver = { @@ -931,11 +931,3 @@ static struct platform_driver inno_hdmi_driver = { .of_match_table = inno_hdmi_dt_ids, }, }; - -module_platform_driver(inno_hdmi_driver); - -MODULE_AUTHOR("Zheng Yang "); -MODULE_AUTHOR("Yakir Yang "); -MODULE_DESCRIPTION("Rockchip Specific INNO-HDMI Driver"); -MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("platform:innohdmi-rockchip"); diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index ccf4569..c4fd077 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -304,34 +304,42 @@ static const struct dev_pm_ops rockchip_drm_pm_ops = { rockchip_drm_sys_resume) }; -static int compare_of(struct device *dev, void *data) -{ - struct device_node *np = data; +#define MAX_ROCKCHIP_DRM_DRVS 16 +static struct platform_driver *rockchip_drm_drvs[MAX_ROCKCHIP_DRM_DRVS]; +static int rockchip_drm_drvs_cnt; - return dev->of_node == np; +#define ROCKCHIP_DRM_DRV(drv, cond) { \ + if (IS_ENABLED(cond)) \ + rockchip_drm_drvs[rockchip_drm_drvs_cnt++] = &drv; \ } -static void rockchip_add_endpoints(struct device *dev, - struct component_match **match, - struct device_node *port) +static int compare_dev(struct device *dev, void *data) { - struct device_node *ep, *remote; + return dev == (struct device *)data; +} - for_each_child_of_node(port, ep) { - remote = of_graph_get_remote_port_parent(ep); - if (!remote || !of_device_is_available(remote)) { - of_node_put(remote); - continue; - } else if (!of_device_is_available(remote->parent)) { - dev_warn(dev, "parent device of %s is not available\n", - remote->full_name); - of_node_put(remote); - continue; - } +static struct component_match *rockchip_drm_match_add(struct device *dev) +{ + struct component_match *match = NULL; + int i; - drm_of_component_match_add(dev, match, compare_of, remote); - of_node_put(remote); + for (i = 0; i < rockchip_drm_drvs_cnt; i++) { + struct platform_driver *drv = rockchip_drm_drvs[i]; + struct device *p = NULL, *d; + + do { + d = bus_find_device(&platform_bus_type, p, &drv->driver, + (void *)platform_bus_type.match); + put_device(p); + p = d; + + if (!d) + break; + component_match_add(dev, &match, compare_dev, d); + } while (true); } + + return match ?: ERR_PTR(-ENODEV); } static const struct component_master_ops rockchip_drm_ops = { @@ -339,21 +347,16 @@ static const struct component_master_ops rockchip_drm_ops = { .unbind = rockchip_drm_unbind, }; -static int rockchip_drm_platform_probe(struct platform_device *pdev) +static int rockchip_drm_platform_of_probe(struct device *dev) { - struct device *dev = &pdev->dev; - struct component_match *match = NULL; struct device_node *np = dev->of_node; struct device_node *port; + bool found = false; int i; if (!np) return -ENODEV; - /* - * Bind the crtc ports first, so that - * drm_of_find_possible_crtcs called from encoder .bind callbacks - * works as expected. - */ + for (i = 0;; i++) { struct device_node *iommu; @@ -377,9 +380,9 @@ static int rockchip_drm_platform_probe(struct platform_device *pdev) is_support_iommu = false; } + found = true; + of_node_put(iommu); - drm_of_component_match_add(dev, &match, compare_of, - port->parent); of_node_put(port); } @@ -388,27 +391,27 @@ static int rockchip_drm_platform_probe(struct platform_device *pdev) return -ENODEV; } - if (!match) { + if (!found) { dev_err(dev, "No available vop found for display-subsystem.\n"); return -ENODEV; } - /* - * For each bound crtc, bind the encoders attached to its - * remote endpoint. - */ - for (i = 0;; i++) { - port = of_parse_phandle(np, "ports", i); - if (!port) - break; - if (!of_device_is_available(port->parent)) { - of_node_put(port); - continue; - } + return 0; +} - rockchip_add_endpoints(dev, &match, port); - of_node_put(port); - } +static int rockchip_drm_platform_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct component_match *match = NULL; + int ret; + + ret = rockchip_drm_platform_of_probe(dev); + if (ret) + return ret; + + match = rockchip_drm_match_add(dev); + if (IS_ERR(match)) + return PTR_ERR(match); return component_master_add_with_match(dev, &rockchip_drm_ops, match); } @@ -436,7 +439,46 @@ static struct platform_driver rockchip_drm_platform_driver = { }, }; -module_platform_driver(rockchip_drm_platform_driver); +static int __init rockchip_drm_init(void) +{ + int ret; + + rockchip_drm_drvs_cnt = 0; + ROCKCHIP_DRM_DRV(vop_platform_driver, CONFIG_DRM_ROCKCHIP); + ROCKCHIP_DRM_DRV(rockchip_dp_driver, CONFIG_ROCKCHIP_ANALOGIX_DP); + ROCKCHIP_DRM_DRV(cdn_dp_driver, CONFIG_ROCKCHIP_CDN_DP); + ROCKCHIP_DRM_DRV(dw_hdmi_rockchip_pltfm_driver, + CONFIG_ROCKCHIP_DW_HDMI); + ROCKCHIP_DRM_DRV(dw_mipi_dsi_driver, CONFIG_ROCKCHIP_DW_MIPI_DSI); + ROCKCHIP_DRM_DRV(inno_hdmi_driver, CONFIG_ROCKCHIP_INNO_HDMI); + + ret = platform_register_drivers(rockchip_drm_drvs, + rockchip_drm_drvs_cnt); + if (ret) + return ret; + + ret = platform_driver_register(&rockchip_drm_platform_driver); + if (ret) + goto err_unreg_drivers; + + return 0; + +err_unreg_drivers: + platform_unregister_drivers(rockchip_drm_drvs, + rockchip_drm_drvs_cnt); + return ret; +} + +static void __exit rockchip_drm_fini(void) +{ + platform_driver_unregister(&rockchip_drm_platform_driver); + + platform_unregister_drivers(rockchip_drm_drvs, + rockchip_drm_drvs_cnt); +} + +module_init(rockchip_drm_init); +module_exit(rockchip_drm_fini); MODULE_AUTHOR("Mark Yao "); MODULE_DESCRIPTION("ROCKCHIP DRM Driver"); diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h index 8aca219..a48fcce 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.h @@ -65,4 +65,10 @@ void rockchip_drm_dma_detach_device(struct drm_device *drm_dev, int rockchip_drm_wait_line_flag(struct drm_crtc *crtc, unsigned int line_num, unsigned int mstimeout); +extern struct platform_driver cdn_dp_driver; +extern struct platform_driver dw_hdmi_rockchip_pltfm_driver; +extern struct platform_driver dw_mipi_dsi_driver; +extern struct platform_driver inno_hdmi_driver; +extern struct platform_driver rockchip_dp_driver; +extern struct platform_driver vop_platform_driver; #endif /* _ROCKCHIP_DRM_DRV_H_ */ diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c index 91fbc7b..0da4444 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -404,7 +404,7 @@ static int vop_remove(struct platform_device *pdev) return 0; } -static struct platform_driver vop_platform_driver = { +struct platform_driver vop_platform_driver = { .probe = vop_probe, .remove = vop_remove, .driver = { @@ -412,9 +412,3 @@ static struct platform_driver vop_platform_driver = { .of_match_table = of_match_ptr(vop_driver_dt_match), }, }; - -module_platform_driver(vop_platform_driver); - -MODULE_AUTHOR("Mark Yao "); -MODULE_DESCRIPTION("ROCKCHIP VOP Driver"); -MODULE_LICENSE("GPL v2");