All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: fix PSP autoload twice in FLR
@ 2020-07-24  9:28 Liu ChengZhe
  0 siblings, 0 replies; 9+ messages in thread
From: Liu ChengZhe @ 2020-07-24  9:28 UTC (permalink / raw)
  To: amd-gfx; +Cc: Liu ChengZhe

the block->status.hw = false assignment will overwrite PSP's previous
hw status, which will cause PSP execute resume operation after hw init.

Signed-off-by: Liu ChengZhe <ChengZhe.Liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 62ecac97fbd2..88c681957d39 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2574,6 +2574,10 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
 		AMD_IP_BLOCK_TYPE_IH,
 	};
 
+	for (i = 0; i < adev->num_ip_blocks; i++) {
+		adev->ip_blocks[i].status.hw = false;
+	}
+
 	for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
 		int j;
 		struct amdgpu_ip_block *block;
@@ -2581,7 +2585,6 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
 		for (j = 0; j < adev->num_ip_blocks; j++) {
 			block = &adev->ip_blocks[j];
 
-			block->status.hw = false;
 			if (block->version->type != ip_order[i] ||
 				!block->status.valid)
 				continue;
-- 
2.25.1

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

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

* Re: [PATCH] drm/amdgpu: fix PSP autoload twice in FLR
  2020-07-29  8:50 Liu ChengZhe
@ 2020-07-29 14:18 ` Luben Tuikov
  0 siblings, 0 replies; 9+ messages in thread
From: Luben Tuikov @ 2020-07-29 14:18 UTC (permalink / raw)
  To: Liu ChengZhe, amd-gfx
  Cc: Deucher Alexander, Jack Xiao, Feifei Xu, Kevin Wang,
	Xiaojie Yuan, Christian König, Hawking Zhang

Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>

On 2020-07-29 04:50, Liu ChengZhe wrote:
> Assigning false to block->status.hw overwrites PSP's previous
> hardware status, which causes the PSP to Resume operation after
> hardware init.
> 
> Remove this assignment and let the PSP execute Resume operation
> when it is told to.
> 
> v2: Remove the braces.
> v3: Modify the description.
> 
> Signed-off-by: Liu ChengZhe <ChengZhe.Liu@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 62ecac97fbd2..5d9affa1d35a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2574,6 +2574,9 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
>  		AMD_IP_BLOCK_TYPE_IH,
>  	};
>  
> +	for (i = 0; i < adev->num_ip_blocks; i++)
> +		adev->ip_blocks[i].status.hw = false;
> +
>  	for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
>  		int j;
>  		struct amdgpu_ip_block *block;
> @@ -2581,7 +2584,6 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
>  		for (j = 0; j < adev->num_ip_blocks; j++) {
>  			block = &adev->ip_blocks[j];
>  
> -			block->status.hw = false;
>  			if (block->version->type != ip_order[i] ||
>  				!block->status.valid)
>  				continue;
> 

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

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

* [PATCH] drm/amdgpu: fix PSP autoload twice in FLR
@ 2020-07-29  8:50 Liu ChengZhe
  2020-07-29 14:18 ` Luben Tuikov
  0 siblings, 1 reply; 9+ messages in thread
From: Liu ChengZhe @ 2020-07-29  8:50 UTC (permalink / raw)
  To: amd-gfx
  Cc: Deucher Alexander, Jack Xiao, Feifei Xu, Kevin Wang,
	Liu ChengZhe, Tuikov Luben, Xiaojie Yuan, Christian König,
	Hawking Zhang

Assigning false to block->status.hw overwrites PSP's previous
hardware status, which causes the PSP to Resume operation after
hardware init.

Remove this assignment and let the PSP execute Resume operation
when it is told to.

v2: Remove the braces.
v3: Modify the description.

Signed-off-by: Liu ChengZhe <ChengZhe.Liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 62ecac97fbd2..5d9affa1d35a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2574,6 +2574,9 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
 		AMD_IP_BLOCK_TYPE_IH,
 	};
 
+	for (i = 0; i < adev->num_ip_blocks; i++)
+		adev->ip_blocks[i].status.hw = false;
+
 	for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
 		int j;
 		struct amdgpu_ip_block *block;
@@ -2581,7 +2584,6 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
 		for (j = 0; j < adev->num_ip_blocks; j++) {
 			block = &adev->ip_blocks[j];
 
-			block->status.hw = false;
 			if (block->version->type != ip_order[i] ||
 				!block->status.valid)
 				continue;
-- 
2.25.1

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

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

* RE: [PATCH] drm/amdgpu: fix PSP autoload twice in FLR
  2020-07-28 18:48   ` Luben Tuikov
@ 2020-07-29  8:44     ` Liu, Cheng Zhe
  0 siblings, 0 replies; 9+ messages in thread
From: Liu, Cheng Zhe @ 2020-07-29  8:44 UTC (permalink / raw)
  To: Tuikov, Luben, amd-gfx
  Cc: Xiao, Jack, Xu, Feifei, Wang,  Kevin(Yang),
	Deucher, Alexander, Yuan, Xiaojie, Koenig, Christian, Zhang,
	 Hawking

[AMD Official Use Only - Internal Distribution Only]

Thanks for the modification!

-----Original Message-----
From: Tuikov, Luben <Luben.Tuikov@amd.com> 
Sent: Wednesday, July 29, 2020 2:49 AM
To: Liu, Cheng Zhe <ChengZhe.Liu@amd.com>; amd-gfx@lists.freedesktop.org
Cc: Koenig, Christian <Christian.Koenig@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Xiao, Jack <Jack.Xiao@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>; Xu, Feifei <Feifei.Xu@amd.com>; Wang, Kevin(Yang) <Kevin1.Wang@amd.com>; Yuan, Xiaojie <Xiaojie.Yuan@amd.com>
Subject: Re: [PATCH] drm/amdgpu: fix PSP autoload twice in FLR

On 2020-07-28 2:04 p.m., Luben Tuikov wrote:
> Thanks for removing the braces.
> 
> On 2020-07-27 10:29 p.m., Liu ChengZhe wrote:
>> the block->status.hw = false assignment will overwrite PSP's previous
> ^^^^^^
> You want to start a sentence here. Capitalize "The".
> Also don't use future tense in commit descriptions (and commit titles).
> Simply use present tense. Using future tense makes it confusing if 
> this is what the code used to do before this change or if the code is 
> doing this right now as someone is reading the commit in the future with "git log".
> 
>> hw status, which will cause PSP execute resume operation after hw init.
> 
> I've found it best to describe what's being done as if telling a story.
> Break it down into "tell what's happening" and "tell what what's fixed 
> and how it affects the rest of the system". Something like this:
> 
> 	Assigning false to block->status.hw overwrites PSP's previous
> 	hardware status, which causes the PSP to resume operation after
> 	hardware init.
> 
> 	Remove this assignment and let the PSP start when it is told to.
> 
> Check if the above rendition of your change is correct, and use it if so.

Double checking now, since "resume" is an op, you should capitalize it.

"... which causes the PSP to execute Resume operation right  after hardware init.

 Remove this assignment and let the PSP execute Resume operation when it  is told to do so."

Or something to that effect.

Regards,
Luben

> 
> Regards,
> Luben
> 
>>
>> v2: (R)remove the braces(.)
> 
> 
> 
>>
>> Signed-off-by: Liu ChengZhe <ChengZhe.Liu@amd.com>
>> ---
>>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index 62ecac97fbd2..5d9affa1d35a 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -2574,6 +2574,9 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
>>  		AMD_IP_BLOCK_TYPE_IH,
>>  	};
>>  
>> +	for (i = 0; i < adev->num_ip_blocks; i++)
>> +		adev->ip_blocks[i].status.hw = false;
>> +
>>  	for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
>>  		int j;
>>  		struct amdgpu_ip_block *block;
>> @@ -2581,7 +2584,6 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
>>  		for (j = 0; j < adev->num_ip_blocks; j++) {
>>  			block = &adev->ip_blocks[j];
>>  
>> -			block->status.hw = false;
>>  			if (block->version->type != ip_order[i] ||
>>  				!block->status.valid)
>>  				continue;
>>
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH] drm/amdgpu: fix PSP autoload twice in FLR
  2020-07-28 18:04 ` Luben Tuikov
@ 2020-07-28 18:48   ` Luben Tuikov
  2020-07-29  8:44     ` Liu, Cheng Zhe
  0 siblings, 1 reply; 9+ messages in thread
From: Luben Tuikov @ 2020-07-28 18:48 UTC (permalink / raw)
  To: Liu ChengZhe, amd-gfx
  Cc: Jack Xiao, Feifei Xu, Kevin Wang, Deucher Alexander,
	Xiaojie Yuan, Christian König, Hawking Zhang

On 2020-07-28 2:04 p.m., Luben Tuikov wrote:
> Thanks for removing the braces.
> 
> On 2020-07-27 10:29 p.m., Liu ChengZhe wrote:
>> the block->status.hw = false assignment will overwrite PSP's previous
> ^^^^^^
> You want to start a sentence here. Capitalize "The".
> Also don't use future tense in commit descriptions (and commit titles).
> Simply use present tense. Using future tense makes it confusing if
> this is what the code used to do before this change or if the code
> is doing this right now as someone is reading the commit in the future with "git log".
> 
>> hw status, which will cause PSP execute resume operation after hw init.
> 
> I've found it best to describe what's being done as if telling a story.
> Break it down into "tell what's happening" and "tell what what's fixed and
> how it affects the rest of the system". Something like this:
> 
> 	Assigning false to block->status.hw overwrites PSP's previous
> 	hardware status, which causes the PSP to resume operation after
> 	hardware init.
> 
> 	Remove this assignment and let the PSP start when it is told to.
> 
> Check if the above rendition of your change is correct, and use it if so.

Double checking now, since "resume" is an op, you should capitalize it.

"... which causes the PSP to execute Resume operation right
 after hardware init.

 Remove this assignment and let the PSP execute Resume operation when it
 is told to do so."

Or something to that effect.

Regards,
Luben

> 
> Regards,
> Luben
> 
>>
>> v2: (R)remove the braces(.)
> 
> 
> 
>>
>> Signed-off-by: Liu ChengZhe <ChengZhe.Liu@amd.com>
>> ---
>>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> index 62ecac97fbd2..5d9affa1d35a 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>> @@ -2574,6 +2574,9 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
>>  		AMD_IP_BLOCK_TYPE_IH,
>>  	};
>>  
>> +	for (i = 0; i < adev->num_ip_blocks; i++)
>> +		adev->ip_blocks[i].status.hw = false;
>> +
>>  	for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
>>  		int j;
>>  		struct amdgpu_ip_block *block;
>> @@ -2581,7 +2584,6 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
>>  		for (j = 0; j < adev->num_ip_blocks; j++) {
>>  			block = &adev->ip_blocks[j];
>>  
>> -			block->status.hw = false;
>>  			if (block->version->type != ip_order[i] ||
>>  				!block->status.valid)
>>  				continue;
>>
> 

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

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

* Re: [PATCH] drm/amdgpu: fix PSP autoload twice in FLR
  2020-07-28  2:29 Liu ChengZhe
@ 2020-07-28 18:04 ` Luben Tuikov
  2020-07-28 18:48   ` Luben Tuikov
  0 siblings, 1 reply; 9+ messages in thread
From: Luben Tuikov @ 2020-07-28 18:04 UTC (permalink / raw)
  To: Liu ChengZhe, amd-gfx
  Cc: Jack Xiao, Feifei Xu, Kevin Wang, Deucher Alexander,
	Xiaojie Yuan, Christian König, Hawking Zhang

Thanks for removing the braces.

On 2020-07-27 10:29 p.m., Liu ChengZhe wrote:
> the block->status.hw = false assignment will overwrite PSP's previous
^^^^^^
You want to start a sentence here. Capitalize "The".
Also don't use future tense in commit descriptions (and commit titles).
Simply use present tense. Using future tense makes it confusing if
this is what the code used to do before this change or if the code
is doing this right now as someone is reading the commit in the future with "git log".

> hw status, which will cause PSP execute resume operation after hw init.

I've found it best to describe what's being done as if telling a story.
Break it down into "tell what's happening" and "tell what what's fixed and
how it affects the rest of the system". Something like this:

	Assigning false to block->status.hw overwrites PSP's previous
	hardware status, which causes the PSP to resume operation after
	hardware init.

	Remove this assignment and let the PSP start when it is told to.

Check if the above rendition of your change is correct, and use it if so.

Regards,
Luben

> 
> v2: (R)remove the braces(.)



> 
> Signed-off-by: Liu ChengZhe <ChengZhe.Liu@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 62ecac97fbd2..5d9affa1d35a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2574,6 +2574,9 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
>  		AMD_IP_BLOCK_TYPE_IH,
>  	};
>  
> +	for (i = 0; i < adev->num_ip_blocks; i++)
> +		adev->ip_blocks[i].status.hw = false;
> +
>  	for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
>  		int j;
>  		struct amdgpu_ip_block *block;
> @@ -2581,7 +2584,6 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
>  		for (j = 0; j < adev->num_ip_blocks; j++) {
>  			block = &adev->ip_blocks[j];
>  
> -			block->status.hw = false;
>  			if (block->version->type != ip_order[i] ||
>  				!block->status.valid)
>  				continue;
> 

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

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

* [PATCH] drm/amdgpu: fix PSP autoload twice in FLR
@ 2020-07-28  2:29 Liu ChengZhe
  2020-07-28 18:04 ` Luben Tuikov
  0 siblings, 1 reply; 9+ messages in thread
From: Liu ChengZhe @ 2020-07-28  2:29 UTC (permalink / raw)
  To: amd-gfx
  Cc: Jack Xiao, Feifei Xu, Kevin Wang, Liu ChengZhe, Tuikov Luben,
	Deucher Alexander, Xiaojie Yuan, Christian König,
	Hawking Zhang

the block->status.hw = false assignment will overwrite PSP's previous
hw status, which will cause PSP execute resume operation after hw init.

v2: remove the braces

Signed-off-by: Liu ChengZhe <ChengZhe.Liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 62ecac97fbd2..5d9affa1d35a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2574,6 +2574,9 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
 		AMD_IP_BLOCK_TYPE_IH,
 	};
 
+	for (i = 0; i < adev->num_ip_blocks; i++)
+		adev->ip_blocks[i].status.hw = false;
+
 	for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
 		int j;
 		struct amdgpu_ip_block *block;
@@ -2581,7 +2584,6 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
 		for (j = 0; j < adev->num_ip_blocks; j++) {
 			block = &adev->ip_blocks[j];
 
-			block->status.hw = false;
 			if (block->version->type != ip_order[i] ||
 				!block->status.valid)
 				continue;
-- 
2.25.1

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

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

* Re: [PATCH] drm/amdgpu: fix PSP autoload twice in FLR
  2020-07-27 11:03 Liu ChengZhe
@ 2020-07-27 19:16 ` Luben Tuikov
  0 siblings, 0 replies; 9+ messages in thread
From: Luben Tuikov @ 2020-07-27 19:16 UTC (permalink / raw)
  To: Liu ChengZhe, amd-gfx
  Cc: Jack Xiao, Feifei Xu, Kevin Wang, Deucher Alexander,
	Xiaojie Yuan, Christian König, Hawking Zhang

On 2020-07-27 7:03 a.m., Liu ChengZhe wrote:
> the block->status.hw = false assignment will overwrite PSP's previous
> hw status, which will cause PSP execute resume operation after hw init.
> 
> Signed-off-by: Liu ChengZhe <ChengZhe.Liu@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 62ecac97fbd2..88c681957d39 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2574,6 +2574,10 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
>  		AMD_IP_BLOCK_TYPE_IH,
>  	};
>  
> +	for (i = 0; i < adev->num_ip_blocks; i++) {
> +		adev->ip_blocks[i].status.hw = false;
> +	}
> +

Braces surrounding a single statement block are unnecessary
and "checkpatch" complains about it. Just remote the braces
around a single statement block in loops.

Regards,
Luben

>  	for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
>  		int j;
>  		struct amdgpu_ip_block *block;
> @@ -2581,7 +2585,6 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
>  		for (j = 0; j < adev->num_ip_blocks; j++) {
>  			block = &adev->ip_blocks[j];
>  
> -			block->status.hw = false;
>  			if (block->version->type != ip_order[i] ||
>  				!block->status.valid)
>  				continue;
> 

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

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

* [PATCH] drm/amdgpu: fix PSP autoload twice in FLR
@ 2020-07-27 11:03 Liu ChengZhe
  2020-07-27 19:16 ` Luben Tuikov
  0 siblings, 1 reply; 9+ messages in thread
From: Liu ChengZhe @ 2020-07-27 11:03 UTC (permalink / raw)
  To: amd-gfx
  Cc: Jack Xiao, Feifei Xu, Kevin Wang, Liu ChengZhe, Tuikov Luben,
	Deucher Alexander, Xiaojie Yuan, Christian König,
	Hawking Zhang

the block->status.hw = false assignment will overwrite PSP's previous
hw status, which will cause PSP execute resume operation after hw init.

Signed-off-by: Liu ChengZhe <ChengZhe.Liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 62ecac97fbd2..88c681957d39 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2574,6 +2574,10 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
 		AMD_IP_BLOCK_TYPE_IH,
 	};
 
+	for (i = 0; i < adev->num_ip_blocks; i++) {
+		adev->ip_blocks[i].status.hw = false;
+	}
+
 	for (i = 0; i < ARRAY_SIZE(ip_order); i++) {
 		int j;
 		struct amdgpu_ip_block *block;
@@ -2581,7 +2585,6 @@ static int amdgpu_device_ip_reinit_early_sriov(struct amdgpu_device *adev)
 		for (j = 0; j < adev->num_ip_blocks; j++) {
 			block = &adev->ip_blocks[j];
 
-			block->status.hw = false;
 			if (block->version->type != ip_order[i] ||
 				!block->status.valid)
 				continue;
-- 
2.25.1

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

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

end of thread, other threads:[~2020-07-29 14:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24  9:28 [PATCH] drm/amdgpu: fix PSP autoload twice in FLR Liu ChengZhe
2020-07-27 11:03 Liu ChengZhe
2020-07-27 19:16 ` Luben Tuikov
2020-07-28  2:29 Liu ChengZhe
2020-07-28 18:04 ` Luben Tuikov
2020-07-28 18:48   ` Luben Tuikov
2020-07-29  8:44     ` Liu, Cheng Zhe
2020-07-29  8:50 Liu ChengZhe
2020-07-29 14:18 ` Luben Tuikov

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.