AMD-GFX Archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/amdgpu: enable interrupt prior to kfd device_init
@ 2024-01-24  8:58 Le Ma
  2024-01-24 10:29 ` Lazar, Lijo
  0 siblings, 1 reply; 2+ messages in thread
From: Le Ma @ 2024-01-24  8:58 UTC (permalink / raw
  To: amd-gfx; +Cc: alexander.deucher, Le Ma, felix.kuehling, lijo.lazar,
	hawking.zhang

This patch is to eliminate interrupt warning below:

  "[drm] Fence fallback timer expired on ring sdma0.0".

An early vm pt clearing job is sent to SDMA ahead of interrupt enabled,
introduced by patch below:

  - drm/amdkfd: Export DMABufs from KFD using GEM handles

Signed-off-by: Le Ma <le.ma@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 56d9dfa61290..c8aa07282366 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2833,12 +2833,6 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
 	if (r)
 		goto init_failed;
 
-	/* Don't init kfd if whole hive need to be reset during init */
-	if (!adev->gmc.xgmi.pending_reset) {
-		kgd2kfd_init_zone_device(adev);
-		amdgpu_amdkfd_device_init(adev);
-	}
-
 	amdgpu_fru_get_product_info(adev);
 
 init_failed:
@@ -4204,6 +4198,12 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 
 	amdgpu_fence_driver_hw_init(adev);
 
+	/* Don't init kfd if whole hive need to be reset during init */
+	if (!adev->gmc.xgmi.pending_reset) {
+		kgd2kfd_init_zone_device(adev);
+		amdgpu_amdkfd_device_init(adev);
+	}
+
 	dev_info(adev->dev,
 		"SE %d, SH per SE %d, CU per SH %d, active_cu_number %d\n",
 			adev->gfx.config.max_shader_engines,
-- 
2.38.1


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

* Re: [PATCH 1/1] drm/amdgpu: enable interrupt prior to kfd device_init
  2024-01-24  8:58 [PATCH 1/1] drm/amdgpu: enable interrupt prior to kfd device_init Le Ma
@ 2024-01-24 10:29 ` Lazar, Lijo
  0 siblings, 0 replies; 2+ messages in thread
From: Lazar, Lijo @ 2024-01-24 10:29 UTC (permalink / raw
  To: Le Ma, amd-gfx; +Cc: alexander.deucher, felix.kuehling, hawking.zhang



On 1/24/2024 2:28 PM, Le Ma wrote:
> This patch is to eliminate interrupt warning below:
> 
>   "[drm] Fence fallback timer expired on ring sdma0.0".
> 
> An early vm pt clearing job is sent to SDMA ahead of interrupt enabled,
> introduced by patch below:
> 
>   - drm/amdkfd: Export DMABufs from KFD using GEM handles

I think the fix needs to be in the above patch. In this flow, the client
is initialized even before the drm device is registered.

Thanks,
Lijo

> Signed-off-by: Le Ma <le.ma@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 56d9dfa61290..c8aa07282366 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2833,12 +2833,6 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
>  	if (r)
>  		goto init_failed;
>  
> -	/* Don't init kfd if whole hive need to be reset during init */
> -	if (!adev->gmc.xgmi.pending_reset) {
> -		kgd2kfd_init_zone_device(adev);
> -		amdgpu_amdkfd_device_init(adev);
> -	}
> -
>  	amdgpu_fru_get_product_info(adev);
>  
>  init_failed:
> @@ -4204,6 +4198,12 @@ int amdgpu_device_init(struct amdgpu_device *adev,
>  
>  	amdgpu_fence_driver_hw_init(adev);
>  
> +	/* Don't init kfd if whole hive need to be reset during init */
> +	if (!adev->gmc.xgmi.pending_reset) {
> +		kgd2kfd_init_zone_device(adev);
> +		amdgpu_amdkfd_device_init(adev);
> +	}
> +
>  	dev_info(adev->dev,
>  		"SE %d, SH per SE %d, CU per SH %d, active_cu_number %d\n",
>  			adev->gfx.config.max_shader_engines,

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

end of thread, other threads:[~2024-01-24 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-24  8:58 [PATCH 1/1] drm/amdgpu: enable interrupt prior to kfd device_init Le Ma
2024-01-24 10:29 ` Lazar, Lijo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).