gpu: host1x: multi device support

Update the node names to support multi device config.

Bug 4505161
Jira NVGPU-11046

Signed-off-by: Santosh BS <santoshb@nvidia.com>
Change-Id: Id5cc345d9ee2eab96e0c999c9e6b510642a398d9
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142192
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
This commit is contained in:
Santosh BS
2024-05-21 11:05:02 +00:00
committed by mobile promotions
parent 00cdac08b6
commit 566858f37f
3 changed files with 15 additions and 6 deletions

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2010 Google, Inc.
* Author: Erik Gilling <konkers@android.com>
*
* Copyright (C) 2011-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (C) 2011-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#include <linux/debugfs.h>
@@ -191,7 +191,16 @@ static const struct file_operations host1x_debug_fops = {
static void host1x_debugfs_init(struct host1x *host1x)
{
struct dentry *de = debugfs_create_dir("tegra-host1x", NULL);
struct dentry *de;
char dir_name[64];
int numa_node = dev_to_node(host1x->dev);
if (numa_node != NUMA_NO_NODE)
sprintf(dir_name, "tegra-host1x.%d", numa_node);
else
sprintf(dir_name, "tegra-host1x");
de = debugfs_create_dir(dir_name, NULL);
/* Store the created entry */
host1x->debugfs = de;