]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdkfd: Export the cwsr_size and ctl_stack_size to userspace
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 5 Dec 2025 18:41:58 +0000 (12:41 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Dec 2025 19:24:25 +0000 (14:24 -0500)
This is important for userspace to avoid hardcoding VGPR size.

Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_topology.c

index 9c3e8f946a3d582380ec31b03726359fd46eecbf..a0990dd2378c17e6666d5e925be35215a1bf3d7b 100644 (file)
@@ -491,6 +491,10 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr,
                              dev->node_props.num_sdma_queues_per_engine);
        sysfs_show_32bit_prop(buffer, offs, "num_cp_queues",
                              dev->node_props.num_cp_queues);
+       sysfs_show_32bit_prop(buffer, offs, "cwsr_size",
+                             dev->node_props.cwsr_size);
+       sysfs_show_32bit_prop(buffer, offs, "ctl_stack_size",
+                             dev->node_props.ctl_stack_size);
 
        if (dev->gpu) {
                log_max_watch_addr =