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

Commit d804b9eb authored by Nilaan Gunabalachandran's avatar Nilaan Gunabalachandran
Browse files

disp: msm: sde: update last power event handled correctly



Update triggered power event to last event correctly,
regardless of whether a callback is called.
Add event log to see debugfs clock rate change.

Change-Id: Ifa9c1ffb450f50a3928eb44362723b6d495b2354
Signed-off-by: default avatarNilaan Gunabalachandran <ngunabal@codeaurora.org>
parent 7e8a5f7e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1043,6 +1043,7 @@ static ssize_t _sde_core_perf_mode_write(struct file *file,
					perf->max_core_clk_rate);
		else
			DRM_INFO("minimum performance mode\n");
		SDE_EVT32(perf->max_core_clk_rate, ret);
	} else if (perf_mode == SDE_PERF_MODE_NORMAL) {
		/* reset the perf tune params to 0 */
		perf->perf_tune.min_core_clk = 0;
+2 −1
Original line number Diff line number Diff line
@@ -42,10 +42,10 @@ static void sde_power_event_trigger_locked(struct sde_power_handle *phandle,
{
	struct sde_power_event *event;

	phandle->last_event_handled = event_type;
	list_for_each_entry(event, &phandle->event_list, list) {
		if (event->event_type & event_type) {
			event->cb_fnc(event_type, event->usr);
			phandle->last_event_handled = event_type;
		}
	}
}
@@ -862,6 +862,7 @@ int sde_power_clk_set_rate(struct sde_power_handle *phandle, char *clock_name,
	if (phandle->last_event_handled & SDE_POWER_EVENT_POST_DISABLE) {
		pr_debug("invalid power state %u\n",
				phandle->last_event_handled);
		SDE_EVT32(phandle->last_event_handled, SDE_EVTLOG_ERROR);
		mutex_unlock(&phandle->phandle_lock);
		return -EINVAL;
	}