From: "Quan, Evan" <Evan.Quan@amd.com>
To: Sandeep <sandy.8925@gmail.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: RE: [PATCH 1/2] drm/amd/pm: enable baco reset for Hawaii
Date: Wed, 28 Oct 2020 01:31:13 +0000 [thread overview]
Message-ID: <DM6PR12MB2619444751837A8BAAC3B2D2E4170@DM6PR12MB2619.namprd12.prod.outlook.com> (raw)
In-Reply-To: <CAGPDPzBbEspwRvgnzKt+siPDZqGMFH0Zunc3GXVPUzSb3U0hww@mail.gmail.com>
[AMD Official Use Only - Internal Distribution Only]
Hi Sandeep,
Did you run the tests on Hawaii?
And can you help to confirm which method is used for gpu reset? "BACO reset" or " PCI CONFIG reset" (you can grep these keywords in dmesg)?
BR
Evan
-----Original Message-----
From: Sandeep <sandy.8925@gmail.com>
Sent: Tuesday, October 27, 2020 10:33 PM
To: Quan, Evan <Evan.Quan@amd.com>
Cc: amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: Re: [PATCH 1/2] drm/amd/pm: enable baco reset for Hawaii
On Tue, 27 Oct 2020 at 17:04, Sandeep <sandy.8925@gmail.com> wrote:
>
>
>
> On Tue, 27 Oct, 2020, 17:01 Sandeep, <sandy.8925@gmail.com> wrote:
>>
>>
>> On Tue, 27 Oct, 2020, 08:10 Evan Quan, <evan.quan@amd.com> wrote:
>>>
>>> Which can be used for S4(hibernation) support.
>>>
>>> Change-Id: I6e4962c120a3baed14cea04ed1742ff11a273d34
>>> Signed-off-by: Evan Quan <evan.quan@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/cik.c | 4 +++-
>>> drivers/gpu/drm/amd/pm/powerplay/hwmgr/ci_baco.c | 7 ++++---
>>> 2 files changed, 7 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c
>>> b/drivers/gpu/drm/amd/amdgpu/cik.c
>>> index 03ff8bd1fee8..5442df094102 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/cik.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/cik.c
>>> @@ -1336,11 +1336,13 @@ cik_asic_reset_method(struct amdgpu_device
>>> *adev)
>>>
>>> switch (adev->asic_type) {
>>> case CHIP_BONAIRE:
>>> - case CHIP_HAWAII:
>>> /* disable baco reset until it works */
>>> /* smu7_asic_get_baco_capability(adev, &baco_reset); */
>>> baco_reset = false;
>>> break;
>>> + case CHIP_HAWAII:
>>> + baco_reset = cik_asic_supports_baco(adev);
>>> + break;
>>> default:
>>> baco_reset = false;
>>> break;
>>> diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ci_baco.c
>>> b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ci_baco.c
>>> index 3be40114e63d..45f608838f6e 100644
>>> --- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ci_baco.c
>>> +++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/ci_baco.c
>>> @@ -142,12 +142,12 @@ static const struct baco_cmd_entry exit_baco_tbl[] =
>>> { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_BCLK_OFF_MASK, BACO_CNTL__BACO_BCLK_OFF__SHIFT, 0, 0x00 },
>>> { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_POWER_OFF_MASK, BACO_CNTL__BACO_POWER_OFF__SHIFT, 0, 0x00 },
>>> { CMD_DELAY_MS, 0, 0, 0, 20, 0 },
>>> - { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__PWRGOOD_BF_MASK, 0, 0xffffffff, 0x20 },
>>> + { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__PWRGOOD_BF_MASK, 0,
>>> + 0xffffffff, 0x200 },
>>> { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_ISO_DIS_MASK, BACO_CNTL__BACO_ISO_DIS__SHIFT, 0, 0x01 },
>>> - { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__PWRGOOD_MASK, 0, 5, 0x1c },
>>> + { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__PWRGOOD_MASK, 0, 5,
>>> + 0x1c00 },
>>> { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_ANA_ISO_DIS_MASK, BACO_CNTL__BACO_ANA_ISO_DIS__SHIFT, 0, 0x01 },
>>> { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_RESET_EN_MASK, BACO_CNTL__BACO_RESET_EN__SHIFT, 0, 0x00 },
>>> - { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__RCU_BIF_CONFIG_DONE_MASK, 0, 5, 0x10 },
>>> + { CMD_WAITFOR, mmBACO_CNTL,
>>> + BACO_CNTL__RCU_BIF_CONFIG_DONE_MASK, 0, 5, 0x100 },
>>> { CMD_READMODIFYWRITE, mmBACO_CNTL, BACO_CNTL__BACO_EN_MASK, BACO_CNTL__BACO_EN__SHIFT, 0, 0x00 },
>>> { CMD_WAITFOR, mmBACO_CNTL, BACO_CNTL__BACO_MODE_MASK, 0,
>>> 0xffffffff, 0x00 } }; @@ -155,6 +155,7 @@ static const struct
>>> baco_cmd_entry exit_baco_tbl[] = static const struct baco_cmd_entry
>>> clean_baco_tbl[] = {
>>> { CMD_WRITE, mmBIOS_SCRATCH_6, 0, 0, 0, 0 },
>>> + { CMD_WRITE, mmBIOS_SCRATCH_7, 0, 0, 0, 0 },
>>> { CMD_WRITE, mmCP_PFP_UCODE_ADDR, 0, 0, 0, 0 } };
>>>
>>> --
>>> 2.29.0
>>
>>
>>
>> Not sure why I'm cc'd on this, I'm not a maintainer, nor does this patch seem related to any patches I've contributed.
>>
>> - Sandeep
>
>
> Ok, I just saw the other email. I'll try testing the patch and see if it fixes the hibernation bug.
>
> - Sandeep
I tested and while suspend works correctly, hibernation is completely broken. The system fails to resume from hibernation which is much worse than before.
- Sandeep
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2020-10-28 1:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 2:40 [PATCH 1/2] drm/amd/pm: enable baco reset for Hawaii Evan Quan
2020-10-27 2:40 ` [PATCH 2/2] drm/amd/pm: do not use ixFEATURE_STATUS for checking smc running Evan Quan
2020-10-27 11:31 ` [PATCH 1/2] drm/amd/pm: enable baco reset for Hawaii Sandeep
2020-10-27 11:34 ` Sandeep
2020-10-27 14:32 ` Sandeep
2020-10-28 1:31 ` Quan, Evan [this message]
2020-10-28 8:33 ` Quan, Evan
2020-10-28 15:06 ` Sandeep
2020-10-28 14:10 ` Sandeep
2020-10-27 14:47 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM6PR12MB2619444751837A8BAAC3B2D2E4170@DM6PR12MB2619.namprd12.prod.outlook.com \
--to=evan.quan@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=sandy.8925@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).