gpu: drm: remaining missing of_node_put issue fixes
Subsystems (8)
cover gpu: drm: remaining missing of_node_put issue fixes
Hi David,
This is remaining missing of_node_put issue fix for gpu/drm drivers, the other fixes I sent yesterday. I think it may be easier for reviewing using patch set for similar issue, thanks.
Peter Chen (7):
gpu: drm: rockchip_drm_drv: add missing of_node_put after calling
of_parse_phandle
gpu: drm: sti_compositor: add missing of_node_put after calling
of_parse_phandle
gpu: drm: sti_vdo: add missing of_node_put after calling
of_parse_phandle
gpu: drm: sti_hqvdp: add missing of_node_put after calling
of_parse_phandle
gpu: drm: sti_vtg: add missing of_node_put after calling
of_parse_phandle
gpu: drm: sun4i_drv: add missing of_node_put after calling
of_parse_phandle
gpu: drm: vc4_hdmi: add missing of_node_put after calling
of_parse_phandle
drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 + drivers/gpu/drm/sti/sti_compositor.c | 2 ++ drivers/gpu/drm/sti/sti_dvo.c | 1 + drivers/gpu/drm/sti/sti_hqvdp.c | 1 + drivers/gpu/drm/sti/sti_vtg.c | 1 + drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++------ 7 files changed, 14 insertions(+), 6 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/7 gpu: drm: rockchip_drm_drv: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using.
--- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/rockchip/rockchip_drm_drv.c +1 -0
@@ -518,6 +518,7 @@ static int rockchip_drm_platform_probe(struct platform_device *pdev) is_support_iommu = false; } +of_node_put (iommu);component_match_add (dev, &match, compare_of, port->parent);of_node_put (port); }
Signature · 1 line
1.9.1
PATCH 2/7 gpu: drm: sti_compositor: add missing of_node_put after calling of_parse_phandle
In reply to Peter Chenof_node_put needs to be called when the device node which is got from of_parse_phandle has finished using.
--- drivers/gpu/drm/sti/sti_compositor.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/sti/sti_compositor.c +2 -0
@@ -247,10 +247,12 @@ static int sti_compositor_probe(struct platform_device *pdev) vtg_np =of_parse_phandle (pdev->dev.of_node,"st,vtg" ,0 );if (vtg_np) compo->vtg_main =of_vtg_find (vtg_np); +of_node_put (vtg_np); vtg_np =of_parse_phandle (pdev->dev.of_node,"st,vtg" ,1 );if (vtg_np) compo->vtg_aux =of_vtg_find (vtg_np); +of_node_put (vtg_np);platform_set_drvdata (pdev, compo);
Signature · 1 line
1.9.1
Re: [PATCH 2/7] gpu: drm: sti_compositor: add missing of_node_put after calling of_parse_phandle
2016-07-05 4:04 GMT+02:00 Peter Chen <[email protected]>:
Quoted 30 lines
of_node_putneeds to be called when the device node which is got fromof_parse_phandlehas finished using.Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Signed-off-by Peter Chen <[email protected]>--- drivers/gpu/drm/sti/sti_compositor.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/sti/sti_compositor.c +2
-1@@ -247,10 +247,12 @@ static int sti_compositor_probe(struct platform_device *pdev) vtg_np =of_parse_phandle (pdev->dev.of_node,"st,vtg" ,0 );if (vtg_np) compo->vtg_main =of_vtg_find (vtg_np); +of_node_put (vtg_np); vtg_np =of_parse_phandle (pdev->dev.of_node,"st,vtg" ,1 );if (vtg_np) compo->vtg_aux =of_vtg_find (vtg_np); +of_node_put (vtg_np);platform_set_drvdata (pdev, compo); --1.9.1
Signature · 11 lines
Benjamin Gaignard Graphic Working Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/7 gpu: drm: sti_vdo: add missing of_node_put after calling of_parse_phandle
In reply to Peter Chenof_node_put needs to be called when the device node which is got from of_parse_phandle has finished using.
--- drivers/gpu/drm/sti/sti_dvo.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/sti/sti_dvo.c +1 -0
@@ -602,6 +602,7 @@ static int sti_dvo_probe(struct platform_device *pdev) dvo->panel_node =of_parse_phandle (np,"sti,panel" ,0 );if (!dvo->panel_node)DRM_ERROR ("No panel associated to the dvo output\n" ); +of_node_put (dvo->panel_node);platform_set_drvdata (pdev, dvo);
Signature · 1 line
1.9.1
Re: [PATCH 3/7] gpu: drm: sti_vdo: add missing of_node_put after calling of_parse_phandle
2016-07-05 4:04 GMT+02:00 Peter Chen <[email protected]>:
Quoted 25 lines
of_node_putneeds to be called when the device node which is got fromof_parse_phandlehas finished using.Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Signed-off-by Peter Chen <[email protected]>--- drivers/gpu/drm/sti/sti_dvo.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/sti/sti_dvo.c +1
-1@@ -602,6 +602,7 @@ static int sti_dvo_probe(struct platform_device *pdev) dvo->panel_node =of_parse_phandle (np,"sti,panel" ,0 );if (!dvo->panel_node)DRM_ERROR ("No panel associated to the dvo output\n" ); +of_node_put (dvo->panel_node);platform_set_drvdata (pdev, dvo); --1.9.1
Signature · 11 lines
Benjamin Gaignard Graphic Working Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/7 gpu: drm: sti_hqvdp: add missing of_node_put after calling of_parse_phandle
In reply to Peter Chenof_node_put needs to be called when the device node which is got from of_parse_phandle has finished using.
--- drivers/gpu/drm/sti/sti_hqvdp.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/sti/sti_hqvdp.c +1 -0
@@ -1346,6 +1346,7 @@ static int sti_hqvdp_probe(struct platform_device *pdev) vtg_np =of_parse_phandle (pdev->dev.of_node,"st,vtg" ,0 );if (vtg_np) hqvdp->vtg =of_vtg_find (vtg_np); +of_node_put (vtg_np);platform_set_drvdata (pdev, hqvdp);
Signature · 1 line
1.9.1
Re: [PATCH 4/7] gpu: drm: sti_hqvdp: add missing of_node_put after calling of_parse_phandle
2016-07-05 4:04 GMT+02:00 Peter Chen <[email protected]>:
Quoted 25 lines
of_node_putneeds to be called when the device node which is got fromof_parse_phandlehas finished using.Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Signed-off-by Peter Chen <[email protected]>--- drivers/gpu/drm/sti/sti_hqvdp.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/sti/sti_hqvdp.c +1
-1@@ -1346,6 +1346,7 @@ static int sti_hqvdp_probe(struct platform_device *pdev) vtg_np =of_parse_phandle (pdev->dev.of_node,"st,vtg" ,0 );if (vtg_np) hqvdp->vtg =of_vtg_find (vtg_np); +of_node_put (vtg_np);platform_set_drvdata (pdev, hqvdp); --1.9.1
Signature · 11 lines
Benjamin Gaignard Graphic Working Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 5/7 gpu: drm: sti_vtg: add missing of_node_put after calling of_parse_phandle
In reply to Peter Chenof_node_put needs to be called when the device node which is got from of_parse_phandle has finished using.
--- drivers/gpu/drm/sti/sti_vtg.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/sti/sti_vtg.c +1 -0
@@ -432,6 +432,7 @@ static int vtg_probe(struct platform_device *pdev) np =of_parse_phandle (pdev->dev.of_node,"st,slave" ,0 );if (np) { vtg->slave =of_vtg_find (np); +of_node_put (np);if (!vtg->slave)return -EPROBE_DEFER ;
Signature · 1 line
1.9.1
Re: [PATCH 5/7] gpu: drm: sti_vtg: add missing of_node_put after calling of_parse_phandle
2016-07-05 4:04 GMT+02:00 Peter Chen <[email protected]>:
Quoted 25 lines
of_node_putneeds to be called when the device node which is got fromof_parse_phandlehas finished using.Cc Benjamin Gaignard <[email protected]>Cc Vincent Abriou <[email protected]>Signed-off-by Peter Chen <[email protected]>--- drivers/gpu/drm/sti/sti_vtg.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/sti/sti_vtg.c +1
-1@@ -432,6 +432,7 @@ static int vtg_probe(struct platform_device *pdev) np =of_parse_phandle (pdev->dev.of_node,"st,slave" ,0 );if (np) { vtg->slave =of_vtg_find (np); +of_node_put (np);if (!vtg->slave)return -EPROBE_DEFER ; --1.9.1
Signature · 11 lines
Benjamin Gaignard Graphic Working Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 6/7 gpu: drm: sun4i_drv: add missing of_node_put after calling of_parse_phandle
In reply to Peter Chenof_node_put needs to be called when the device node which is got from of_parse_phandle has finished using.
--- drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/sun4i/sun4i_drv.c +1 -0
@@ -318,6 +318,7 @@ static int sun4i_drv_probe(struct platform_device *pdev) count +=sun4i_drv_add_endpoints (&pdev->dev, &match, pipeline); +of_node_put (pipeline);DRM_DEBUG_DRIVER ("Queued %d outputs on pipeline %d\n" , count, i);
Signature · 1 line
1.9.1
Maxime Ripard
AppliedRe: [PATCH 6/7] gpu: drm: sun4i_drv: add missing of_node_put after calling of_parse_phandle
Quoted 6 lines · Peter Chen
of_node_putneeds to be called when the device node which is got fromof_parse_phandlehas finished using.Cc Maxime Ripard <[email protected]>Cc Chen-Yu Tsai <[email protected]>Signed-off-by Peter Chen <[email protected]>
Applied, thanks!
Maxime
Signature · 3 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 7/7 gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle
In reply to Peter Chenof_node_put needs to be called when the device node which is got from of_parse_phandle has finished using.
--- drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +7 -6
@@ -465,12 +465,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)if (IS_ERR (hdmi->hd_regs))return PTR_ERR (hdmi->hd_regs); - ddc_node =of_parse_phandle (dev->of_node,"ddc" ,0 ); -if (!ddc_node) { -DRM_ERROR ("Failed to find ddc node in device tree\n" ); -return -ENODEV ; - } - hdmi->pixel_clock =devm_clk_get (dev,"pixel" );if (IS_ERR (hdmi->pixel_clock)) {DRM_ERROR ("Failed to get pixel clock\n" );
@@ -482,7 +476,14 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)return PTR_ERR (hdmi->hsm_clock); } + ddc_node =of_parse_phandle (dev->of_node,"ddc" ,0 ); +if (!ddc_node) { +DRM_ERROR ("Failed to find ddc node in device tree\n" ); +return -ENODEV ; + } + hdmi->ddc =of_find_i2c_adapter_by_node (ddc_node); +of_node_put (ddc_node);if (!hdmi->ddc) {DRM_DEBUG ("Failed to get ddc i2c adapter by node\n" );return -EPROBE_DEFER ;
Signature · 1 line
1.9.1
Re: [PATCH 7/7] gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle
Quoted 32 lines · Peter Chen
of_node_putneeds to be called when the device node which is got fromof_parse_phandlehas finished using.Cc Eric Anholt <[email protected]>Signed-off-by Peter Chen <[email protected]>--- drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)drivers/gpu/drm/vc4/vc4_hdmi.c +1
-6@@ -465,12 +465,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)if (IS_ERR (hdmi->hd_regs))return PTR_ERR (hdmi->hd_regs); - ddc_node =of_parse_phandle (dev->of_node,"ddc" ,0 ); -if (!ddc_node) { -DRM_ERROR ("Failed to find ddc node in device tree\n" ); -return -ENODEV ; - } - hdmi->pixel_clock =devm_clk_get (dev,"pixel" );if (IS_ERR (hdmi->pixel_clock)) {DRM_ERROR ("Failed to get pixel clock\n" );@@ -482,7 +476,14 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)return PTR_ERR (hdmi->hsm_clock); } + ddc_node =of_parse_phandle (dev->of_node,"ddc" ,0 );
drivers/gpu/drm/vc4/vc4_hdmi.c static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) · line 489
Quoted 10 lines
drivers/gpu/drm/vc4/vc4_hdmi.c +6
-0+if (!ddc_node) { +DRM_ERROR ("Failed to find ddc node in device tree\n" ); +return -ENODEV ; + } + hdmi->ddc =of_find_i2c_adapter_by_node (ddc_node); +of_node_put (ddc_node);if (!hdmi->ddc) {DRM_DEBUG ("Failed to get ddc i2c adapter by node\n" );return -EPROBE_DEFER ;
It would be nice if we could just pass the phandle spec directly to the i2c function. OF code always seems terribly verbose to me (and error-prone in this exact way) because of the separate phandle lookup.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 7/7] gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle
Quoted 47 lines · Eric Anholt
Quoted 32 lines · Peter Chen
of_node_putneeds to be called when the device node which is got fromof_parse_phandlehas finished using.Cc Eric Anholt <[email protected]>Signed-off-by Peter Chen <[email protected]>--- drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)drivers/gpu/drm/vc4/vc4_hdmi.c +1
-6@@ -465,12 +465,6 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)if (IS_ERR (hdmi->hd_regs))return PTR_ERR (hdmi->hd_regs); - ddc_node =of_parse_phandle (dev->of_node,"ddc" ,0 ); -if (!ddc_node) { -DRM_ERROR ("Failed to find ddc node in device tree\n" ); -return -ENODEV ; - } - hdmi->pixel_clock =devm_clk_get (dev,"pixel" );if (IS_ERR (hdmi->pixel_clock)) {DRM_ERROR ("Failed to get pixel clock\n" );@@ -482,7 +476,14 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)return PTR_ERR (hdmi->hsm_clock); } + ddc_node =of_parse_phandle (dev->of_node,"ddc" ,0 );drivers/gpu/drm/vc4/vc4_hdmi.c static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) · line 489
Quoted 10 lines
drivers/gpu/drm/vc4/vc4_hdmi.c +6
-0+if (!ddc_node) { +DRM_ERROR ("Failed to find ddc node in device tree\n" ); +return -ENODEV ; + } + hdmi->ddc =of_find_i2c_adapter_by_node (ddc_node); +of_node_put (ddc_node);if (!hdmi->ddc) {DRM_DEBUG ("Failed to get ddc i2c adapter by node\n" );return -EPROBE_DEFER ;Reviewed-by Eric Anholt <[email protected]>
Quoted 3 lines
It would be nice if we could just pass the phandle spec directly to the i2c function. OF code always seems terribly verbose to me (and error-prone in this exact way) because of the separate phandle lookup.
Yeah, of_find_i2c_adapter_by_phandle would be neat. Either way, applied all the other patches to drm-misc.
-Daniel
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Eric Anholt
AppliedRe: [PATCH 7/7] gpu: drm: vc4_hdmi: add missing of_node_put after calling of_parse_phandle
In reply to Peter ChenQuoted 5 lines · Peter Chen
of_node_putneeds to be called when the device node which is got fromof_parse_phandlehas finished using.Cc Eric Anholt <[email protected]>Signed-off-by Peter Chen <[email protected]>
Applied this to drm-vc4-next. Thanks!
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel