add super device node support
Subsystems (5)
Inki Dae
maintainercover add super device node support
This patch series adds super device node approach and relevant dt bindings, and rebased on top of below patch series,
http://www.spinics.net/lists/dri-devel/msg57673.html
Thanks,
Inki Dae
Inki Dae (5):
drm/exynos: add super device support
ARM: dts: exynos4210-universal: add super device node for exynos drm
ARM: dts: exynos4210-trats: add super device node for exynos drm
ARM: dts: exynos4412-trats2: add super device node for exynos drm exynos/drm: add DT bindings for super device node
.../bindings/drm/exynos/samsung-exynos-drm.txt | 32 ++++++ arch/arm/boot/dts/exynos4210-trats.dts | 5 + arch/arm/boot/dts/exynos4210-universal_c210.dts | 5 + arch/arm/boot/dts/exynos4412-trats2.dts | 5 + drivers/gpu/drm/exynos/exynos_dp_core.c | 4 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 119 ++++++++++---------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 7 -- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 +- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 4 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 4 +- drivers/gpu/drm/exynos/exynos_mixer.c | 4 +- 11 files changed, 116 insertions(+), 77 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/exynos/samsung-exynos-drm.txt
Signature · 1 line
1.7.9.5
Inki Dae
maintainerPATCH v6 1/5 drm/exynos: add super device support
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.
Changelog v6:
- Add super device support, and remove existing specific codes.
- Re-based on top of below patch series,
http://www.spinics.net/lists/dri-devel/msg57673.html
--- drivers/gpu/drm/exynos/exynos_dp_core.c | 4 +- drivers/gpu/drm/exynos/exynos_drm_drv.c | 119 +++++++++++++++--------------- drivers/gpu/drm/exynos/exynos_drm_drv.h | 7 -- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 +- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 4 +- drivers/gpu/drm/exynos/exynos_hdmi.c | 4 +- drivers/gpu/drm/exynos/exynos_mixer.c | 4 +- 7 files changed, 69 insertions(+), 77 deletions(-)
drivers/gpu/drm/exynos/exynos_dp_core.c +2 -2
@@ -1313,12 +1313,12 @@ static const struct component_ops exynos_dp_ops = {static int exynos_dp_probe (struct platform_device *pdev) { -return exynos_drm_component_add (&pdev->dev, &exynos_dp_ops); +return component_add (&pdev->dev, &exynos_dp_ops); }static int exynos_dp_remove (struct platform_device *pdev) { -exynos_drm_component_del (&pdev->dev, &exynos_dp_ops); +component_del (&pdev->dev, &exynos_dp_ops);return 0 ; }
drivers/gpu/drm/exynos/exynos_drm_drv.c +59 -60
174 lines not on this page · raw message
drivers/gpu/drm/exynos/exynos_drm_drv.h +0 -7
@@ -356,13 +356,6 @@ void exynos_drm_remove_vidi(void);int exynos_drm_create_enc_conn (struct drm_device *dev,struct exynos_drm_display *display); -struct component_ops ; -int exynos_drm_component_add (struct device *dev, -const struct component_ops *ops); - -void exynos_drm_component_del (struct device *dev, -const struct component_ops *ops); -extern struct platform_driver fimd_driver;extern struct platform_driver dp_driver;extern struct platform_driver dsi_driver;
drivers/gpu/drm/exynos/exynos_drm_dsi.c +2 -2
@@ -1495,12 +1495,12 @@ static int exynos_dsi_probe(struct platform_device *pdev)platform_set_drvdata (pdev, &exynos_dsi_display); -return exynos_drm_component_add (&pdev->dev, &exynos_dsi_component_ops); +return component_add (&pdev->dev, &exynos_dsi_component_ops); }static int exynos_dsi_remove (struct platform_device *pdev) { -exynos_drm_component_del (&pdev->dev, &exynos_dsi_component_ops); +component_del (&pdev->dev, &exynos_dsi_component_ops);return 0 ; }
drivers/gpu/drm/exynos/exynos_drm_fimd.c +2 -2
@@ -958,14 +958,14 @@ static int fimd_probe(struct platform_device *pdev)pm_runtime_enable (&pdev->dev); -return exynos_drm_component_add (&pdev->dev, &fimd_component_ops); +return component_add (&pdev->dev, &fimd_component_ops); }static int fimd_remove (struct platform_device *pdev) {pm_runtime_disable (&pdev->dev); -exynos_drm_component_del (&pdev->dev, &fimd_component_ops); +component_del (&pdev->dev, &fimd_component_ops);return 0 ; }
drivers/gpu/drm/exynos/exynos_hdmi.c +2 -2
@@ -2168,7 +2168,7 @@ static int hdmi_probe(struct platform_device *pdev)pm_runtime_enable (dev); hdmi_display.ctx = hdata; -return exynos_drm_component_add (&pdev->dev, &hdmi_component_ops); +return component_add (&pdev->dev, &hdmi_component_ops); err_hdmiphy:put_device (&hdata->hdmiphy_port->dev);
@@ -2186,7 +2186,7 @@ static int hdmi_remove(struct platform_device *pdev)pm_runtime_disable (&pdev->dev); -exynos_drm_component_del (&pdev->dev, &hdmi_component_ops); +component_del (&pdev->dev, &hdmi_component_ops);return 0 ; }
drivers/gpu/drm/exynos/exynos_mixer.c +2 -2
@@ -1273,12 +1273,12 @@ static const struct component_ops mixer_component_ops = {static int mixer_probe (struct platform_device *pdev) { -return exynos_drm_component_add (&pdev->dev, &mixer_component_ops); +return component_add (&pdev->dev, &mixer_component_ops); }static int mixer_remove (struct platform_device *pdev) { -exynos_drm_component_del (&pdev->dev, &mixer_component_ops); +component_del (&pdev->dev, &mixer_component_ops);return 0 ; }
Signature · 1 line
1.7.9.5
Inki Dae
maintainerPATCH 2/5 ARM: dts: exynos4210-universal: add super device node for exynos drm
In reply to Inki Dae--- arch/arm/boot/dts/exynos4210-universal_c210.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4210-universal_c210.dts +5 -0
@@ -409,6 +409,11 @@ }; }; + display-subsystem { + compatible = "samsung,exynos-display-subsystem"; + ports = <&fimd>; + }; + pwm@139D0000 { compatible = "samsung,s5p6440-pwm"; status = "okay";
Signature · 1 line
1.7.9.5
Inki Dae
maintainerPATCH 3/5 ARM: dts: exynos4210-trats: add super device node for exynos drm
In reply to Inki Dae--- arch/arm/boot/dts/exynos4210-trats.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4210-trats.dts +5 -0
@@ -414,6 +414,11 @@ status = "okay"; }; + display-subsystem { + compatible = "samsung,exynos-display-subsystem"; + ports = <&fimd>, <&dsi_0>; + }; + camera { pinctrl-names = "default"; pinctrl-0 = <>;
Signature · 1 line
1.7.9.5
Inki Dae
maintainerPATCH 4/5 ARM: dts: exynos4412-trats2: add super device node for exynos drm
In reply to Inki Dae--- arch/arm/boot/dts/exynos4412-trats2.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/exynos4412-trats2.dts +5 -0
@@ -581,6 +581,11 @@ status = "okay"; }; + display-subsystem { + compatible = "samsung,exynos-display-subsystem"; + ports = <&fimd>, <&dsi_0>; + }; + camera { pinctrl-0 = <&cam_port_b_clk_active>; pinctrl-names = "default";
Signature · 1 line
1.7.9.5
Inki Dae
maintainerPATCH 5/5 exynos/drm: add DT bindings for super device node
In reply to Inki DaeThis patch adds bindings for Exynos drm display subsystem. The bindings describes ports containing a list of phandles pointing to display controller, image enhancer, and display interfaces nodes.
--- .../bindings/drm/exynos/samsung-exynos-drm.txt | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/exynos/samsung-exynos-drm.txt
Documentation/devicetree/bindings/drm/exynos/samsung-exynos-drm.txt new file +32 -0
@@ -0,0 +1,32 @@ +Samsung Exynos DRM master device +================================ + +The Samsung Exynos DRM master device is a virtual device needed to list all +display controller, image enhancer, and display interface nodes that comprise +the graphics subsystem. + +Required properties: +- compatible: Should be "samsung,exynos-display-subsystem" +- ports: Should contain a list of phandles pointing to display controller, + image enhancer, and display interface ports. + +Examples: + +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>; +};
Signature · 1 line
1.7.9.5