drm/sti: fix opencoded use of drm_panel_*
Use the drm_panel_(enable|disable|get_modes) functions. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-9-sam@ravnborg.org
This commit is contained in:
parent
b8c036dfc6
commit
fcfce9f354
|
@ -221,8 +221,7 @@ static void sti_dvo_disable(struct drm_bridge *bridge)
|
||||||
|
|
||||||
writel(0x00000000, dvo->regs + DVO_DOF_CFG);
|
writel(0x00000000, dvo->regs + DVO_DOF_CFG);
|
||||||
|
|
||||||
if (dvo->panel)
|
drm_panel_disable(dvo->panel);
|
||||||
dvo->panel->funcs->disable(dvo->panel);
|
|
||||||
|
|
||||||
/* Disable/unprepare dvo clock */
|
/* Disable/unprepare dvo clock */
|
||||||
clk_disable_unprepare(dvo->clk_pix);
|
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))
|
if (clk_prepare_enable(dvo->clk))
|
||||||
DRM_ERROR("Failed to prepare/enable dvo clk\n");
|
DRM_ERROR("Failed to prepare/enable dvo clk\n");
|
||||||
|
|
||||||
if (dvo->panel)
|
drm_panel_enable(dvo->panel);
|
||||||
dvo->panel->funcs->enable(dvo->panel);
|
|
||||||
|
|
||||||
/* Set LUT */
|
/* Set LUT */
|
||||||
writel(config->lowbyte, dvo->regs + DVO_LUT_PROG_LOW);
|
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;
|
struct sti_dvo *dvo = dvo_connector->dvo;
|
||||||
|
|
||||||
if (dvo->panel)
|
if (dvo->panel)
|
||||||
return dvo->panel->funcs->get_modes(dvo->panel);
|
return drm_panel_get_modes(dvo->panel);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue