[AMD Official Use Only - Internal Distribution Only] Thanks, Hawking. --Zhigang -----Original Message----- From: Zhang, Hawking <Hawking.Zhang@xxxxxxx> Sent: December 6, 2019 12:35 PM To: Luo, Zhigang <Zhigang.Luo@xxxxxxx>; Alex Deucher <alexdeucher@xxxxxxxxx> Cc: Quan, Evan <Evan.Quan@xxxxxxx>; Yuan, Xiaojie <Xiaojie.Yuan@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx Subject: RE: [PATCH] drm/amd/powerplay: clear VBIOS scratchs on baco exit It was used to indicate whether bios or driver to handle display mode for various display type. And also some field to indicate other display status like docking/undocking, LID open/close, etc. Check atombios_encoder.c for its major usage Regards, Hawking -----Original Message----- From: Luo, Zhigang <Zhigang.Luo@xxxxxxx> Sent: 2019年12月6日 23:37 To: Zhang, Hawking <Hawking.Zhang@xxxxxxx>; Alex Deucher <alexdeucher@xxxxxxxxx> Cc: Quan, Evan <Evan.Quan@xxxxxxx>; Yuan, Xiaojie <Xiaojie.Yuan@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx Subject: RE: [PATCH] drm/amd/powerplay: clear VBIOS scratchs on baco exit [AMD Official Use Only - Internal Distribution Only] Can someone tell me what's BIOS_SCRATCH_6 used for? I know BIOS_SCRATCH_7 is used for asic init. Thanks, Zhigang -----Original Message----- From: Zhang, Hawking <Hawking.Zhang@xxxxxxx> Sent: December 6, 2019 9:22 AM To: Alex Deucher <alexdeucher@xxxxxxxxx> Cc: Quan, Evan <Evan.Quan@xxxxxxx>; Yuan, Xiaojie <Xiaojie.Yuan@xxxxxxx>; Luo, Zhigang <Zhigang.Luo@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx Subject: RE: [PATCH] drm/amd/powerplay: clear VBIOS scratchs on baco exit Ah yes, I made a logical mistake. This should work. Regards, Hawking -----Original Message----- From: Alex Deucher <alexdeucher@xxxxxxxxx> Sent: 2019年12月6日 22:01 To: Zhang, Hawking <Hawking.Zhang@xxxxxxx> Cc: Quan, Evan <Evan.Quan@xxxxxxx>; Yuan, Xiaojie <Xiaojie.Yuan@xxxxxxx>; Luo, Zhigang <Zhigang.Luo@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx Subject: Re: [PATCH] drm/amd/powerplay: clear VBIOS scratchs on baco exit On Fri, Dec 6, 2019 at 3:14 AM Zhang, Hawking <Hawking.Zhang@xxxxxxx> wrote: > > Correct my typo > > This is in high risk to break gpu resume and reset just because you clear the ATOM_S7_ASIC_INIT_COMPLETE_MASK field in scratch register 7. And the atom_bios init will be skipped. > I think we should be ok. If ATOM_S7_ASIC_INIT_COMPLETE_MASK is cleared, we'll assume the card needs to be posted, which it probably should after BACO. This may even be what makes this patch a fix. Alex > Regards, > Hawking > -----Original Message----- > From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of > Zhang, Hawking > Sent: 2019年12月6日 16:07 > To: Quan, Evan <Evan.Quan@xxxxxxx>; Yuan, Xiaojie > <Xiaojie.Yuan@xxxxxxx>; Luo, Zhigang <Zhigang.Luo@xxxxxxx> > Cc: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Subject: RE: [PATCH] drm/amd/powerplay: clear VBIOS scratchs on baco > exit > > This is in high risk to break secondary gpu resume and reset just because you clear the ATOM_S7_ASIC_INIT_COMPLETE_MASK field in scratch register 7. And the atom_bios init will be skipped. > > We shall understand any libgv fixes very well before "copy" it to bare-metal. Libgv don't need to take care S3. > > Regards, > Hawking > -----Original Message----- > From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of > Quan, Evan > Sent: 2019年12月6日 13:27 > To: Yuan, Xiaojie <Xiaojie.Yuan@xxxxxxx>; Luo, Zhigang > <Zhigang.Luo@xxxxxxx> > Cc: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Subject: RE: [PATCH] drm/amd/powerplay: clear VBIOS scratchs on baco > exit > > Hi Xiaojie, > > This was reported by Zhigang team. Under their special use case, scratch register 7 has be to 0 to perform asic init(@Luo, Zhigang right?). > And considering old asics(vega20/10) also applied this change. > So, I think it's reasonable(and recommend by SMU fw team) to apply this on the new ASICs also. > > Regards, > Evan > > -----Original Message----- > > From: Yuan, Xiaojie <Xiaojie.Yuan@xxxxxxx> > > Sent: Friday, December 6, 2019 12:20 PM > > To: Quan, Evan <Evan.Quan@xxxxxxx> > > Cc: amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Luo, Zhigang > > <Zhigang.Luo@xxxxxxx> > > Subject: Re: [PATCH] drm/amd/powerplay: clear VBIOS scratchs on baco > > exit > > > > Hi Evan, > > > > Just out of curiosity, may I know what issue are you trying to fix? > > I used to see vbios post failure (hangs in atombios init table) > > after baco exit occasionally on navi. > > > > BR, > > Xiaojie > > > > > On Dec 6, 2019, at 11:37 AM, Evan Quan <evan.quan@xxxxxxx> wrote: > > > > > > This is needed for coming asic init on performing gpu reset. > > > > > > Change-Id: If3671a24d239e3d288665fadaa2c40c87d5da40b > > > Signed-off-by: Evan Quan <evan.quan@xxxxxxx> > > > --- > > > drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 ++++++ > > > 1 file changed, 6 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c > > b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c > > > index 39ec06aee809..ab809df7bc35 100644 > > > --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c > > > +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c > > > @@ -1659,6 +1659,12 @@ int smu_v11_0_baco_set_state(struct > > smu_context *smu, enum smu_baco_state state) > > > } > > > } else { > > > ret = smu_send_smc_msg(smu, SMU_MSG_ExitBaco); > > > + if (ret) > > > + goto out; > > > + > > > + WREG32_SOC15(NBIO, 0, mmBIOS_SCRATCH_6, 0); > > > + WREG32_SOC15(NBIO, 0, mmBIOS_SCRATCH_7, 0); > > > + > > > bif_doorbell_intr_cntl = REG_SET_FIELD(bif_doorbell_intr_cntl, > > > BIF_DOORBELL_INT_CNTL, > > > DOORBELL_INTERRUPT_DISABLE, 0); > > > -- > > > 2.24.0 > > > > > > _______________________________________________ > > > amd-gfx mailing list > > > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > > > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli > > st > > s.free > > desktop.org%2Fmailman%2Flistinfo%2Famd- > > gfx&data=02%7C01%7CXiaojie.Yuan%40amd.com%7C682c142ef30748bbd > > 00508d779fd6f82%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637 > > 112002208927733&sdata=bajaaj3Cw2IxW5nRucg3FXUjcyIi50kCSPQ7eknqk > > 4o%3D&reserved=0 > _______________________________________________ > amd-gfx mailing list > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist > s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CHa > wking.Zhang%40amd.com%7C4d211a25634b44f5f7e508d77a54cf55%7C3dd8961fe48 > 84e608e11a82d994e183d%7C0%7C0%7C637112376982866817&sdata=iM7a7q5lg > 1tb4f8EY%2B0heZgeVnHJWwyJJNf8xzCYje8%3D&reserved=0 > _______________________________________________ > amd-gfx mailing list > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist > s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CHa > wking.Zhang%40amd.com%7C4d211a25634b44f5f7e508d77a54cf55%7C3dd8961fe48 > 84e608e11a82d994e183d%7C0%7C0%7C637112376982866817&sdata=iM7a7q5lg > 1tb4f8EY%2B0heZgeVnHJWwyJJNf8xzCYje8%3D&reserved=0 > _______________________________________________ > amd-gfx mailing list > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist > s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CHa > wking.Zhang%40amd.com%7C4d211a25634b44f5f7e508d77a54cf55%7C3dd8961fe48 > 84e608e11a82d994e183d%7C0%7C0%7C637112376982866817&sdata=iM7a7q5lg > 1tb4f8EY%2B0heZgeVnHJWwyJJNf8xzCYje8%3D&reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx