From 143272e44dc2ddbd8115b4b6c951ae88adb5a17c Mon Sep 17 00:00:00 2001 From: Leon Yu Date: Thu, 30 Jan 2020 14:31:03 +0800 Subject: video: tegra: host: add freq. capping capability This change adds sysfs interface under acm for capping frequencies of host1x clients. It is to replace existing nvpmodel kernel driver which serves same purpose but does this in an unreliable/wrong way - bypassing host1x and grabbing parent clock handle of clients directly. With this functionality, things are put under host1x acm control and we gain more finely grained control in some cases, e.g. setting freq. cap independently for dla0 and dla1. Bug 200585348 Bug 200521935 Change-Id: I34445df1abc3656138cfde06c23ea5a4c8694d07 Signed-off-by: Leon Yu Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2288876 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Mikko Perttunen Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- include/linux/nvhost.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h index ade9da2de..56448483c 100644 --- a/include/linux/nvhost.h +++ b/include/linux/nvhost.h @@ -3,7 +3,7 @@ * * Tegra graphics host driver * - * Copyright (c) 2009-2019, NVIDIA Corporation. All rights reserved. + * Copyright (c) 2009-2020, NVIDIA Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -235,6 +235,9 @@ struct nvhost_device_data { struct kobject *power_kobj; /* kobject to hold power sysfs entries */ struct nvhost_device_power_attr *power_attrib; /* sysfs attributes */ + /* kobject to hold clk_cap sysfs entries */ + struct kobject clk_cap_kobj; + struct kobj_attribute *clk_cap_attrs; struct dentry *debugfs; /* debugfs directory */ u32 nvhost_timeout_default; -- cgit v1.2.2