[PATCH 2/2] drm: bridge/sti_dvo: Adapt to bridge API change

Benjamin Gaignard benjamin.gaignard at linaro.org
Tue Jan 27 08:09:57 PST 2015


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 <fabio.estevam at freescale.com>:
> 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]
>
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
>  drivers/gpu/drm/sti/sti_dvo.c | 11 ++---------
>  1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
> index 651afad..1088fc5 100644
> --- a/drivers/gpu/drm/sti/sti_dvo.c
> +++ b/drivers/gpu/drm/sti/sti_dvo.c
> @@ -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
>



-- 
Benjamin Gaignard

Graphic Working Group

Linaro.org │ Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog


More information about the dri-devel mailing list