Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08f61a6e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm: add debugfs support to change ESD check interval"

parents 099d91d3 2c95cfe6
Loading
Loading
Loading
Loading
+25 −5
Original line number Diff line number Diff line
@@ -417,15 +417,25 @@ void sde_connector_schedule_status_work(struct drm_connector *connector,
	sde_connector_get_info(connector, &info);
	if (c_conn->ops.check_status &&
		(info.capabilities & MSM_DISPLAY_ESD_ENABLED)) {
		if (en)
		if (en) {
			u32 interval;

			/*
			 * If debugfs property is not set then take
			 * default value
			 */
			interval = c_conn->esd_status_interval ?
				c_conn->esd_status_interval :
					STATUS_CHECK_INTERVAL_MS;
			/* Schedule ESD status check */
			schedule_delayed_work(&c_conn->status_work,
				msecs_to_jiffies(STATUS_CHECK_INTERVAL_MS));
		else
				msecs_to_jiffies(interval));
		} else {
			/* Cancel any pending ESD status check */
			cancel_delayed_work_sync(&c_conn->status_work);
		}
	}
}

static int _sde_connector_update_power_locked(struct sde_connector *c_conn)
{
@@ -1542,10 +1552,14 @@ static int sde_connector_init_debugfs(struct drm_connector *connector)

	sde_connector_get_info(connector, &info);
	if (sde_connector->ops.check_status &&
		(info.capabilities & MSM_DISPLAY_ESD_ENABLED))
		(info.capabilities & MSM_DISPLAY_ESD_ENABLED)) {
		debugfs_create_u32("force_panel_dead", 0600,
				connector->debugfs_entry,
				&sde_connector->force_panel_dead);
		debugfs_create_u32("esd_status_interval", 0600,
				connector->debugfs_entry,
				&sde_connector->esd_status_interval);
	}

	if (!debugfs_create_bool("fb_kmap", 0600, connector->debugfs_entry,
			&sde_connector->fb_kmap)) {
@@ -1720,10 +1734,16 @@ static void sde_connector_check_status_work(struct work_struct *work)
	}

	if (rc > 0) {
		u32 interval;

		SDE_DEBUG("esd check status success conn_id: %d enc_id: %d\n",
				conn->base.base.id, conn->encoder->base.id);

		/* If debugfs property is not set then take default value */
		interval = conn->esd_status_interval ?
			conn->esd_status_interval : STATUS_CHECK_INTERVAL_MS;
		schedule_delayed_work(&conn->status_work,
			msecs_to_jiffies(STATUS_CHECK_INTERVAL_MS));
			msecs_to_jiffies(interval));
		return;
	}

+2 −0
Original line number Diff line number Diff line
@@ -313,6 +313,7 @@ struct sde_connector_evt {
 * @bl_device: backlight device node
 * @status_work: work object to perform status checks
 * @force_panel_dead: variable to trigger forced ESD recovery
 * @esd_status_interval: variable to change ESD check interval in millisec
 * @bl_scale_dirty: Flag to indicate PP BL scale value(s) is changed
 * @bl_scale: BL scale value for ABA feature
 * @bl_scale_ad: BL scale value for AD feature
@@ -353,6 +354,7 @@ struct sde_connector {
	struct backlight_device *bl_device;
	struct delayed_work status_work;
	u32 force_panel_dead;
	u32 esd_status_interval;

	bool bl_scale_dirty;
	u32 bl_scale;