disp: msm: add support for twm entry
Skip backlight updates and panel off commands during twm entry. Change-Id: I7656fa0d513a8a3e82d9bbbf5c3f85c1b84ee9da Signed-off-by: osaisruj <osaisruj@codeaurora.org>
This commit is contained in:
parent
05ccf7d278
commit
1e20848d49
@ -378,6 +378,10 @@ static int dsi_panel_power_off(struct dsi_panel *panel)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
if (panel->is_twm_en) {
|
||||
DSI_DEBUG("TWM Enabled, skip panel power off\n");
|
||||
return rc;
|
||||
}
|
||||
if (gpio_is_valid(panel->reset_config.disp_en_gpio))
|
||||
gpio_set_value(panel->reset_config.disp_en_gpio, 0);
|
||||
|
||||
@ -4305,6 +4309,10 @@ int dsi_panel_set_nolp(struct dsi_panel *panel)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (panel->is_twm_en) {
|
||||
DSI_DEBUG("TWM Enabled, skip idle off\n");
|
||||
return rc;
|
||||
}
|
||||
mutex_lock(&panel->panel_lock);
|
||||
if (!panel->panel_initialized)
|
||||
goto exit;
|
||||
@ -4717,6 +4725,10 @@ int dsi_panel_disable(struct dsi_panel *panel)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (panel->is_twm_en) {
|
||||
DSI_DEBUG("TWM Enabled, skip panel disable\n");
|
||||
return rc;
|
||||
}
|
||||
mutex_lock(&panel->panel_lock);
|
||||
|
||||
/* Avoid sending panel off commands when ESD recovery is underway */
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2020, 2021 The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DSI_PANEL_H_
|
||||
@ -244,6 +244,7 @@ struct dsi_panel {
|
||||
bool reset_gpio_always_on;
|
||||
atomic_t esd_recovery_pending;
|
||||
|
||||
bool is_twm_en;
|
||||
bool panel_initialized;
|
||||
bool te_using_watchdog_timer;
|
||||
struct dsi_qsync_capabilities qsync_caps;
|
||||
|
@ -2865,18 +2865,21 @@ static ssize_t twm_enable_store(struct device *device,
|
||||
{
|
||||
struct drm_connector *conn;
|
||||
struct sde_connector *sde_conn;
|
||||
struct dsi_display *dsi_display;
|
||||
int rc;
|
||||
int data;
|
||||
|
||||
conn = dev_get_drvdata(device);
|
||||
sde_conn = to_sde_connector(conn);
|
||||
|
||||
dsi_display = (struct dsi_display *) sde_conn->display;
|
||||
rc = kstrtoint(buf, 10, &data);
|
||||
if (rc) {
|
||||
SDE_ERROR("kstrtoint failed, rc =%d\n", rc);
|
||||
SDE_ERROR("kstrtoint failed, rc = %d\n", rc);
|
||||
return -EINVAL;
|
||||
}
|
||||
sde_conn->twm_en = data ? true : false;
|
||||
dsi_display->panel->is_twm_en = sde_conn->twm_en;
|
||||
sde_conn->allow_bl_update = data ? false : true;
|
||||
SDE_DEBUG("TWM: %s\n", sde_conn->twm_en ? "ENABLED" : "DISABLED");
|
||||
return count;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user