drm/panel: panel-dsi-cm: cleanup tear enable
Simplify the code by moving code from _dsicm_enable_te() into dsicm_power_on(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201215104657.802264-57-tomi.valkeinen@ti.com
This commit is contained in:
parent
17d98080c4
commit
487c9e9289
@ -68,8 +68,6 @@ static inline struct panel_drv_data *panel_to_ddata(struct drm_panel *panel)
|
|||||||
return container_of(panel, struct panel_drv_data, panel);
|
return container_of(panel, struct panel_drv_data, panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _dsicm_enable_te(struct panel_drv_data *ddata, bool enable);
|
|
||||||
|
|
||||||
static void dsicm_bl_power(struct panel_drv_data *ddata, bool enable)
|
static void dsicm_bl_power(struct panel_drv_data *ddata, bool enable)
|
||||||
{
|
{
|
||||||
struct backlight_device *backlight;
|
struct backlight_device *backlight;
|
||||||
@ -313,10 +311,13 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
|
|||||||
if (r)
|
if (r)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
r = _dsicm_enable_te(ddata, true);
|
r = mipi_dsi_dcs_set_tear_on(ddata->dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
|
||||||
if (r)
|
if (r)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
/* possible panel bug */
|
||||||
|
msleep(100);
|
||||||
|
|
||||||
ddata->enabled = true;
|
ddata->enabled = true;
|
||||||
|
|
||||||
if (!ddata->intro_printed) {
|
if (!ddata->intro_printed) {
|
||||||
@ -417,22 +418,6 @@ static int dsicm_disable(struct drm_panel *panel)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _dsicm_enable_te(struct panel_drv_data *ddata, bool enable)
|
|
||||||
{
|
|
||||||
struct mipi_dsi_device *dsi = ddata->dsi;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
if (enable)
|
|
||||||
r = mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
|
|
||||||
else
|
|
||||||
r = mipi_dsi_dcs_set_tear_off(dsi);
|
|
||||||
|
|
||||||
/* possible panel bug */
|
|
||||||
msleep(100);
|
|
||||||
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int dsicm_get_modes(struct drm_panel *panel,
|
static int dsicm_get_modes(struct drm_panel *panel,
|
||||||
struct drm_connector *connector)
|
struct drm_connector *connector)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user