From: Alex Deucher <alexander.deucher@amd.com>
To: <stable@vger.kernel.org>
Cc: <mario.limonciello@amd.com>, Evan Quan <evan.quan@amd.com>,
Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 4/9] drm/amd/pm: revise the ASPM settings for thunderbolt attached scenario
Date: Fri, 7 Jul 2023 11:07:29 -0400 [thread overview]
Message-ID: <20230707150734.746135-4-alexander.deucher@amd.com> (raw)
In-Reply-To: <20230707150734.746135-1-alexander.deucher@amd.com>
From: Evan Quan <evan.quan@amd.com>
Also, correct the comment for NAVI10_PCIE__LC_L1_INACTIVITY_TBT_DEFAULT
as 0x0000000E stands for 400ms instead of 4ms.
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit fd21987274463a439c074b8f3c93d3b132e4c031)
Cc: stable@vger.kernel.org
---
drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c b/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c
index aa761ff3a5fa..7ba47fc1917b 100644
--- a/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c
@@ -346,7 +346,7 @@ static void nbio_v2_3_init_registers(struct amdgpu_device *adev)
#define NAVI10_PCIE__LC_L0S_INACTIVITY_DEFAULT 0x00000000 // off by default, no gains over L1
#define NAVI10_PCIE__LC_L1_INACTIVITY_DEFAULT 0x00000009 // 1=1us, 9=1ms
-#define NAVI10_PCIE__LC_L1_INACTIVITY_TBT_DEFAULT 0x0000000E // 4ms
+#define NAVI10_PCIE__LC_L1_INACTIVITY_TBT_DEFAULT 0x0000000E // 400ms
static void nbio_v2_3_enable_aspm(struct amdgpu_device *adev,
bool enable)
@@ -479,9 +479,12 @@ static void nbio_v2_3_program_aspm(struct amdgpu_device *adev)
WREG32_SOC15(NBIO, 0, mmRCC_BIF_STRAP5, data);
def = data = RREG32_PCIE(smnPCIE_LC_CNTL);
- data &= ~PCIE_LC_CNTL__LC_L0S_INACTIVITY_MASK;
- data |= 0x9 << PCIE_LC_CNTL__LC_L1_INACTIVITY__SHIFT;
- data |= 0x1 << PCIE_LC_CNTL__LC_PMI_TO_L1_DIS__SHIFT;
+ data |= NAVI10_PCIE__LC_L0S_INACTIVITY_DEFAULT << PCIE_LC_CNTL__LC_L0S_INACTIVITY__SHIFT;
+ if (pci_is_thunderbolt_attached(adev->pdev))
+ data |= NAVI10_PCIE__LC_L1_INACTIVITY_TBT_DEFAULT << PCIE_LC_CNTL__LC_L1_INACTIVITY__SHIFT;
+ else
+ data |= NAVI10_PCIE__LC_L1_INACTIVITY_DEFAULT << PCIE_LC_CNTL__LC_L1_INACTIVITY__SHIFT;
+ data &= ~PCIE_LC_CNTL__LC_PMI_TO_L1_DIS_MASK;
if (def != data)
WREG32_PCIE(smnPCIE_LC_CNTL, data);
--
2.41.0
next prev parent reply other threads:[~2023-07-07 15:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 15:07 [PATCH 1/9] drm/amdgpu: make sure BOs are locked in amdgpu_vm_get_memory Alex Deucher
2023-07-07 15:07 ` [PATCH 2/9] drm/amdgpu: make sure that BOs have a backing store Alex Deucher
2023-07-07 15:07 ` [PATCH 3/9] drm/amdgpu: Skip mark offset for high priority rings Alex Deucher
2023-07-07 15:07 ` Alex Deucher [this message]
2023-07-07 15:07 ` [PATCH 5/9] drm/amdgpu/sdma4: set align mask to 255 Alex Deucher
2023-07-07 15:07 ` [PATCH 6/9] drm/amd/pm: add abnormal fan detection for smu 13.0.0 Alex Deucher
2023-07-07 15:07 ` [PATCH 7/9] drm/amdgpu: check RAS irq existence for VCN/JPEG Alex Deucher
2023-07-07 15:07 ` [PATCH 8/9] drm/amdgpu: fix number of fence calculations Alex Deucher
2023-07-07 15:07 ` [PATCH 9/9] drm/amd: Don't try to enable secure display TA multiple times Alex Deucher
2023-07-11 21:40 ` [PATCH 1/9] drm/amdgpu: make sure BOs are locked in amdgpu_vm_get_memory Mario Limonciello
2023-07-12 5:12 ` Greg Kroah-Hartman
2023-07-16 19:16 ` Greg KH
2023-07-16 19:22 ` Mario Limonciello
2023-07-16 19:28 ` Greg KH
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=20230707150734.746135-4-alexander.deucher@amd.com \
--to=alexander.deucher@amd.com \
--cc=evan.quan@amd.com \
--cc=mario.limonciello@amd.com \
--cc=stable@vger.kernel.org \
/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