Skip to contentSkip to conversation

drm/amdgpu:skip ASIC_INIT when posting card on vg20

PATCH In review Feifei Xu 3 participants 7 messages Dec 10, 2018 – Dec 11, 2018 6 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Feifei Xu

author
#0 lore raw

PATCH 1/1 drm/amdgpu:skip ASIC_INIT when posting card on vg20

On vega20, the job of executing the ASIC_INIT table when posting card is moved to psp. Skip the atombios's ASIC_INIT on vega20 when posting card.

Change-Id Id1d3c0a0d19296d5ed804de7edf5b09b8d38c0a5
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index ef36cc595985..a375d2ac112f 100644
@@ -2547,7 +2547,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 	amdgpu_device_detect_sriov_bios(adev);
 
 	/* Post card if necessary */
-	if (amdgpu_device_need_post(adev)) {
+	if ((adev->asic_type != CHIP_VEGA20) && amdgpu_device_need_post(adev)) {
 		if (!adev->bios) {
 			dev_err(adev->dev, "no vBIOS found\n");
 			r = -EINVAL;
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by Evan Quan
#2 lore raw
Quoted 38 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Feifei Xu
Sent: 2018年12月10日 14:17
To: [email protected]
Cc: Xu, Feifei <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

On vega20, the job of executing the ASIC_INIT table when posting card is moved to psp. Skip the atombios's ASIC_INIT on vega20 when posting card.

Change-Id Id1d3c0a0d19296d5ed804de7edf5b09b8d38c0a5
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index ef36cc595985..a375d2ac112f 100644
@@ -2547,7 +2547,7 @@ int amdgpu_device_init(struct amdgpu_device
 *adev,
 	amdgpu_device_detect_sriov_bios(adev);
 
 	/* Post card if necessary */
-	if (amdgpu_device_need_post(adev)) {
+	if ((adev->asic_type != CHIP_VEGA20) &&
 amdgpu_device_need_post(adev))
+{
 		if (!adev->bios) {
 			dev_err(adev->dev, "no vBIOS found\n");
 			r = -EINVAL;
--

2.17.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): SN6PR12MB26565080C9CEEEFA62F8F173E4A50-kxOKjb6HO/FeL/[email protected]

Reviewed-by Evan Quan
#4 lore raw

I think it is better move it into amdgpu_device_need_post() as a negative condition.

Thanks
JimQu

________________________________________
发件人: amd-gfx <[email protected]> 代表 Quan, Evan <[email protected]> 发送时间: 2018年12月10日 14:33:58
收件人: Xu, Feifei; [email protected]
抄送: Xu, Feifei
主题: RE: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

Quoted 38 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Feifei Xu
Sent: 2018年12月10日 14:17
To: [email protected]
Cc: Xu, Feifei <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

On vega20, the job of executing the ASIC_INIT table when posting card is moved to psp. Skip the atombios's ASIC_INIT on vega20 when posting card.

Change-Id Id1d3c0a0d19296d5ed804de7edf5b09b8d38c0a5
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index ef36cc595985..a375d2ac112f 100644
@@ -2547,7 +2547,7 @@ int amdgpu_device_init(struct amdgpu_device
 *adev,
      amdgpu_device_detect_sriov_bios(adev);
 
      /* Post card if necessary */
-     if (amdgpu_device_need_post(adev)) {
+     if ((adev->asic_type != CHIP_VEGA20) &&
 amdgpu_device_need_post(adev))
+{
              if (!adev->bios) {
                      dev_err(adev->dev, "no vBIOS found\n");
                      r = -EINVAL;
--

2.17.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BYAPR12MB279131C911BF4FF1DF606CD699A50-ZGDeBxoHBPmJmDmz9lrjRAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

author Reviewed-by Evan Quan
#6 lore raw

In fact, in multigpu cases, the original logical in amdgpu_device_need_post()->amdgpu_atombios_scratch_need_asic_init() return TRUE. The logical is to: read ATOM_S7_ASIC_INIT_COMPLETE_MASK bit which is notified by BIOS to driver that if post is needed.

After the ASIC_INIT table moved to psp, though post is needed (the ATOM_S7_ASIC_INIT_COMPLETE_MASK is unset), we still need to skip the post in driver.

Regards,
Feifei

-----Original Message-----
From: Qu, Jim <[email protected]>
Sent: 2018年12月10日 17:42
To: Quan, Evan <[email protected]>; Xu, Feifei <[email protected]>; [email protected]
Subject: 答复: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

I think it is better move it into amdgpu_device_need_post() as a negative condition.

Thanks
JimQu

________________________________________
发件人: amd-gfx <[email protected]> 代表 Quan, Evan <[email protected]> 发送时间: 2018年12月10日 14:33:58
收件人: Xu, Feifei; [email protected]
抄送: Xu, Feifei
主题: RE: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

Quoted 38 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Feifei Xu
Sent: 2018年12月10日 14:17
To: [email protected]
Cc: Xu, Feifei <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

On vega20, the job of executing the ASIC_INIT table when posting card is moved to psp. Skip the atombios's ASIC_INIT on vega20 when posting card.

Change-Id Id1d3c0a0d19296d5ed804de7edf5b09b8d38c0a5
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index ef36cc595985..a375d2ac112f 100644
@@ -2547,7 +2547,7 @@ int amdgpu_device_init(struct amdgpu_device 
 *adev,
      amdgpu_device_detect_sriov_bios(adev);
 
      /* Post card if necessary */
-     if (amdgpu_device_need_post(adev)) {
+     if ((adev->asic_type != CHIP_VEGA20) &&
 amdgpu_device_need_post(adev))
+{
              if (!adev->bios) {
                      dev_err(adev->dev, "no vBIOS found\n");
                      r = -EINVAL;
--

2.17.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BY2PR12MB0072BA2CB09FCC47BCD60525FEA50-K//h7OWB4q49o5m5eWPqXQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

Reviewed-by Evan Quan
#8 lore raw

Hi Feifei,

When PSP perform ASIC_INIT during the whole boot up period?

In S4, the asic will be reset, and it need be posted at the beginning of resume. So it is better move the logic into amdgpu_device_need_post() if ASIC_INIT is automatic performed by PSP during S4.

Thanks
JimQu

________________________________________
发件人: Xu, Feifei
发送时间: 2018年12月10日 18:09
收件人: Qu, Jim; Quan, Evan; [email protected] 主题: RE: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

In fact, in multigpu cases, the original logical in amdgpu_device_need_post()->amdgpu_atombios_scratch_need_asic_init() return TRUE. The logical is to: read ATOM_S7_ASIC_INIT_COMPLETE_MASK bit which is notified by BIOS to driver that if post is needed.

After the ASIC_INIT table moved to psp, though post is needed (the ATOM_S7_ASIC_INIT_COMPLETE_MASK is unset), we still need to skip the post in driver.

Regards,
Feifei

-----Original Message-----
From: Qu, Jim <[email protected]>
Sent: 2018年12月10日 17:42
To: Quan, Evan <[email protected]>; Xu, Feifei <[email protected]>; [email protected]
Subject: 答复: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

I think it is better move it into amdgpu_device_need_post() as a negative condition.

Thanks
JimQu

________________________________________
发件人: amd-gfx <[email protected]> 代表 Quan, Evan <[email protected]> 发送时间: 2018年12月10日 14:33:58
收件人: Xu, Feifei; [email protected]
抄送: Xu, Feifei
主题: RE: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

Quoted 38 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Feifei Xu
Sent: 2018年12月10日 14:17
To: [email protected]
Cc: Xu, Feifei <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

On vega20, the job of executing the ASIC_INIT table when posting card is moved to psp. Skip the atombios's ASIC_INIT on vega20 when posting card.

Change-Id Id1d3c0a0d19296d5ed804de7edf5b09b8d38c0a5
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index ef36cc595985..a375d2ac112f 100644
@@ -2547,7 +2547,7 @@ int amdgpu_device_init(struct amdgpu_device
 *adev,
      amdgpu_device_detect_sriov_bios(adev);
 
      /* Post card if necessary */
-     if (amdgpu_device_need_post(adev)) {
+     if ((adev->asic_type != CHIP_VEGA20) &&
 amdgpu_device_need_post(adev))
+{
              if (!adev->bios) {
                      dev_err(adev->dev, "no vBIOS found\n");
                      r = -EINVAL;
--

2.17.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BYAPR12MB27919535AC35497A48EAA45099A50-ZGDeBxoHBPmJmDmz9lrjRAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

author
#10 lore raw

Agree that if also need to skip ASIC_INIT in s3/s4 in driver, should do the similar change as you mentioned. I am not quite sure the s3/s4 situation for now. Though from test, it might be the same case. Will get back from vbios and have corresponding change. Thanks.

发自我的 iPhone

Quoted 83 lines · Jim

Hi Feifei,

When PSP perform ASIC_INIT during the whole boot up period?

In S4, the asic will be reset, and it need be posted at the beginning of resume. So it is better move the logic into amdgpu_device_need_post() if ASIC_INIT is automatic performed by PSP during S4.

Thanks
JimQu

________________________________________
发件人: Xu, Feifei
发送时间: 2018年12月10日 18:09
收件人: Qu, Jim; Quan, Evan; [email protected] 主题: RE: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

In fact, in multigpu cases, the original logical in amdgpu_device_need_post()->amdgpu_atombios_scratch_need_asic_init() return TRUE. The logical is to: read ATOM_S7_ASIC_INIT_COMPLETE_MASK bit which is notified by BIOS to driver that if post is needed.

After the ASIC_INIT table moved to psp, though post is needed (the ATOM_S7_ASIC_INIT_COMPLETE_MASK is unset), we still need to skip the post in driver.

Regards,
Feifei

-----Original Message-----
From: Qu, Jim <[email protected]>
Sent: 2018年12月10日 17:42
To: Quan, Evan <[email protected]>; Xu, Feifei <[email protected]>; [email protected]
Subject: 答复: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

I think it is better move it into amdgpu_device_need_post() as a negative condition.

Thanks
JimQu

________________________________________
发件人: amd-gfx <[email protected]> 代表 Quan, Evan <[email protected]> 发送时间: 2018年12月10日 14:33:58
收件人: Xu, Feifei; [email protected]
抄送: Xu, Feifei
主题: RE: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

Quoted 38 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Feifei Xu
Sent: 2018年12月10日 14:17
To: [email protected]
Cc: Xu, Feifei <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

On vega20, the job of executing the ASIC_INIT table when posting card is moved to psp. Skip the atombios's ASIC_INIT on vega20 when posting card.

Change-Id Id1d3c0a0d19296d5ed804de7edf5b09b8d38c0a5

---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index ef36cc595985..a375d2ac112f 100644
@@ -2547,7 +2547,7 @@ int amdgpu_device_init(struct amdgpu_device
 *adev,
     amdgpu_device_detect_sriov_bios(adev);
 
     /* Post card if necessary */
-     if (amdgpu_device_need_post(adev)) {
+     if ((adev->asic_type != CHIP_VEGA20) &&
 amdgpu_device_need_post(adev))
+{
             if (!adev->bios) {
                     dev_err(adev->dev, "no vBIOS found\n");
                     r = -EINVAL;
--

2.17.1

Quoted 8 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 731C0ABC-5D57-4977-B35D-72327259583F-5C7GfCeVMHo@public.gmane.org

#12 lore raw

Yeah, the asic need to be POST in S4/resume and runtime resume.

Thanks
JimQu

________________________________________
发件人: Xu, Feifei
发送时间: 2018年12月10日 18:42
收件人: Qu, Jim
抄送: Quan, Evan; [email protected]
主题: Re: 答复: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

Agree that if also need to skip ASIC_INIT in s3/s4 in driver, should do the similar change as you mentioned. I am not quite sure the s3/s4 situation for now. Though from test, it might be the same case. Will get back from vbios and have corresponding change. Thanks.

发自我的 iPhone

Quoted 83 lines · Jim

Hi Feifei,

When PSP perform ASIC_INIT during the whole boot up period?

In S4, the asic will be reset, and it need be posted at the beginning of resume. So it is better move the logic into amdgpu_device_need_post() if ASIC_INIT is automatic performed by PSP during S4.

Thanks
JimQu

________________________________________
发件人: Xu, Feifei
发送时间: 2018年12月10日 18:09
收件人: Qu, Jim; Quan, Evan; [email protected] 主题: RE: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

In fact, in multigpu cases, the original logical in amdgpu_device_need_post()->amdgpu_atombios_scratch_need_asic_init() return TRUE. The logical is to: read ATOM_S7_ASIC_INIT_COMPLETE_MASK bit which is notified by BIOS to driver that if post is needed.

After the ASIC_INIT table moved to psp, though post is needed (the ATOM_S7_ASIC_INIT_COMPLETE_MASK is unset), we still need to skip the post in driver.

Regards,
Feifei

-----Original Message-----
From: Qu, Jim <[email protected]>
Sent: 2018年12月10日 17:42
To: Quan, Evan <[email protected]>; Xu, Feifei <[email protected]>; [email protected]
Subject: 答复: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

I think it is better move it into amdgpu_device_need_post() as a negative condition.

Thanks
JimQu

________________________________________
发件人: amd-gfx <[email protected]> 代表 Quan, Evan <[email protected]> 发送时间: 2018年12月10日 14:33:58
收件人: Xu, Feifei; [email protected]
抄送: Xu, Feifei
主题: RE: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

Quoted 38 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Feifei Xu
Sent: 2018年12月10日 14:17
To: [email protected]
Cc: Xu, Feifei <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amdgpu:skip ASIC_INIT when posting card on vg20

On vega20, the job of executing the ASIC_INIT table when posting card is moved to psp. Skip the atombios's ASIC_INIT on vega20 when posting card.

Change-Id Id1d3c0a0d19296d5ed804de7edf5b09b8d38c0a5

---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index ef36cc595985..a375d2ac112f 100644
@@ -2547,7 +2547,7 @@ int amdgpu_device_init(struct amdgpu_device
 *adev,
     amdgpu_device_detect_sriov_bios(adev);
 
     /* Post card if necessary */
-     if (amdgpu_device_need_post(adev)) {
+     if ((adev->asic_type != CHIP_VEGA20) &&
 amdgpu_device_need_post(adev))
+{
             if (!adev->bios) {
                     dev_err(adev->dev, "no vBIOS found\n");
                     r = -EINVAL;
--

2.17.1

Quoted 8 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx