drm/bridge/synopsys: dsi: check post disable
Subsystems (3)
PATCH 1/1 drm/bridge/synopsys: dsi: check post disable
From: Yannick Fertré <[email protected]>
Some bridges did not registered the post_disable function. To avoid a crash, check it before calling.
Signed-off-by Yannick Fertre <[email protected]>
--- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +2 -1
@@ -886,7 +886,8 @@ static void dw_mipi_dsi_bridge_post_disable(struct drm_bridge *bridge)* This needs to be fixed in the drm_bridge framework and the API * needs to be updated to manage our own call chains... */ - dsi->panel_bridge->funcs->post_disable (dsi->panel_bridge); +if (dsi->panel_bridge->funcs->post_disable) + dsi->panel_bridge->funcs->post_disable (dsi->panel_bridge);if (dsi->slave) {dw_mipi_dsi_disable (dsi->slave);
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Yannick Fertre
From: Yannick Fertré <[email protected]>
Some bridges did not registered the
post_disablefunction. To avoid a crash, check it before calling.Signed-off-by Yannick Fertre <[email protected]>
Reviewed-by Daniel Vetter <[email protected]>
Quoted 21 lines
--- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +2
-1@@ -886,7 +886,8 @@ static void dw_mipi_dsi_bridge_post_disable(struct drm_bridge *bridge)* This needs to be fixed in the drm_bridge framework and the API * needs to be updated to manage our own call chains... */ - dsi->panel_bridge->funcs->post_disable (dsi->panel_bridge); +if (dsi->panel_bridge->funcs->post_disable) + dsi->panel_bridge->funcs->post_disable (dsi->panel_bridge);if (dsi->slave) {dw_mipi_dsi_disable (dsi->slave);Signature · 1 line
2.7.4
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch