Commit c50c2d2d authored by Tomi Valkeinen's avatar Tomi Valkeinen

drm/panel: panel-dsi-cm: set column & page at setup

Set the column & page address once during setup, instead of relying the
DSI host driver to set those.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201215104657.802264-61-tomi.valkeinen@ti.com
parent 443dae09
...@@ -170,6 +170,22 @@ static int dsicm_get_id(struct panel_drv_data *ddata, u8 *id1, u8 *id2, u8 *id3) ...@@ -170,6 +170,22 @@ static int dsicm_get_id(struct panel_drv_data *ddata, u8 *id1, u8 *id2, u8 *id3)
return 0; return 0;
} }
static int dsicm_set_update_window(struct panel_drv_data *ddata)
{
struct mipi_dsi_device *dsi = ddata->dsi;
int r;
r = mipi_dsi_dcs_set_column_address(dsi, 0, ddata->mode.hdisplay - 1);
if (r < 0)
return r;
r = mipi_dsi_dcs_set_page_address(dsi, 0, ddata->mode.vdisplay - 1);
if (r < 0)
return r;
return 0;
}
static int dsicm_bl_update_status(struct backlight_device *dev) static int dsicm_bl_update_status(struct backlight_device *dev)
{ {
struct panel_drv_data *ddata = dev_get_drvdata(&dev->dev); struct panel_drv_data *ddata = dev_get_drvdata(&dev->dev);
...@@ -307,6 +323,10 @@ static int dsicm_power_on(struct panel_drv_data *ddata) ...@@ -307,6 +323,10 @@ static int dsicm_power_on(struct panel_drv_data *ddata)
if (r) if (r)
goto err; goto err;
r = dsicm_set_update_window(ddata);
if (r)
goto err;
r = mipi_dsi_dcs_set_display_on(ddata->dsi); r = mipi_dsi_dcs_set_display_on(ddata->dsi);
if (r) if (r)
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment