From: Greg Kroah-Hartman Date: Sun, 17 Nov 2024 21:15:10 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v6.12.1~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8997056c1b67dd454c2cc8b4fadd62f12209f7b9;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: drm-amd-display-adjust-vsdb-parser-for-replay-feature.patch drm-amd-fix-initialization-mistake-for-nbio-7.7.0.patch nouveau-fw-sync-dma-after-setup-is-called.patch pmdomain-imx93-blk-ctrl-correct-remove-path.patch --- diff --git a/queue-6.6/drm-amd-display-adjust-vsdb-parser-for-replay-feature.patch b/queue-6.6/drm-amd-display-adjust-vsdb-parser-for-replay-feature.patch new file mode 100644 index 00000000000..f350d77976f --- /dev/null +++ b/queue-6.6/drm-amd-display-adjust-vsdb-parser-for-replay-feature.patch @@ -0,0 +1,54 @@ +From 16dd2825c23530f2259fc671960a3a65d2af69bd Mon Sep 17 00:00:00 2001 +From: Rodrigo Siqueira +Date: Tue, 5 Nov 2024 08:40:23 -0700 +Subject: drm/amd/display: Adjust VSDB parser for replay feature + +From: Rodrigo Siqueira + +commit 16dd2825c23530f2259fc671960a3a65d2af69bd upstream. + +At some point, the IEEE ID identification for the replay check in the +AMD EDID was added. However, this check causes the following +out-of-bounds issues when using KASAN: + +[ 27.804016] BUG: KASAN: slab-out-of-bounds in amdgpu_dm_update_freesync_caps+0xefa/0x17a0 [amdgpu] +[ 27.804788] Read of size 1 at addr ffff8881647fdb00 by task systemd-udevd/383 + +... + +[ 27.821207] Memory state around the buggy address: +[ 27.821215] ffff8881647fda00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +[ 27.821224] ffff8881647fda80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +[ 27.821234] >ffff8881647fdb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc +[ 27.821243] ^ +[ 27.821250] ffff8881647fdb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc +[ 27.821259] ffff8881647fdc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +[ 27.821268] ================================================================== + +This is caused because the ID extraction happens outside of the range of +the edid lenght. This commit addresses this issue by considering the +amd_vsdb_block size. + +Cc: ChiaHsuan Chung +Reviewed-by: Leo Li +Signed-off-by: Rodrigo Siqueira +Signed-off-by: Hamza Mahfooz +Signed-off-by: Alex Deucher +(cherry picked from commit b7e381b1ccd5e778e3d9c44c669ad38439a861d8) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -10725,7 +10725,7 @@ static int parse_amd_vsdb(struct amdgpu_ + break; + } + +- while (j < EDID_LENGTH) { ++ while (j < EDID_LENGTH - sizeof(struct amd_vsdb_block)) { + struct amd_vsdb_block *amd_vsdb = (struct amd_vsdb_block *)&edid_ext[j]; + unsigned int ieeeId = (amd_vsdb->ieee_id[2] << 16) | (amd_vsdb->ieee_id[1] << 8) | (amd_vsdb->ieee_id[0]); + diff --git a/queue-6.6/drm-amd-fix-initialization-mistake-for-nbio-7.7.0.patch b/queue-6.6/drm-amd-fix-initialization-mistake-for-nbio-7.7.0.patch new file mode 100644 index 00000000000..cc375e5ca39 --- /dev/null +++ b/queue-6.6/drm-amd-fix-initialization-mistake-for-nbio-7.7.0.patch @@ -0,0 +1,40 @@ +From 7013a8268d311fded6c7a6528fc1de82668e75f6 Mon Sep 17 00:00:00 2001 +From: Vijendar Mukunda +Date: Tue, 12 Nov 2024 10:11:42 -0600 +Subject: drm/amd: Fix initialization mistake for NBIO 7.7.0 + +From: Vijendar Mukunda + +commit 7013a8268d311fded6c7a6528fc1de82668e75f6 upstream. + +There is a strapping issue on NBIO 7.7.0 that can lead to spurious PME +events while in the D0 state. + +Co-developed-by: Mario Limonciello +Signed-off-by: Vijendar Mukunda +Signed-off-by: Mario Limonciello +Acked-by: Alex Deucher +Link: https://lore.kernel.org/r/20241112161142.28974-1-mario.limonciello@amd.com +Signed-off-by: Alex Deucher +(cherry picked from commit 447a54a0f79c9a409ceaa17804bdd2e0206397b9) +Cc: stable@vger.kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c ++++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c +@@ -247,6 +247,12 @@ static void nbio_v7_7_init_registers(str + if (def != data) + WREG32_SOC15(NBIO, 0, regBIF0_PCIE_MST_CTRL_3, data); + ++ switch (adev->ip_versions[NBIO_HWIP][0]) { ++ case IP_VERSION(7, 7, 0): ++ data = RREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4) & ~BIT(23); ++ WREG32_SOC15(NBIO, 0, regRCC_DEV0_EPF5_STRAP4, data); ++ break; ++ } + } + + static void nbio_v7_7_update_medium_grain_clock_gating(struct amdgpu_device *adev, diff --git a/queue-6.6/nouveau-fw-sync-dma-after-setup-is-called.patch b/queue-6.6/nouveau-fw-sync-dma-after-setup-is-called.patch new file mode 100644 index 00000000000..3ab72cfbb56 --- /dev/null +++ b/queue-6.6/nouveau-fw-sync-dma-after-setup-is-called.patch @@ -0,0 +1,57 @@ +From 21ec425eaf2cb7c0371f7683f81ad7d9679b6eb5 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Wed, 13 Nov 2024 05:57:03 +1000 +Subject: nouveau: fw: sync dma after setup is called. + +From: Dave Airlie + +commit 21ec425eaf2cb7c0371f7683f81ad7d9679b6eb5 upstream. + +When this code moved to non-coherent allocator the sync was put too +early for some firmwares which called the setup function, move the +sync down after the setup function. + +Reported-by: Diogo Ivo +Tested-by: Diogo Ivo +Reviewed-by: Lyude Paul +Fixes: 9b340aeb26d5 ("nouveau/firmware: use dma non-coherent allocator") +Cc: stable@vger.kernel.org +Signed-off-by: Dave Airlie +Link: https://patchwork.freedesktop.org/patch/msgid/20241114004603.3095485-1-airlied@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/nouveau/nvkm/falcon/fw.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/fw.c b/drivers/gpu/drm/nouveau/nvkm/falcon/fw.c +index a1c8545f1249..cac6d64ab67d 100644 +--- a/drivers/gpu/drm/nouveau/nvkm/falcon/fw.c ++++ b/drivers/gpu/drm/nouveau/nvkm/falcon/fw.c +@@ -89,11 +89,6 @@ nvkm_falcon_fw_boot(struct nvkm_falcon_fw *fw, struct nvkm_subdev *user, + nvkm_falcon_fw_dtor_sigs(fw); + } + +- /* after last write to the img, sync dma mappings */ +- dma_sync_single_for_device(fw->fw.device->dev, +- fw->fw.phys, +- sg_dma_len(&fw->fw.mem.sgl), +- DMA_TO_DEVICE); + + FLCNFW_DBG(fw, "resetting"); + fw->func->reset(fw); +@@ -105,6 +100,12 @@ nvkm_falcon_fw_boot(struct nvkm_falcon_fw *fw, struct nvkm_subdev *user, + goto done; + } + ++ /* after last write to the img, sync dma mappings */ ++ dma_sync_single_for_device(fw->fw.device->dev, ++ fw->fw.phys, ++ sg_dma_len(&fw->fw.mem.sgl), ++ DMA_TO_DEVICE); ++ + ret = fw->func->load(fw); + if (ret) + goto done; +-- +2.47.0 + diff --git a/queue-6.6/pmdomain-imx93-blk-ctrl-correct-remove-path.patch b/queue-6.6/pmdomain-imx93-blk-ctrl-correct-remove-path.patch new file mode 100644 index 00000000000..4e263340169 --- /dev/null +++ b/queue-6.6/pmdomain-imx93-blk-ctrl-correct-remove-path.patch @@ -0,0 +1,40 @@ +From f7c7c5aa556378a2c8da72c1f7f238b6648f95fb Mon Sep 17 00:00:00 2001 +From: Peng Fan +Date: Fri, 1 Nov 2024 18:12:51 +0800 +Subject: pmdomain: imx93-blk-ctrl: correct remove path + +From: Peng Fan + +commit f7c7c5aa556378a2c8da72c1f7f238b6648f95fb upstream. + +The check condition should be 'i < bc->onecell_data.num_domains', not +'bc->onecell_data.num_domains' which will make the look never finish +and cause kernel panic. + +Also disable runtime to address +"imx93-blk-ctrl 4ac10000.system-controller: Unbalanced pm_runtime_enable!" + +Fixes: e9aa77d413c9 ("soc: imx: add i.MX93 media blk ctrl driver") +Signed-off-by: Peng Fan +Reviewed-by: Stefan Wahren +Cc: stable@vger.kernel.org +Message-ID: <20241101101252.1448466-1-peng.fan@oss.nxp.com> +Signed-off-by: Ulf Hansson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pmdomain/imx/imx93-blk-ctrl.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/pmdomain/imx/imx93-blk-ctrl.c ++++ b/drivers/pmdomain/imx/imx93-blk-ctrl.c +@@ -313,7 +313,9 @@ static int imx93_blk_ctrl_remove(struct + + of_genpd_del_provider(pdev->dev.of_node); + +- for (i = 0; bc->onecell_data.num_domains; i++) { ++ pm_runtime_disable(&pdev->dev); ++ ++ for (i = 0; i < bc->onecell_data.num_domains; i++) { + struct imx93_blk_ctrl_domain *domain = &bc->domains[i]; + + pm_genpd_remove(&domain->genpd); diff --git a/queue-6.6/series b/queue-6.6/series index f78f7963c78..fa7940c9ba8 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -48,3 +48,7 @@ loongarch-make-kasan-work-with-5-level-page-tables.patch revert-mmc-dw_mmc-fix-idmac-operation-with-pages-bigger-than-4k.patch mmc-sunxi-mmc-fix-a100-compatible-description.patch drm-bridge-tc358768-fix-dsi-command-tx.patch +pmdomain-imx93-blk-ctrl-correct-remove-path.patch +nouveau-fw-sync-dma-after-setup-is-called.patch +drm-amd-fix-initialization-mistake-for-nbio-7.7.0.patch +drm-amd-display-adjust-vsdb-parser-for-replay-feature.patch