update display driver
Change-Id: Id3d9ebac686bc84b334cb0e2d814aa30e71ce1fa
This commit is contained in:
parent
a14a2b909b
commit
5340142447
3 changed files with 22 additions and 0 deletions
|
|
@ -4975,6 +4975,7 @@ int send_refreshrate_cmd(struct dsi_panel *panel, int refreshrate)
|
|||
DSI_INFO("send fps cmd, fps = %d, last_fps = %d\n", refreshrate, panel->last_refresh_rate);
|
||||
mutex_lock(&panel->panel_lock);
|
||||
|
||||
panel->update_init_gamma = true;
|
||||
if (panel->last_refresh_rate == 30 && refreshrate != 30) {
|
||||
rc = dsi_panel_tx_cmd_set(panel, DSI_CMD_EXIT_30HZ);
|
||||
if (rc) {
|
||||
|
|
@ -5061,6 +5062,7 @@ int dsi_panel_enable(struct dsi_panel *panel)
|
|||
}
|
||||
}
|
||||
panel->panel_initialized = true;
|
||||
panel->update_init_gamma = false;
|
||||
error:
|
||||
mutex_unlock(&panel->panel_lock);
|
||||
return rc;
|
||||
|
|
@ -5152,6 +5154,7 @@ int dsi_panel_disable(struct dsi_panel *panel)
|
|||
panel->panel_initialized = false;
|
||||
panel->power_mode = SDE_MODE_DPMS_OFF;
|
||||
panel->lhbm_state = false;
|
||||
panel->update_init_gamma = false;
|
||||
|
||||
mutex_unlock(&panel->panel_lock);
|
||||
return rc;
|
||||
|
|
|
|||
|
|
@ -286,6 +286,7 @@ struct dsi_panel {
|
|||
bool doze_recoverying;
|
||||
int last_refresh_rate;
|
||||
bool lhbm_state;
|
||||
bool update_init_gamma;
|
||||
};
|
||||
|
||||
static inline bool dsi_panel_ulps_feature_enabled(struct dsi_panel *panel)
|
||||
|
|
|
|||
|
|
@ -1037,6 +1037,20 @@ static int _sde_connector_update_dirty_properties(
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void _sde_connector_update_fps_gamma(struct dsi_display *display)
|
||||
{
|
||||
if (!display || !display->panel) {
|
||||
SDE_ERROR("Invalid params(s) dsi_display %pK, panel %pK\n",
|
||||
display, ((display) ? display->panel : NULL));
|
||||
return;
|
||||
}
|
||||
|
||||
if (display->config.panel_mode == DSI_OP_VIDEO_MODE) {
|
||||
send_refreshrate_cmd(display->panel, display->panel->cur_mode->timing.refresh_rate);
|
||||
DSI_INFO("set refreshrate refresh_rate=%d\n", display->panel->cur_mode->timing.refresh_rate);
|
||||
}
|
||||
return;
|
||||
}
|
||||
static int _sde_connector_update_finger_hbm_status(
|
||||
struct sde_connector *c_conn)
|
||||
{
|
||||
|
|
@ -1222,6 +1236,7 @@ int sde_connector_prepare_commit(struct drm_connector *connector)
|
|||
struct sde_connector_state *c_state;
|
||||
struct msm_display_conn_params params;
|
||||
int rc;
|
||||
struct dsi_display * display;
|
||||
|
||||
if (!connector) {
|
||||
SDE_ERROR("invalid argument\n");
|
||||
|
|
@ -1241,6 +1256,9 @@ int sde_connector_prepare_commit(struct drm_connector *connector)
|
|||
if (rc) {
|
||||
SDE_ERROR("update hbm status failed\n");
|
||||
}
|
||||
display = (struct dsi_display *) c_conn->display;
|
||||
if (display && display->panel && !display->panel->update_init_gamma)
|
||||
_sde_connector_update_fps_gamma(display);
|
||||
}
|
||||
|
||||
if (!c_conn->ops.prepare_commit)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue