mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
drm/tegra: Support client get_rate for OFA
When actmon reports the client usage information, it will call the get_rate callback provided by the client, and divide the number of sampled active clock cycles from the actmon counter register with the current client rate to determine the client usage value. Bug 4338396 Signed-off-by: Johnny Liu <johnliu@nvidia.com> Change-Id: I5e3f69b8ed1d90407fe0b8202e7c9cde75a0dd30 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3000330 Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
cbde6ba274
commit
1a32649b75
@@ -164,9 +164,17 @@ static int ofa_exit(struct host1x_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long ofa_get_rate(struct host1x_client *client)
|
||||
{
|
||||
struct ofa *ofa = dev_get_drvdata(client->dev);
|
||||
|
||||
return clk_get_rate(ofa->clk);
|
||||
}
|
||||
|
||||
static const struct host1x_client_ops ofa_client_ops = {
|
||||
.init = ofa_init,
|
||||
.exit = ofa_exit,
|
||||
.get_rate = ofa_get_rate,
|
||||
};
|
||||
|
||||
static int ofa_load_firmware(struct ofa *ofa)
|
||||
|
||||
Reference in New Issue
Block a user