From: Inki Dae Subject: [PATCH v5 1/9] drm/exynos: add super device support Date: Mon, 14 Apr 2014 15:09:46 +0900 Message-ID: <1397455794-7759-2-git-send-email-inki.dae@samsung.com> References: <1397455794-7759-1-git-send-email-inki.dae@samsung.com> Return-path: In-reply-to: <1397455794-7759-1-git-send-email-inki.dae@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org To: airlied@linux.ie, dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, linux-samsung-soc@vger.kernel.org, kyungmin.park@samsung.com, inki.dae@samsung.com, seanpaul@chromium.org, a.hajda@samsung.com, kgene.kim@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com List-Id: dri-devel@lists.freedesktop.org This patch adds super device support to bind sub drivers using device tree. For this, you should add a super device node to each machine dt files like belows, In case of using MIPI-DSI, display-subsystem { compatible = "samsung,exynos-display-subsystem"; ports = <&fimd>, <&dsi>; }; In case of using DisplayPort, display-subsystem { compatible = "samsung,exynos-display-subsystem"; ports = <&fimd>, <&dp>; }; In case of using Parallel panel, display-subsystem { compatible = "samsung,exynos-display-subsystem"; ports = <&fimd>; }; And if you don't add connector device node to ports property, default parallel panel driver, exynos_drm_dpi module, will be used. ports property can have the following device nodes, fimd, mixer, Image Enhancer, MIPI-DSI, eDP, LVDS Bridge, or HDMI With this patch, we can resolve the probing order issue without some global lists. So this patch also removes the unnecessary lists and stuff related to these lists. Previous RFC patch, http://www.spinics.net/lists/dri-devel/msg54671.html Changelog since RFC patch: - Register sub drivers and probe them at load(). In case of non sub drivers, sub driver probe is needed. - Enable runtime pm at fimd_probe() instead of fimd_bind(). runtime pm should be enabled before iommu device is attached to fimd device. - Do not return an error with component_master_add fail. - Remove super device support from mipi dsi driver which was in RFC. - Add super device support to parallel driver. Changelog v2: - Add super device support to mipi dsi driver. - Bind fimd driver only in case that a drm_panel for parallel panel driver is added to panel_list of drm_panel module. - Change super node name to 'display-subsystem' . 'exynos-drm' is specific to Linux so change it to generic name. - Change propery name of super node to 'ports' . crtcs and connectors propery names are also specific to Linux so change them to generic name. Changlog v3: - Do not probe/remove dpi module if fimd node has no port node. Changelog v4: - Move some codes for getting resources from each bind function to each probe function. . if -EPROBE_DEFER is returned at bind context, components will be bound and unbound repeatedly by deferred probe feature. Changelog v5: - Return error only in case that there is no any compoment attached to master. - Add legacy dt binding support - Probe vidi driver in exynos_drm_init(), and release vidi driver correctly. - Remove duplicated coherent_dma_mask setting. Signed-off-by: Inki Dae Signed-off-by: Kyungmin Park --- drivers/gpu/drm/exynos/exynos_dp_core.c | 45 +++-- drivers/gpu/drm/exynos/exynos_drm_core.c | 216 ++++------------------- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 17 ++ drivers/gpu/drm/exynos/exynos_drm_crtc.h | 4 + drivers/gpu/drm/exynos/exynos_drm_dpi.c | 16 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 273 ++++++++++++++++++++---------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 78 ++++----- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 110 +++++++----- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 87 ++++++++-- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 101 +++++++++-- drivers/gpu/drm/exynos/exynos_hdmi.c | 59 ++++--- drivers/gpu/drm/exynos/exynos_mixer.c | 54 ++++-- 12 files changed, 616 insertions(+), 444 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c index aed533b..1cc3981 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.c +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include