disp: msm: sde: add tracking for if perf_mode is changed
Perf tuning mode can be updated through debugfs and this should be used to reflect the core clock rate. Change-Id: I313d079f0b8013f43f4b293c6400f34eaf56b6d2 Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This commit is contained in:
1 parent
df172c1eba
commit
cbde86eac0
2 files changed
+11
-2
No files matched your search
@@ -842,12 +842,18 @@ static void _sde_core_perf_crtc_update_check(struct drm_crtc *crtc,
|
||||
}
|
||||
}
|
||||
|
||||
if (kms->perf.perf_tune.mode_changed &&
|
||||
kms->perf.perf_tune.min_core_clk)
|
||||
new->core_clk_rate = kms->perf.perf_tune.min_core_clk;
|
||||
|
||||
if ((params_changed &&
|
||||
(new->core_clk_rate > old->core_clk_rate)) ||
|
||||
(!params_changed && new->core_clk_rate &&
|
||||
(new->core_clk_rate < old->core_clk_rate))) {
|
||||
(new->core_clk_rate < old->core_clk_rate)) ||
|
||||
kms->perf.perf_tune.mode_changed) {
|
||||
old->core_clk_rate = new->core_clk_rate;
|
||||
*update_clk = 1;
|
||||
kms->perf.perf_tune.mode_changed = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1069,6 +1075,7 @@ static ssize_t _sde_core_perf_mode_write(struct file *file,
|
||||
DRM_INFO("normal performance mode\n");
|
||||
}
|
||||
perf->perf_tune.mode = perf_mode;
|
||||
perf->perf_tune.mode_changed = true;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _SDE_CORE_PERF_H_
|
||||
@@ -47,11 +47,13 @@ struct sde_core_perf_params {
|
||||
* @mode: performance mode
|
||||
* @min_core_clk: minimum core clock
|
||||
* @min_bus_vote: minimum bus vote
|
||||
* @mode_changed: indicate if clock tuning strategy changed
|
||||
*/
|
||||
struct sde_core_perf_tune {
|
||||
u32 mode;
|
||||
u64 min_core_clk;
|
||||
u64 min_bus_vote;
|
||||
bool mode_changed;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user