All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu:use hw_init for sriov_gpu_reset
@ 2017-02-09  5:46 Monk Liu
       [not found] ` <1486619178-30375-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Monk Liu @ 2017-02-09  5:46 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Monk Liu

no suspend invoked so after VF FLR by host, we just
call hw_init to reinitialize IPs.

Change-Id: If09cb42b09bee6acc84e6b239ef537ad5a3df41c
Signed-off-by: Monk Liu <Monk.Liu@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 0d33bc9..7e64110 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1604,7 +1604,7 @@ int amdgpu_suspend(struct amdgpu_device *adev)
 	return 0;
 }
 
-static int amdgpu_sriov_resume_early(struct amdgpu_device *adev)
+static int amdgpu_sriov_reinit_early(struct amdgpu_device *adev)
 {
 	int i, r;
 
@@ -1615,7 +1615,7 @@ static int amdgpu_sriov_resume_early(struct amdgpu_device *adev)
 		if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON ||
 				adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC ||
 				adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH)
-			r = adev->ip_blocks[i].version->funcs->resume(adev);
+			r = adev->ip_blocks[i].version->funcs->hw_init(adev);
 
 		if (r) {
 			DRM_ERROR("resume of IP block <%s> failed %d\n",
@@ -1627,7 +1627,7 @@ static int amdgpu_sriov_resume_early(struct amdgpu_device *adev)
 	return 0;
 }
 
-static int amdgpu_sriov_resume_late(struct amdgpu_device *adev)
+static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
 {
 	int i, r;
 
@@ -1640,7 +1640,7 @@ static int amdgpu_sriov_resume_late(struct amdgpu_device *adev)
 				adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH )
 			continue;
 
-		r = adev->ip_blocks[i].version->funcs->resume(adev);
+		r = adev->ip_blocks[i].version->funcs->hw_init(adev);
 		if (r) {
 			DRM_ERROR("resume of IP block <%s> failed %d\n",
 				  adev->ip_blocks[i].version->funcs->name, r);
@@ -2433,13 +2433,13 @@ int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, bool voluntary)
 
 
 	/* Resume IP prior to SMC */
-	amdgpu_sriov_resume_early(adev);
+	amdgpu_sriov_reinit_early(adev);
 
 	/* we need recover gart prior to run SMC/CP/SDMA resume */
 	amdgpu_ttm_recover_gart(adev);
 
 	/* now we are okay to resume SMC/CP/SDMA */
-	amdgpu_sriov_resume_late(adev);
+	amdgpu_sriov_reinit_late(adev);
 
 	amdgpu_irq_gpu_reset_resume_helper(adev);
 
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* RE: [PATCH] drm/amdgpu:use hw_init for sriov_gpu_reset
       [not found] ` <1486619178-30375-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
@ 2017-02-09 14:37   ` Deucher, Alexander
       [not found]     ` <BN6PR12MB16523B5CB9E84340EF6B54A8F7450-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Deucher, Alexander @ 2017-02-09 14:37 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Monk

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Thursday, February 09, 2017 12:46 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Liu, Monk
> Subject: [PATCH] drm/amdgpu:use hw_init for sriov_gpu_reset
> 
> no suspend invoked so after VF FLR by host, we just
> call hw_init to reinitialize IPs.
> 
> Change-Id: If09cb42b09bee6acc84e6b239ef537ad5a3df41c
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@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 0d33bc9..7e64110 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1604,7 +1604,7 @@ int amdgpu_suspend(struct amdgpu_device
> *adev)
>  	return 0;
>  }
> 
> -static int amdgpu_sriov_resume_early(struct amdgpu_device *adev)
> +static int amdgpu_sriov_reinit_early(struct amdgpu_device *adev)
>  {
>  	int i, r;
> 
> @@ -1615,7 +1615,7 @@ static int amdgpu_sriov_resume_early(struct
> amdgpu_device *adev)
>  		if (adev->ip_blocks[i].version->type ==
> AMD_IP_BLOCK_TYPE_COMMON ||
>  				adev->ip_blocks[i].version->type ==
> AMD_IP_BLOCK_TYPE_GMC ||
>  				adev->ip_blocks[i].version->type ==
> AMD_IP_BLOCK_TYPE_IH)
> -			r = adev->ip_blocks[i].version->funcs-
> >resume(adev);
> +			r = adev->ip_blocks[i].version->funcs-
> >hw_init(adev);
> 
>  		if (r) {
>  			DRM_ERROR("resume of IP block <%s> failed %d\n",
> @@ -1627,7 +1627,7 @@ static int amdgpu_sriov_resume_early(struct
> amdgpu_device *adev)
>  	return 0;
>  }
> 
> -static int amdgpu_sriov_resume_late(struct amdgpu_device *adev)
> +static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
>  {
>  	int i, r;
> 
> @@ -1640,7 +1640,7 @@ static int amdgpu_sriov_resume_late(struct
> amdgpu_device *adev)
>  				adev->ip_blocks[i].version->type ==
> AMD_IP_BLOCK_TYPE_IH )
>  			continue;
> 
> -		r = adev->ip_blocks[i].version->funcs->resume(adev);
> +		r = adev->ip_blocks[i].version->funcs->hw_init(adev);
>  		if (r) {
>  			DRM_ERROR("resume of IP block <%s> failed %d\n",
>  				  adev->ip_blocks[i].version->funcs->name,
> r);
> @@ -2433,13 +2433,13 @@ int amdgpu_sriov_gpu_reset(struct
> amdgpu_device *adev, bool voluntary)
> 
> 
>  	/* Resume IP prior to SMC */
> -	amdgpu_sriov_resume_early(adev);
> +	amdgpu_sriov_reinit_early(adev);
> 
>  	/* we need recover gart prior to run SMC/CP/SDMA resume */
>  	amdgpu_ttm_recover_gart(adev);
> 
>  	/* now we are okay to resume SMC/CP/SDMA */
> -	amdgpu_sriov_resume_late(adev);
> +	amdgpu_sriov_reinit_late(adev);
> 
>  	amdgpu_irq_gpu_reset_resume_helper(adev);
> 
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu:use hw_init for sriov_gpu_reset
       [not found]     ` <BN6PR12MB16523B5CB9E84340EF6B54A8F7450-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-02-09 15:53       ` Christian König
  0 siblings, 0 replies; 3+ messages in thread
From: Christian König @ 2017-02-09 15:53 UTC (permalink / raw)
  To: Deucher, Alexander, Liu, Monk, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 09.02.2017 um 15:37 schrieb Deucher, Alexander:
>> -----Original Message-----
>> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
>> Of Monk Liu
>> Sent: Thursday, February 09, 2017 12:46 AM
>> To: amd-gfx@lists.freedesktop.org
>> Cc: Liu, Monk
>> Subject: [PATCH] drm/amdgpu:use hw_init for sriov_gpu_reset
>>
>> no suspend invoked so after VF FLR by host, we just
>> call hw_init to reinitialize IPs.
>>
>> Change-Id: If09cb42b09bee6acc84e6b239ef537ad5a3df41c
>> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

Reviewed-by: Christian König <christian.koenig@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 0d33bc9..7e64110 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -1604,7 +1604,7 @@ int amdgpu_suspend(struct amdgpu_device
>> *adev)
>>   	return 0;
>>   }
>>
>> -static int amdgpu_sriov_resume_early(struct amdgpu_device *adev)
>> +static int amdgpu_sriov_reinit_early(struct amdgpu_device *adev)
>>   {
>>   	int i, r;
>>
>> @@ -1615,7 +1615,7 @@ static int amdgpu_sriov_resume_early(struct
>> amdgpu_device *adev)
>>   		if (adev->ip_blocks[i].version->type ==
>> AMD_IP_BLOCK_TYPE_COMMON ||
>>   				adev->ip_blocks[i].version->type ==
>> AMD_IP_BLOCK_TYPE_GMC ||
>>   				adev->ip_blocks[i].version->type ==
>> AMD_IP_BLOCK_TYPE_IH)
>> -			r = adev->ip_blocks[i].version->funcs-
>>> resume(adev);
>> +			r = adev->ip_blocks[i].version->funcs-
>>> hw_init(adev);
>>   		if (r) {
>>   			DRM_ERROR("resume of IP block <%s> failed %d\n",
>> @@ -1627,7 +1627,7 @@ static int amdgpu_sriov_resume_early(struct
>> amdgpu_device *adev)
>>   	return 0;
>>   }
>>
>> -static int amdgpu_sriov_resume_late(struct amdgpu_device *adev)
>> +static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
>>   {
>>   	int i, r;
>>
>> @@ -1640,7 +1640,7 @@ static int amdgpu_sriov_resume_late(struct
>> amdgpu_device *adev)
>>   				adev->ip_blocks[i].version->type ==
>> AMD_IP_BLOCK_TYPE_IH )
>>   			continue;
>>
>> -		r = adev->ip_blocks[i].version->funcs->resume(adev);
>> +		r = adev->ip_blocks[i].version->funcs->hw_init(adev);
>>   		if (r) {
>>   			DRM_ERROR("resume of IP block <%s> failed %d\n",
>>   				  adev->ip_blocks[i].version->funcs->name,
>> r);
>> @@ -2433,13 +2433,13 @@ int amdgpu_sriov_gpu_reset(struct
>> amdgpu_device *adev, bool voluntary)
>>
>>
>>   	/* Resume IP prior to SMC */
>> -	amdgpu_sriov_resume_early(adev);
>> +	amdgpu_sriov_reinit_early(adev);
>>
>>   	/* we need recover gart prior to run SMC/CP/SDMA resume */
>>   	amdgpu_ttm_recover_gart(adev);
>>
>>   	/* now we are okay to resume SMC/CP/SDMA */
>> -	amdgpu_sriov_resume_late(adev);
>> +	amdgpu_sriov_reinit_late(adev);
>>
>>   	amdgpu_irq_gpu_reset_resume_helper(adev);
>>
>> --
>> 2.7.4
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2017-02-09 15:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-09  5:46 [PATCH] drm/amdgpu:use hw_init for sriov_gpu_reset Monk Liu
     [not found] ` <1486619178-30375-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-09 14:37   ` Deucher, Alexander
     [not found]     ` <BN6PR12MB16523B5CB9E84340EF6B54A8F7450-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-09 15:53       ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.