drm/tegra: virt: Fix nvenc usage measurement

Communication with BPMP attempted to use 'msenc' as engine name.
Correct this to use 'nvenc' while keeping userspace debugfs directory
as 'msenc'.

Bug 4559545

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I4fef852dd3312c763c5845bf8b43fac082863bad
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3141443
(cherry picked from commit f2543128b14fb5df7764df7bfa3456bf0df4f945)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3193472
Reviewed-by: Santosh BS <santoshb@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Mikko Perttunen
2024-04-15 10:47:34 +03:00
committed by mobile promotions
parent 97434deea4
commit e594972dd7

View File

@@ -502,21 +502,26 @@ DEFINE_SHOW_ATTRIBUTE(actmon_debugfs_usage);
static void virt_engine_setup_actmon_debugfs(struct virt_engine *virt)
{
const char *dir;
switch (virt->client.base.class) {
case HOST1X_CLASS_VIC:
virt->name = "vic";
dir = "vic";
break;
case HOST1X_CLASS_NVENC:
virt->name = "msenc";
virt->name = "nvenc";
dir = "msenc";
break;
case HOST1X_CLASS_NVDEC:
virt->name = "nvdec";
dir = "nvdec";
break;
default:
return;
}
virt->actmon_debugfs_dir = debugfs_create_dir(virt->name, NULL);
virt->actmon_debugfs_dir = debugfs_create_dir(dir, NULL);
debugfs_create_file("usage", S_IRUGO, virt->actmon_debugfs_dir, virt, &actmon_debugfs_usage_fops);
}