AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdkfd: report dispatch id always saved in ttmps after gc9.4.2
@ 2023-07-11 17:19 Jonathan Kim
  2023-07-11 18:32 ` Felix Kuehling
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Kim @ 2023-07-11 17:19 UTC (permalink / raw)
  To: amd-gfx; +Cc: JinHuiEric.Huang, Jonathan Kim

The feature to save the dispatch ID in trap temporaries 6 & 7 on context
save is unconditionally enabled during MQD initialization.

Now that TTMPs are always setup regardless of debug mode for GC 9.4.3, we
should report that the dispatch ID is always available for debug/trap
handling.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 1a4cdee86759..eeedc3ddffeb 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -1941,10 +1941,11 @@ static void kfd_topology_set_capabilities(struct kfd_topology_device *dev)
 				HSA_DBG_WATCH_ADDR_MASK_LO_BIT_GFX9 |
 				HSA_DBG_WATCH_ADDR_MASK_HI_BIT;
 
-		if (KFD_GC_VERSION(dev->gpu) < IP_VERSION(9, 4, 2))
+		if (KFD_GC_VERSION(dev->gpu) != IP_VERSION(9, 4, 2))
 			dev->node_props.debug_prop |=
 				HSA_DBG_DISPATCH_INFO_ALWAYS_VALID;
-		else
+
+		if (KFD_GC_VERSION(dev->gpu) >= IP_VERSION(9, 4, 2))
 			dev->node_props.capability |=
 				HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED;
 	} else {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amdkfd: report dispatch id always saved in ttmps after gc9.4.2
  2023-07-11 17:19 [PATCH] drm/amdkfd: report dispatch id always saved in ttmps after gc9.4.2 Jonathan Kim
@ 2023-07-11 18:32 ` Felix Kuehling
  0 siblings, 0 replies; 2+ messages in thread
From: Felix Kuehling @ 2023-07-11 18:32 UTC (permalink / raw)
  To: Jonathan Kim, amd-gfx; +Cc: JinHuiEric.Huang

On 2023-07-11 13:19, Jonathan Kim wrote:
> The feature to save the dispatch ID in trap temporaries 6 & 7 on context
> save is unconditionally enabled during MQD initialization.
>
> Now that TTMPs are always setup regardless of debug mode for GC 9.4.3, we
> should report that the dispatch ID is always available for debug/trap
> handling.
>
> Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>


> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> index 1a4cdee86759..eeedc3ddffeb 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> @@ -1941,10 +1941,11 @@ static void kfd_topology_set_capabilities(struct kfd_topology_device *dev)
>   				HSA_DBG_WATCH_ADDR_MASK_LO_BIT_GFX9 |
>   				HSA_DBG_WATCH_ADDR_MASK_HI_BIT;
>   
> -		if (KFD_GC_VERSION(dev->gpu) < IP_VERSION(9, 4, 2))
> +		if (KFD_GC_VERSION(dev->gpu) != IP_VERSION(9, 4, 2))
>   			dev->node_props.debug_prop |=
>   				HSA_DBG_DISPATCH_INFO_ALWAYS_VALID;
> -		else
> +
> +		if (KFD_GC_VERSION(dev->gpu) >= IP_VERSION(9, 4, 2))
>   			dev->node_props.capability |=
>   				HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED;
>   	} else {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-11 18:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-11 17:19 [PATCH] drm/amdkfd: report dispatch id always saved in ttmps after gc9.4.2 Jonathan Kim
2023-07-11 18:32 ` Felix Kuehling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox