[PATCH v1 08/16] drm/sti: fix opencoded use of drm_panel_*

Benjamin Gaignard benjamin.gaignard at linaro.org
Wed Aug 7 11:55:33 UTC 2019


Le dim. 4 août 2019 à 22:17, Sam Ravnborg <sam at ravnborg.org> a écrit :
>
> Use the drm_panel_(enable|disable|get_modes) functions.

Applied on drm-misc-next,
Thanks.

Benjamin

>
> Signed-off-by: Sam Ravnborg <sam at ravnborg.org>
> Cc: Benjamin Gaignard <benjamin.gaignard at linaro.org>
> Cc: Vincent Abriou <vincent.abriou at st.com>
> ---
>  drivers/gpu/drm/sti/sti_dvo.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
> index 9e6d5d8b7030..e55870190bf5 100644
> --- a/drivers/gpu/drm/sti/sti_dvo.c
> +++ b/drivers/gpu/drm/sti/sti_dvo.c
> @@ -221,8 +221,7 @@ static void sti_dvo_disable(struct drm_bridge *bridge)
>
>         writel(0x00000000, dvo->regs + DVO_DOF_CFG);
>
> -       if (dvo->panel)
> -               dvo->panel->funcs->disable(dvo->panel);
> +       drm_panel_disable(dvo->panel);
>
>         /* Disable/unprepare dvo clock */
>         clk_disable_unprepare(dvo->clk_pix);
> @@ -262,8 +261,7 @@ static void sti_dvo_pre_enable(struct drm_bridge *bridge)
>         if (clk_prepare_enable(dvo->clk))
>                 DRM_ERROR("Failed to prepare/enable dvo clk\n");
>
> -       if (dvo->panel)
> -               dvo->panel->funcs->enable(dvo->panel);
> +       drm_panel_enable(dvo->panel);
>
>         /* Set LUT */
>         writel(config->lowbyte,  dvo->regs + DVO_LUT_PROG_LOW);
> @@ -340,7 +338,7 @@ static int sti_dvo_connector_get_modes(struct drm_connector *connector)
>         struct sti_dvo *dvo = dvo_connector->dvo;
>
>         if (dvo->panel)
> -               return dvo->panel->funcs->get_modes(dvo->panel);
> +               return drm_panel_get_modes(dvo->panel);
>
>         return 0;
>  }
> --
> 2.20.1
>


More information about the dri-devel mailing list