mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
gpu: host1x: Disable actmon by default
Disable actmon by default and export the controllability of enabling and disabling the actmon. DRM clients should enable the actmon in the runtime resume cycle, and disable the actmon in the runtime suspend cycle. Bug 4168788 Signed-off-by: Johnny Liu <johnliu@nvidia.com> Change-Id: I72bcd6d92383595a41c2de5cad708610a205ba25 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2931874 Reviewed-by: Santosh BS <santoshb@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
34288b623d
commit
af2ced3322
@@ -251,7 +251,7 @@ static void host1x_actmon_module_init(struct host1x_actmon_module *module)
|
|||||||
{
|
{
|
||||||
/* Local control register */
|
/* Local control register */
|
||||||
actmon_module_writel(module,
|
actmon_module_writel(module,
|
||||||
HOST1X_ACTMON_MODULE_CTRL_ACTMON_ENB(1) |
|
HOST1X_ACTMON_MODULE_CTRL_ACTMON_ENB(0) |
|
||||||
HOST1X_ACTMON_MODULE_CTRL_ENB_PERIODIC(1) |
|
HOST1X_ACTMON_MODULE_CTRL_ENB_PERIODIC(1) |
|
||||||
HOST1X_ACTMON_MODULE_CTRL_K_VAL(module->k) |
|
HOST1X_ACTMON_MODULE_CTRL_K_VAL(module->k) |
|
||||||
HOST1X_ACTMON_MODULE_CTRL_CONSEC_UPPER_NUM(module->consec_upper_num) |
|
HOST1X_ACTMON_MODULE_CTRL_CONSEC_UPPER_NUM(module->consec_upper_num) |
|
||||||
@@ -420,6 +420,44 @@ int host1x_actmon_unregister(struct host1x_client *client)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(host1x_actmon_unregister);
|
EXPORT_SYMBOL(host1x_actmon_unregister);
|
||||||
|
|
||||||
|
void host1x_actmon_enable(struct host1x_client *client)
|
||||||
|
{
|
||||||
|
struct host1x_actmon *actmon = client->actmon;
|
||||||
|
struct host1x_actmon_module *module;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!actmon)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0; i < actmon->num_modules; i++) {
|
||||||
|
module = &actmon->modules[i];
|
||||||
|
actmon_module_writel(module,
|
||||||
|
actmon_module_readl(module, HOST1X_ACTMON_MODULE_CTRL_REG) |
|
||||||
|
HOST1X_ACTMON_MODULE_CTRL_ACTMON_ENB(1),
|
||||||
|
HOST1X_ACTMON_MODULE_CTRL_REG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(host1x_actmon_enable);
|
||||||
|
|
||||||
|
void host1x_actmon_disable(struct host1x_client *client)
|
||||||
|
{
|
||||||
|
struct host1x_actmon *actmon = client->actmon;
|
||||||
|
struct host1x_actmon_module *module;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!actmon)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0; i < actmon->num_modules; i++) {
|
||||||
|
module = &actmon->modules[i];
|
||||||
|
actmon_module_writel(module,
|
||||||
|
actmon_module_readl(module, HOST1X_ACTMON_MODULE_CTRL_REG) &
|
||||||
|
~HOST1X_ACTMON_MODULE_CTRL_ACTMON_ENB(1),
|
||||||
|
HOST1X_ACTMON_MODULE_CTRL_REG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(host1x_actmon_disable);
|
||||||
|
|
||||||
void host1x_actmon_update_client_rate(struct host1x_client *client,
|
void host1x_actmon_update_client_rate(struct host1x_client *client,
|
||||||
unsigned long rate,
|
unsigned long rate,
|
||||||
u32 *weight)
|
u32 *weight)
|
||||||
|
|||||||
@@ -527,6 +527,8 @@ static inline void host1x_memory_context_put(struct host1x_memory_context *cd)
|
|||||||
int host1x_actmon_read_avg_count(struct host1x_client *client);
|
int host1x_actmon_read_avg_count(struct host1x_client *client);
|
||||||
int host1x_actmon_register(struct host1x_client *client);
|
int host1x_actmon_register(struct host1x_client *client);
|
||||||
int host1x_actmon_unregister(struct host1x_client *client);
|
int host1x_actmon_unregister(struct host1x_client *client);
|
||||||
|
void host1x_actmon_enable(struct host1x_client *client);
|
||||||
|
void host1x_actmon_disable(struct host1x_client *client);
|
||||||
void host1x_actmon_update_client_rate(struct host1x_client *client,
|
void host1x_actmon_update_client_rate(struct host1x_client *client,
|
||||||
unsigned long rate,
|
unsigned long rate,
|
||||||
u32 *weight);
|
u32 *weight);
|
||||||
|
|||||||
Reference in New Issue
Block a user