RE: [PATCH 2/4] drm/amdkfd: Pass MES/RS64 information to sysfs

2022-06-08 Thread Sider, Graham
[AMD Official Use Only - General]

I was originally using the MES scheduler version in Thunk to check whether to 
use userptr or non-paged memory for the queue allocation. Just today though 
I've changed this to always use non-paged so this isn't needed anymore. Maybe 
instead we can think about adding this to debugfs, I agree.

Thanks,
Graham 

-Original Message-
From: Kuehling, Felix  
Sent: Wednesday, June 8, 2022 3:31 PM
To: Sider, Graham ; amd-gfx@lists.freedesktop.org
Cc: Yang, Philip ; Joshi, Mukul 
Subject: Re: [PATCH 2/4] drm/amdkfd: Pass MES/RS64 information to sysfs

On 2022-06-07 18:50, Graham Sider wrote:
> Make MES/RS64 CP enablement and MES scheduler/MES KIQ versions 
> available through sysfs.
>
> Signed-off-by: Graham Sider 

Why do we need to expose this to user mode applications? They don't interact 
directly with the scheduler or the KIQ. I cannot think of any reasonable 
conditions in usermode that would need the scheduler or KIQ version number. It 
may make sense in debugfs, but not here.

Regards,
   Felix


> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 8 
>   1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c 
> b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> index 02efae4f5549..51c8a285baaf 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> @@ -571,6 +571,14 @@ static ssize_t node_show(struct kobject *kobj, struct 
> attribute *attr,
> dev->gpu->sdma_fw_version);
>   sysfs_show_64bit_prop(buffer, offs, "unique_id",
> dev->gpu->adev->unique_id);
> + sysfs_show_32bit_prop(buffer, offs, "mes_enabled",
> +   (uint32_t)dev->gpu->adev->enable_mes);
> + sysfs_show_32bit_prop(buffer, offs, "rs64_cp_enabled",
> +   
> (uint32_t)dev->gpu->adev->gfx.rs64_enable);
> + sysfs_show_32bit_prop(buffer, offs, "mes_sched_version",
> +   dev->gpu->adev->mes.sched_version);
> + sysfs_show_32bit_prop(buffer, offs, "mes_kiq_version",
> +   dev->gpu->adev->mes.kiq_version);
>   
>   }
>   


Re: [PATCH 2/4] drm/amdkfd: Pass MES/RS64 information to sysfs

2022-06-08 Thread Felix Kuehling

On 2022-06-07 18:50, Graham Sider wrote:

Make MES/RS64 CP enablement and MES scheduler/MES KIQ versions available
through sysfs.

Signed-off-by: Graham Sider 


Why do we need to expose this to user mode applications? They don't 
interact directly with the scheduler or the KIQ. I cannot think of any 
reasonable conditions in usermode that would need the scheduler or KIQ 
version number. It may make sense in debugfs, but not here.


Regards,
  Felix



---
  drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 8 
  1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 02efae4f5549..51c8a285baaf 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -571,6 +571,14 @@ static ssize_t node_show(struct kobject *kobj, struct 
attribute *attr,
  dev->gpu->sdma_fw_version);
sysfs_show_64bit_prop(buffer, offs, "unique_id",
  dev->gpu->adev->unique_id);
+   sysfs_show_32bit_prop(buffer, offs, "mes_enabled",
+ (uint32_t)dev->gpu->adev->enable_mes);
+   sysfs_show_32bit_prop(buffer, offs, "rs64_cp_enabled",
+ 
(uint32_t)dev->gpu->adev->gfx.rs64_enable);
+   sysfs_show_32bit_prop(buffer, offs, "mes_sched_version",
+ dev->gpu->adev->mes.sched_version);
+   sysfs_show_32bit_prop(buffer, offs, "mes_kiq_version",
+ dev->gpu->adev->mes.kiq_version);
  
  	}