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: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This commit is contained in:
Nilaan Gunabalachandran
2019-12-10 09:44:25 -05:00
committed by Gerrit - the friendly Code Review server
parent a9574eb8c2
commit 53a5b3670f
2 changed files with 3 additions and 1 deletions

View File

@@ -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;

View File

@@ -47,10 +47,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;
}
}
}
@@ -775,6 +775,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;
}