RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

2019-11-29 Thread Liu, Monk
Do you mean the code path of " if (adev->firmware.load_type != 
AMDGPU_FW_LOAD_PSP) " , if so already handled 

_
Monk Liu|GPU Virtualization Team |AMD


-Original Message-
From: Zhang, Hawking  
Sent: Friday, November 29, 2019 5:22 PM
To: Liu, Monk ; amd-gfx@lists.freedesktop.org
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

[AMD Public Use]

BTW, Please also make the change for backdoor loading code path as we need that 
for further ASIC bring up. Thanks.

Regards,
Hawking

-Original Message-
From: Zhang, Hawking 
Sent: 2019年11月29日 17:08
To: Liu, Monk ; amd-gfx@lists.freedesktop.org
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

[AMD Official Use Only - Internal Distribution Only]

The gfx10 PG and gfxoff are fully controlled by RLC and SMU fw and don't need 
driver to be involved anymore. So the legacy programing for 
gfx_idle_threshold.etc will not be applied to gfx10. 

More aggressively, let's drop gfx_v10_0_init_pg and just init csb. 

Regards,
Hawking
-Original Message-
From: Liu, Monk  
Sent: 2019年11月29日 16:47
To: Zhang, Hawking ; amd-gfx@lists.freedesktop.org
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

For now init_pg() is good enough for bare-metal and SR-IOV, but checkout GFX9, 
there are more jobs in init_pg(), so in the future I'd expect there will be 
More lines come into init_pg() on gfx10 and by that time I need to modify 
init_pg() , 

So IMHO the best way is use init_csb() from the beginning 

Thanks
_
Monk Liu|GPU Virtualization Team |AMD


-Original Message-
From: Zhang, Hawking  
Sent: Friday, November 29, 2019 4:43 PM
To: Liu, Monk ; amd-gfx@lists.freedesktop.org
Cc: Liu, Monk 
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

[AMD Official Use Only - Internal Distribution Only]

I don't think you need to introduce SRIOV specific path here. The 
gfx_v10_0_init_pg should be good enough to cover both bare-metal and 
virtualization case. 

You can drop the tlb flush in that function if that's your major concern.

Regards,
Hawking
-Original Message-
From: amd-gfx  On Behalf Of Monk Liu
Sent: 2019年11月29日 16:24
To: amd-gfx@lists.freedesktop.org
Cc: Liu, Monk 
Subject: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

still need to init csb even for SRIOV

Signed-off-by: Monk Liu 
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 74edfd9..230e8af 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -1874,14 +1874,16 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device 
*adev)  {
int r;
 
-   if (amdgpu_sriov_vf(adev))
-   return 0;
-
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
r = gfx_v10_0_wait_for_rlc_autoload_complete(adev);
if (r)
return r;
 
+   if (amdgpu_sriov_vf(adev)) {
+   gfx_v10_0_init_csb(adev);
+   return 0;
+   }
+
r = gfx_v10_0_init_pg(adev);
if (r)
return r;
--
2.7.4

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfxdata=02%7C01%7Chawking.zhang%40amd.com%7Cc343afa9aa234cbb827508d774a57268%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637106127277353086sdata=Kt%2Fd1680Rc3lyFwz4ng5eA7JxiYWjf1whDBpfnHzTJs%3Dreserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

2019-11-29 Thread Zhang, Hawking
[AMD Public Use]

BTW, Please also make the change for backdoor loading code path as we need that 
for further ASIC bring up. Thanks.

Regards,
Hawking

-Original Message-
From: Zhang, Hawking 
Sent: 2019年11月29日 17:08
To: Liu, Monk ; amd-gfx@lists.freedesktop.org
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

[AMD Official Use Only - Internal Distribution Only]

The gfx10 PG and gfxoff are fully controlled by RLC and SMU fw and don't need 
driver to be involved anymore. So the legacy programing for 
gfx_idle_threshold.etc will not be applied to gfx10. 

More aggressively, let's drop gfx_v10_0_init_pg and just init csb. 

Regards,
Hawking
-Original Message-
From: Liu, Monk  
Sent: 2019年11月29日 16:47
To: Zhang, Hawking ; amd-gfx@lists.freedesktop.org
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

For now init_pg() is good enough for bare-metal and SR-IOV, but checkout GFX9, 
there are more jobs in init_pg(), so in the future I'd expect there will be 
More lines come into init_pg() on gfx10 and by that time I need to modify 
init_pg() , 

So IMHO the best way is use init_csb() from the beginning 

Thanks
_
Monk Liu|GPU Virtualization Team |AMD


-Original Message-
From: Zhang, Hawking  
Sent: Friday, November 29, 2019 4:43 PM
To: Liu, Monk ; amd-gfx@lists.freedesktop.org
Cc: Liu, Monk 
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

[AMD Official Use Only - Internal Distribution Only]

I don't think you need to introduce SRIOV specific path here. The 
gfx_v10_0_init_pg should be good enough to cover both bare-metal and 
virtualization case. 

You can drop the tlb flush in that function if that's your major concern.

Regards,
Hawking
-Original Message-
From: amd-gfx  On Behalf Of Monk Liu
Sent: 2019年11月29日 16:24
To: amd-gfx@lists.freedesktop.org
Cc: Liu, Monk 
Subject: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

still need to init csb even for SRIOV

Signed-off-by: Monk Liu 
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 74edfd9..230e8af 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -1874,14 +1874,16 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device 
*adev)  {
int r;
 
-   if (amdgpu_sriov_vf(adev))
-   return 0;
-
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
r = gfx_v10_0_wait_for_rlc_autoload_complete(adev);
if (r)
return r;
 
+   if (amdgpu_sriov_vf(adev)) {
+   gfx_v10_0_init_csb(adev);
+   return 0;
+   }
+
r = gfx_v10_0_init_pg(adev);
if (r)
return r;
--
2.7.4

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfxdata=02%7C01%7Chawking.zhang%40amd.com%7Cc343afa9aa234cbb827508d774a57268%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637106127277353086sdata=Kt%2Fd1680Rc3lyFwz4ng5eA7JxiYWjf1whDBpfnHzTJs%3Dreserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

2019-11-29 Thread Zhang, Hawking
[AMD Official Use Only - Internal Distribution Only]

The gfx10 PG and gfxoff are fully controlled by RLC and SMU fw and don't need 
driver to be involved anymore. So the legacy programing for 
gfx_idle_threshold.etc will not be applied to gfx10. 

More aggressively, let's drop gfx_v10_0_init_pg and just init csb. 

Regards,
Hawking
-Original Message-
From: Liu, Monk  
Sent: 2019年11月29日 16:47
To: Zhang, Hawking ; amd-gfx@lists.freedesktop.org
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

For now init_pg() is good enough for bare-metal and SR-IOV, but checkout GFX9, 
there are more jobs in init_pg(), so in the future I'd expect there will be 
More lines come into init_pg() on gfx10 and by that time I need to modify 
init_pg() , 

So IMHO the best way is use init_csb() from the beginning 

Thanks
_
Monk Liu|GPU Virtualization Team |AMD


-Original Message-
From: Zhang, Hawking  
Sent: Friday, November 29, 2019 4:43 PM
To: Liu, Monk ; amd-gfx@lists.freedesktop.org
Cc: Liu, Monk 
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

[AMD Official Use Only - Internal Distribution Only]

I don't think you need to introduce SRIOV specific path here. The 
gfx_v10_0_init_pg should be good enough to cover both bare-metal and 
virtualization case. 

You can drop the tlb flush in that function if that's your major concern.

Regards,
Hawking
-Original Message-
From: amd-gfx  On Behalf Of Monk Liu
Sent: 2019年11月29日 16:24
To: amd-gfx@lists.freedesktop.org
Cc: Liu, Monk 
Subject: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

still need to init csb even for SRIOV

Signed-off-by: Monk Liu 
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 74edfd9..230e8af 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -1874,14 +1874,16 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device 
*adev)  {
int r;
 
-   if (amdgpu_sriov_vf(adev))
-   return 0;
-
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
r = gfx_v10_0_wait_for_rlc_autoload_complete(adev);
if (r)
return r;
 
+   if (amdgpu_sriov_vf(adev)) {
+   gfx_v10_0_init_csb(adev);
+   return 0;
+   }
+
r = gfx_v10_0_init_pg(adev);
if (r)
return r;
--
2.7.4

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfxdata=02%7C01%7Chawking.zhang%40amd.com%7Cc343afa9aa234cbb827508d774a57268%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637106127277353086sdata=Kt%2Fd1680Rc3lyFwz4ng5eA7JxiYWjf1whDBpfnHzTJs%3Dreserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

2019-11-29 Thread Liu, Monk
For now init_pg() is good enough for bare-metal and SR-IOV, but checkout GFX9, 
there are more jobs in init_pg(), so in the future I'd expect there will be 
More lines come into init_pg() on gfx10 and by that time I need to modify 
init_pg() , 

So IMHO the best way is use init_csb() from the beginning 

Thanks 
_
Monk Liu|GPU Virtualization Team |AMD


-Original Message-
From: Zhang, Hawking  
Sent: Friday, November 29, 2019 4:43 PM
To: Liu, Monk ; amd-gfx@lists.freedesktop.org
Cc: Liu, Monk 
Subject: RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

[AMD Official Use Only - Internal Distribution Only]

I don't think you need to introduce SRIOV specific path here. The 
gfx_v10_0_init_pg should be good enough to cover both bare-metal and 
virtualization case. 

You can drop the tlb flush in that function if that's your major concern.

Regards,
Hawking
-Original Message-
From: amd-gfx  On Behalf Of Monk Liu
Sent: 2019年11月29日 16:24
To: amd-gfx@lists.freedesktop.org
Cc: Liu, Monk 
Subject: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

still need to init csb even for SRIOV

Signed-off-by: Monk Liu 
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 74edfd9..230e8af 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -1874,14 +1874,16 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device 
*adev)  {
int r;
 
-   if (amdgpu_sriov_vf(adev))
-   return 0;
-
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
r = gfx_v10_0_wait_for_rlc_autoload_complete(adev);
if (r)
return r;
 
+   if (amdgpu_sriov_vf(adev)) {
+   gfx_v10_0_init_csb(adev);
+   return 0;
+   }
+
r = gfx_v10_0_init_pg(adev);
if (r)
return r;
--
2.7.4

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfxdata=02%7C01%7Chawking.zhang%40amd.com%7Cc343afa9aa234cbb827508d774a57268%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637106127277353086sdata=Kt%2Fd1680Rc3lyFwz4ng5eA7JxiYWjf1whDBpfnHzTJs%3Dreserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

RE: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

2019-11-29 Thread Zhang, Hawking
[AMD Official Use Only - Internal Distribution Only]

I don't think you need to introduce SRIOV specific path here. The 
gfx_v10_0_init_pg should be good enough to cover both bare-metal and 
virtualization case. 

You can drop the tlb flush in that function if that's your major concern.

Regards,
Hawking
-Original Message-
From: amd-gfx  On Behalf Of Monk Liu
Sent: 2019年11月29日 16:24
To: amd-gfx@lists.freedesktop.org
Cc: Liu, Monk 
Subject: [PATCH 1/2] drm/amdgpu: fix GFX10 missing CSIB set

still need to init csb even for SRIOV

Signed-off-by: Monk Liu 
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 74edfd9..230e8af 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -1874,14 +1874,16 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device 
*adev)  {
int r;
 
-   if (amdgpu_sriov_vf(adev))
-   return 0;
-
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
r = gfx_v10_0_wait_for_rlc_autoload_complete(adev);
if (r)
return r;
 
+   if (amdgpu_sriov_vf(adev)) {
+   gfx_v10_0_init_csb(adev);
+   return 0;
+   }
+
r = gfx_v10_0_init_pg(adev);
if (r)
return r;
--
2.7.4

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfxdata=02%7C01%7Chawking.zhang%40amd.com%7Cc343afa9aa234cbb827508d774a57268%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637106127277353086sdata=Kt%2Fd1680Rc3lyFwz4ng5eA7JxiYWjf1whDBpfnHzTJs%3Dreserved=0
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx