disp: msm: Provide a dynamic method to disable the ESD.
Providing a dynamic method to disable ESD detection and recovery with UTAGS. Port from: 1adab9a Change-Id: I767666d2e802e40af9c8f3508e84b76df365ea38 Signed-off-by: Bang Nguyen <bangnguyen@motorola.com> Reviewed-on: https://gerrit.mot.com/1444399 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1509801 Reviewed-by: Hua Tan <tanhua1@motorola.com>
This commit is contained in:
1 parent
912a0498c8
commit
e0ac15bcc0
5 files changed
+34
-2
No files matched your search
@@ -898,6 +898,19 @@ release_panel_lock:
|
||||
return rc;
|
||||
}
|
||||
|
||||
bool dsi_display_force_esd_disable(void *display)
|
||||
{
|
||||
struct dsi_display *dsi_display = display;
|
||||
struct dsi_panel *panel;
|
||||
|
||||
if (dsi_display == NULL)
|
||||
return false;
|
||||
|
||||
panel = dsi_display->panel;
|
||||
|
||||
return (panel->esd_utag_enable? false: true);
|
||||
}
|
||||
|
||||
static int dsi_display_cmd_prepare(const char *cmd_buf, u32 cmd_buf_len,
|
||||
struct dsi_cmd_desc *cmd, u8 *payload, u32 payload_len)
|
||||
{
|
||||
|
||||
@@ -670,6 +670,13 @@ int dsi_display_motUtil_transfer(void *display, const char *cmd_buf,
|
||||
u32 cmd_buf_len, struct motUtil *motUtil_data);
|
||||
|
||||
|
||||
/**
|
||||
* dsi_display_force_esd_disable() - check if ESD UTAG is forced to disable ESD
|
||||
* @display: Handle to display.
|
||||
*/
|
||||
bool dsi_display_force_esd_disable(void *display);
|
||||
|
||||
|
||||
/**
|
||||
* dsi_display_soft_reset() - perform a soft reset on DSI controller
|
||||
* @display: Handle to display
|
||||
|
||||
@@ -488,8 +488,10 @@ void sde_connector_schedule_status_work(struct drm_connector *connector,
|
||||
return;
|
||||
|
||||
sde_connector_get_info(connector, &info);
|
||||
if (c_conn->ops.check_status &&
|
||||
(info.capabilities & MSM_DISPLAY_ESD_ENABLED)) {
|
||||
if ((c_conn->ops.force_esd_disable &&
|
||||
(c_conn->ops.force_esd_disable(c_conn->display) == false)) &&
|
||||
(c_conn->ops.check_status &&
|
||||
(info.capabilities & MSM_DISPLAY_ESD_ENABLED))) {
|
||||
if (en) {
|
||||
u32 interval;
|
||||
|
||||
|
||||
@@ -277,6 +277,13 @@ struct sde_connector_ops {
|
||||
int (*motUtil_transfer)(void *display, const char *cmd_buf,
|
||||
u32 cmd_buf_len, struct motUtil *motUtil_data);
|
||||
|
||||
/**
|
||||
* force_esd_disable - force to disable check_status
|
||||
* @display: Pointer to private display handle
|
||||
* Returns: true for forcing ESD disable
|
||||
*/
|
||||
bool (*force_esd_disable)(void *display);
|
||||
|
||||
/**
|
||||
* config_hdr - configure HDR
|
||||
* @connector: Pointer to drm connector structure
|
||||
|
||||
@@ -1437,6 +1437,7 @@ static int _sde_kms_setup_displays(struct drm_device *dev,
|
||||
.enable_event = dsi_conn_enable_event,
|
||||
.motUtil_transfer = dsi_display_motUtil_transfer,
|
||||
.cmd_transfer = dsi_display_cmd_transfer,
|
||||
.force_esd_disable = dsi_display_force_esd_disable,
|
||||
.cont_splash_config = dsi_display_cont_splash_config,
|
||||
.get_panel_vfp = dsi_display_get_panel_vfp,
|
||||
.get_default_lms = dsi_display_get_default_lms,
|
||||
@@ -1454,6 +1455,7 @@ static int _sde_kms_setup_displays(struct drm_device *dev,
|
||||
.get_dst_format = NULL,
|
||||
.check_status = NULL,
|
||||
.cmd_transfer = NULL,
|
||||
.force_esd_disable = NULL,
|
||||
.cont_splash_config = NULL,
|
||||
.get_panel_vfp = NULL,
|
||||
};
|
||||
@@ -1471,6 +1473,7 @@ static int _sde_kms_setup_displays(struct drm_device *dev,
|
||||
.set_colorspace = dp_connector_set_colorspace,
|
||||
.config_hdr = dp_connector_config_hdr,
|
||||
.cmd_transfer = NULL,
|
||||
.force_esd_disable = NULL,
|
||||
.cont_splash_config = NULL,
|
||||
.get_panel_vfp = NULL,
|
||||
.update_pps = dp_connector_update_pps,
|
||||
|
||||
Reference in new issue
Block a user