From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Mario Limonciello <mario.limonciello@amd.com>,
Alex Deucher <alexander.deucher@amd.com>,
Sasha Levin <sashal@kernel.org>,
christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com,
daniel@ffwll.ch, evan.quan@amd.com, Hawking.Zhang@amd.com,
lijo.lazar@amd.com, candice.li@amd.com, le.ma@amd.com,
shashank.sharma@amd.com, andrealmeid@igalia.com,
srinivasan.shanmugam@amd.com, tzimmermann@suse.de, drv@mailo.com,
sunran001@208suo.com, guchun.chen@amd.com, mumei6102@gmail.com,
kevinyang.wang@amd.com, yifan1.zhang@amd.com, Lyndon.Li@amd.com,
bokun.zhang@amd.com, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: [PATCH AUTOSEL 6.5 30/37] drm/amd: Disable PP_PCIE_DPM_MASK when dynamic speed switching not supported
Date: Tue, 7 Nov 2023 07:21:41 -0500 [thread overview]
Message-ID: <20231107122407.3760584-30-sashal@kernel.org> (raw)
In-Reply-To: <20231107122407.3760584-1-sashal@kernel.org>
From: Mario Limonciello <mario.limonciello@amd.com>
[ Upstream commit fbf1035b033a51eee48d5f42e781b02fff272ca0 ]
Rather than individual ASICs checking for the quirk, set the quirk at the
driver level.
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 4 +---
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 2 +-
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ecc61a6d13e13..65779cbdbad13 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2318,6 +2318,8 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
if (amdgpu_sriov_vf(adev) && adev->asic_type == CHIP_SIENNA_CICHLID)
adev->pm.pp_feature &= ~PP_OVERDRIVE_MASK;
+ if (!amdgpu_device_pcie_dynamic_switching_supported())
+ adev->pm.pp_feature &= ~PP_PCIE_DPM_MASK;
total = true;
for (i = 0; i < adev->num_ip_blocks; i++) {
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
index 1cb4022644977..a38888176805d 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
@@ -1823,9 +1823,7 @@ static void smu7_init_dpm_defaults(struct pp_hwmgr *hwmgr)
data->mclk_dpm_key_disabled = hwmgr->feature_mask & PP_MCLK_DPM_MASK ? false : true;
data->sclk_dpm_key_disabled = hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true;
- data->pcie_dpm_key_disabled =
- !amdgpu_device_pcie_dynamic_switching_supported() ||
- !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
+ data->pcie_dpm_key_disabled = !(hwmgr->feature_mask & PP_PCIE_DPM_MASK);
/* need to set voltage control types before EVV patching */
data->voltage_control = SMU7_VOLTAGE_CONTROL_NONE;
data->vddci_control = SMU7_VOLTAGE_CONTROL_NONE;
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
index 9a5f3d31e7780..94f22df5ac205 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
@@ -2107,7 +2107,7 @@ static int sienna_cichlid_update_pcie_parameters(struct smu_context *smu,
min_lane_width = min_lane_width > max_lane_width ?
max_lane_width : min_lane_width;
- if (!amdgpu_device_pcie_dynamic_switching_supported()) {
+ if (!(smu->adev->pm.pp_feature & PP_PCIE_DPM_MASK)) {
pcie_table->pcie_gen[0] = max_gen_speed;
pcie_table->pcie_lane[0] = max_lane_width;
} else {
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
index 4fa94f583b87c..223e890575a2b 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
@@ -2436,7 +2436,7 @@ int smu_v13_0_update_pcie_parameters(struct smu_context *smu,
uint32_t smu_pcie_arg;
int ret, i;
- if (!amdgpu_device_pcie_dynamic_switching_supported()) {
+ if (!(smu->adev->pm.pp_feature & PP_PCIE_DPM_MASK)) {
if (pcie_table->pcie_gen[num_of_levels - 1] < pcie_gen_cap)
pcie_gen_cap = pcie_table->pcie_gen[num_of_levels - 1];
--
2.42.0
next prev parent reply other threads:[~2023-11-07 12:38 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-07 12:21 [PATCH AUTOSEL 6.5 01/37] drm/gma500: Fix call trace when psb_gem_mm_init() fails Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 02/37] drm/amdkfd: ratelimited SQ interrupt messages Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 03/37] drm/komeda: drop all currently held locks if deadlock happens Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 04/37] drm/amd/display: Blank phantom OTG before enabling Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 05/37] drm/amd/display: Don't lock phantom pipe on disabling Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 06/37] drm/amd/display: add seamless pipe topology transition check Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 07/37] drm/edid: Fixup h/vsync_end instead of h/vtotal Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 08/37] md: don't rely on 'mddev->pers' to be set in mddev_suspend() Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 09/37] drm/amdgpu: not to save bo in the case of RAS err_event_athub Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 10/37] drm/amdkfd: Fix a race condition of vram buffer unref in svm code Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 11/37] drm/amd: Update `update_pcie_parameters` functions to use uint8_t arguments Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 12/37] drm/amd/display: use full update for clip size increase of large plane source Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 13/37] string.h: add array-wrappers for (v)memdup_user() Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 14/37] kernel: kexec: copy user-array safely Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 15/37] kernel: watch_queue: " Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 16/37] drm_lease.c: " Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 17/37] drm: vmwgfx_surface.c: " Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 18/37] drm/msm/dp: skip validity check for DP CTS EDID checksum Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 19/37] drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7 Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 20/37] drm/radeon: Fix UBSAN array-index-out-of-bounds for Radeon HD 5430 Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 21/37] drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 22/37] drm/amdgpu: Fix potential null pointer derefernce Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 23/37] drm/panel: fix a possible null pointer dereference Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 24/37] drm/panel/panel-tpo-tpg110: " Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 25/37] drm/radeon: " Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 26/37] drm/amdgpu/vkms: " Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 27/37] drm/panel: st7703: Pick different reset sequence Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 28/37] drm/amdkfd: Fix shift out-of-bounds issue Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 29/37] drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL Sasha Levin
2023-11-07 12:21 ` Sasha Levin [this message]
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 31/37] drm/amd/display: fix num_ways overflow error Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 32/37] drm/amd: check num of link levels when update pcie param Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 33/37] arm64: dts: renesas: r8a779f0: spider: Enable PCIe Host ch0 Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 34/37] arm64: dts: rockchip: add PCIe to rk3588s-indiedroid-nova Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 35/37] arm64: dts: rockchip: add USB2 to rk3588s-indiedroid Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 36/37] arm64: dts: ls208xa: use a pseudo-bus to constrain usb dma size Sasha Levin
2023-11-07 12:21 ` [PATCH AUTOSEL 6.5 37/37] selftests/efivarfs: create-read: fix a resource leak Sasha Levin
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=20231107122407.3760584-30-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Hawking.Zhang@amd.com \
--cc=Lyndon.Li@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrealmeid@igalia.com \
--cc=bokun.zhang@amd.com \
--cc=candice.li@amd.com \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=drv@mailo.com \
--cc=evan.quan@amd.com \
--cc=guchun.chen@amd.com \
--cc=kevinyang.wang@amd.com \
--cc=le.ma@amd.com \
--cc=lijo.lazar@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mumei6102@gmail.com \
--cc=shashank.sharma@amd.com \
--cc=srinivasan.shanmugam@amd.com \
--cc=stable@vger.kernel.org \
--cc=sunran001@208suo.com \
--cc=tzimmermann@suse.de \
--cc=yifan1.zhang@amd.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