drm: bridge/dw_hdmi: Adapt to bridge API change
Subsystems (4)
PATCH 1/2 drm: bridge/dw_hdmi: Adapt to bridge API change
Commit fbc4572e9c48e45b ("drm/bridge: make bridge registration independent of drm flow") introduced some drm/bridge API modifications. Make the necessary changes so that we can avoid the build breakage:
drivers/gpu/drm/bridge/dw_hdmi.c: In function 'dw_hdmi_bridge_destroy':drivers/gpu/drm/bridge/dw_hdmi.c:1378:2: error: implicit declaration of function 'drm_bridge_cleanup' [-Werror=implicit-function-declaration] drivers/gpu/drm/bridge/dw_hdmi.c: At top level:drivers/gpu/drm/bridge/dw_hdmi.c:1471:2: error: unknown field 'destroy' specified in initializer drivers/gpu/drm/bridge/dw_hdmi.c: In function 'dw_hdmi_register':drivers/gpu/drm/bridge/dw_hdmi.c:1535:2: error: implicit declaration of function 'drm_bridge_init' [-Werror=implicit-function-declaration]
--- drivers/gpu/drm/bridge/dw_hdmi.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/gpu/drm/bridge/dw_hdmi.c +2 -9
@@ -1373,12 +1373,6 @@ static void dw_hdmi_bridge_enable(struct drm_bridge *bridge)dw_hdmi_poweron (hdmi); } -static void dw_hdmi_bridge_destroy (struct drm_bridge *bridge) -{ -drm_bridge_cleanup (bridge); -kfree (bridge); -} -static void dw_hdmi_bridge_nop (struct drm_bridge *bridge) {/* do nothing */
@@ -1468,7 +1462,6 @@ struct drm_bridge_funcs dw_hdmi_bridge_funcs = { .post_disable = dw_hdmi_bridge_nop, .mode_set = dw_hdmi_bridge_mode_set, .mode_fixup = dw_hdmi_bridge_mode_fixup, - .destroy = dw_hdmi_bridge_destroy, };static irqreturn_t dw_hdmi_hardirq (int irq,void *dev_id)
@@ -1531,8 +1524,8 @@ static int dw_hdmi_register(struct drm_device *drm, struct dw_hdmi *hdmi) hdmi->bridge = bridge; bridge->driver_private = hdmi; - - ret =drm_bridge_init (drm, bridge, &dw_hdmi_bridge_funcs); + bridge->funcs = &dw_hdmi_bridge_funcs; + ret =drm_bridge_attach (drm, bridge);if (ret) {DRM_ERROR ("Failed to initialize bridge with drm\n" );return -EINVAL ;
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/2 drm: bridge/sti_dvo: Adapt to bridge API change
Commit fbc4572e9c48e45b ("drm/bridge: make bridge registration independent of drm flow") introduced some drm/bridge API modifications. Make the necessary changes so that we can avoid the build breakage:
drivers/gpu/drm/sti/sti_dvo.c: In function 'sti_dvo_brigde_destroy':drivers/gpu/drm/sti/sti_dvo.c:277:2: error: implicit declaration of function 'drm_bridge_cleanup' [-Werror=implicit-function-declaration] drivers/gpu/drm/sti/sti_dvo.c: At top level:drivers/gpu/drm/sti/sti_dvo.c:287:2: error: unknown field ‘destroy’ specified in initializer drivers/gpu/drm/sti/sti_dvo.c: In function 'sti_dvo_bind':drivers/gpu/drm/sti/sti_dvo.c:419:2: error: implicit declaration of function 'drm_bridge_init' [-Werror=implicit-function-declaration]
--- drivers/gpu/drm/sti/sti_dvo.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/gpu/drm/sti/sti_dvo.c +2 -9
@@ -272,19 +272,12 @@ static void sti_dvo_bridge_nope(struct drm_bridge *bridge)/* do nothing */ } -static void sti_dvo_brigde_destroy (struct drm_bridge *bridge) -{ -drm_bridge_cleanup (bridge); -kfree (bridge); -} -static const struct drm_bridge_funcs sti_dvo_bridge_funcs = { .pre_enable = sti_dvo_pre_enable, .enable = sti_dvo_bridge_nope, .disable = sti_dvo_disable, .post_disable = sti_dvo_bridge_nope, .mode_set = sti_dvo_set_mode, - .destroy = sti_dvo_brigde_destroy, };static int sti_dvo_connector_get_modes (struct drm_connector *connector)
@@ -416,7 +409,8 @@ static int sti_dvo_bind(struct device *dev, struct device *master, void *data)return -ENOMEM ; bridge->driver_private = dvo; -drm_bridge_init (drm_dev, bridge, &sti_dvo_bridge_funcs); + bridge->funcs = &sti_dvo_bridge_funcs; +drm_bridge_attach (drm_dev, bridge); encoder->bridge = bridge; connector->encoder = encoder;
@@ -446,7 +440,6 @@ static int sti_dvo_bind(struct device *dev, struct device *master, void *data) err_sysfs:drm_connector_unregister (drm_connector); err_connector: -drm_bridge_cleanup (bridge);drm_connector_cleanup (drm_connector);return -EINVAL ; }
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 2/2] drm: bridge/sti_dvo: Adapt to bridge API change
Compare to Dave's patch this one doesn't take care of driver unbind but that is a general issue I have to address in STI driver. I would like to fix all unbind issues (hdmi, dvo, hda) in the same way but it isn't link to this topic.
so you could my ack on this patch, up to me to fix unbind problems with additionnal patches
2015-01-27 13:21 GMT+01:00 Fabio Estevam <[email protected]>:
Quoted 61 lines
Commit
fbc4572e9c48e45b("drm/bridge: make bridge registration independent of drm flow") introduced some drm/bridge API modifications. Make the necessary changes so that we can avoid the build breakage:
drivers/gpu/drm/sti/sti_dvo.c: In function 'sti_dvo_brigde_destroy':drivers/gpu/drm/sti/sti_dvo.c:277:2: error: implicit declaration of function 'drm_bridge_cleanup' [-Werror=implicit-function-declaration]drivers/gpu/drm/sti/sti_dvo.c: At top level:drivers/gpu/drm/sti/sti_dvo.c:287:2: error: unknown field ‘destroy’ specified in initializerdrivers/gpu/drm/sti/sti_dvo.c: In function 'sti_dvo_bind':drivers/gpu/drm/sti/sti_dvo.c:419:2: error: implicit declaration of function 'drm_bridge_init' [-Werror=implicit-function-declaration]Signed-off-by Fabio Estevam <[email protected]>--- drivers/gpu/drm/sti/sti_dvo.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)drivers/gpu/drm/sti/sti_dvo.c +2
-10@@ -272,19 +272,12 @@ static void sti_dvo_bridge_nope(struct drm_bridge *bridge)/* do nothing */ } -static void sti_dvo_brigde_destroy (struct drm_bridge *bridge) -{ -drm_bridge_cleanup (bridge); -kfree (bridge); -} -static const struct drm_bridge_funcs sti_dvo_bridge_funcs = { .pre_enable = sti_dvo_pre_enable, .enable = sti_dvo_bridge_nope, .disable = sti_dvo_disable, .post_disable = sti_dvo_bridge_nope, .mode_set = sti_dvo_set_mode, - .destroy = sti_dvo_brigde_destroy, };static int sti_dvo_connector_get_modes (struct drm_connector *connector)@@ -416,7 +409,8 @@ static int sti_dvo_bind(struct device *dev, struct device *master, void *data)return -ENOMEM ; bridge->driver_private = dvo; -drm_bridge_init (drm_dev, bridge, &sti_dvo_bridge_funcs); + bridge->funcs = &sti_dvo_bridge_funcs; +drm_bridge_attach (drm_dev, bridge); encoder->bridge = bridge; connector->encoder = encoder;@@ -446,7 +440,6 @@ static int sti_dvo_bind(struct device *dev, struct device *master, void *data) err_sysfs:drm_connector_unregister (drm_connector); err_connector: -drm_bridge_cleanup (bridge);drm_connector_cleanup (drm_connector);return -EINVAL ; } --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] http://lists.freedesktop.org/mailman/listinfo/dri-devel