[PATCH 1/2] drm/amd/pm: enable baco reset for Hawaii
Sandeep
sandy.8925 at gmail.com
Tue Oct 27 11:34:11 UTC 2020
On Tue, 27 Oct, 2020, 17:01 Sandeep, <sandy.8925 at gmail.com> wrote:
>
> On Tue, 27 Oct, 2020, 08:10 Evan Quan, <evan.quan at amd.com> wrote:
>
>> Which can be used for S4(hibernation) support.
>>
>> Change-Id: I6e4962c120a3baed14cea04ed1742ff11a273d34
>> Signed-off-by: Evan Quan <evan.quan at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20201027/1e3918c5/attachment.htm>
More information about the amd-gfx
mailing list