From: Greg Kroah-Hartman Date: Tue, 21 Jan 2025 13:16:02 +0000 (+0100) Subject: 5.15-stable patches X-Git-Tag: v5.15.177~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f285093ef6cd06c827a7afbf9b0c54ab3e35b666;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: revert-drm-amdgpu-rework-resume-handling-for-display-v2.patch --- diff --git a/queue-5.15/revert-drm-amdgpu-rework-resume-handling-for-display-v2.patch b/queue-5.15/revert-drm-amdgpu-rework-resume-handling-for-display-v2.patch new file mode 100644 index 0000000000..62843f7ecf --- /dev/null +++ b/queue-5.15/revert-drm-amdgpu-rework-resume-handling-for-display-v2.patch @@ -0,0 +1,120 @@ +From 07848f7918f9a09c1f4708ac7e55db8052b5ca07 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Tue, 21 Jan 2025 14:15:30 +0100 +Subject: Revert "drm/amdgpu: rework resume handling for display (v2)" + +From: Greg Kroah-Hartman + +This reverts commit d897650c5897b3d858ca97ab77d10041e8e34231 which is +commit 73dae652dcac776296890da215ee7dec357a1032 upstream. + +The original patch 73dae652dcac (drm/amdgpu: rework resume handling for +display (v2)), was only targeted at kernels 6.11 and newer. It did not +apply cleanly to 6.12 so I backported it and it backport landed as +99a02eab8251 ("drm/amdgpu: rework resume handling for display (v2)"), +however there was a bug in the backport that was subsequently fixed in +063d380ca28e ("drm/amdgpu: fix backport of commit 73dae652dcac"). None +of this was intended for kernels older than 6.11, however the original +backport eventually landed in 6.6, 6.1, and 5.15. + +Please revert the change from kernels 6.6, 6.1, and 5.15. + +Link: https://lore.kernel.org/r/BL1PR12MB5144D5363FCE6F2FD3502534F7E72@BL1PR12MB5144.namprd12.prod.outlook.com +Link: https://lore.kernel.org/r/BL1PR12MB51449ADCFBF2314431F8BCFDF7132@BL1PR12MB5144.namprd12.prod.outlook.com +Reported-by: Salvatore Bonaccorso +Reported-by: Christian König +Reported-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 45 +---------------------------- + 1 file changed, 2 insertions(+), 43 deletions(-) + +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +@@ -3197,7 +3197,7 @@ static int amdgpu_device_ip_resume_phase + * + * @adev: amdgpu_device pointer + * +- * Second resume function for hardware IPs. The list of all the hardware ++ * First resume function for hardware IPs. The list of all the hardware + * IPs that make up the asic is walked and the resume callbacks are run for + * all blocks except COMMON, GMC, and IH. resume puts the hardware into a + * functional state after a suspend and updates the software state as +@@ -3215,7 +3215,6 @@ static int amdgpu_device_ip_resume_phase + if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON || + adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC || + adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH || +- adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE || + adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP) + continue; + r = adev->ip_blocks[i].version->funcs->resume(adev); +@@ -3240,36 +3239,6 @@ static int amdgpu_device_ip_resume_phase + } + + /** +- * amdgpu_device_ip_resume_phase3 - run resume for hardware IPs +- * +- * @adev: amdgpu_device pointer +- * +- * Third resume function for hardware IPs. The list of all the hardware +- * IPs that make up the asic is walked and the resume callbacks are run for +- * all DCE. resume puts the hardware into a functional state after a suspend +- * and updates the software state as necessary. This function is also used +- * for restoring the GPU after a GPU reset. +- * +- * Returns 0 on success, negative error code on failure. +- */ +-static int amdgpu_device_ip_resume_phase3(struct amdgpu_device *adev) +-{ +- int i, r; +- +- for (i = 0; i < adev->num_ip_blocks; i++) { +- if (!adev->ip_blocks[i].status.valid || adev->ip_blocks[i].status.hw) +- continue; +- if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE) { +- r = adev->ip_blocks[i].version->funcs->resume(adev); +- if (r) +- return r; +- } +- } +- +- return 0; +-} +- +-/** + * amdgpu_device_ip_resume - run resume for hardware IPs + * + * @adev: amdgpu_device pointer +@@ -3299,13 +3268,6 @@ static int amdgpu_device_ip_resume(struc + + r = amdgpu_device_ip_resume_phase2(adev); + +- if (r) +- return r; +- +- amdgpu_fence_driver_hw_init(adev); +- +- r = amdgpu_device_ip_resume_phase3(adev); +- + return r; + } + +@@ -4198,6 +4160,7 @@ int amdgpu_device_resume(struct drm_devi + dev_err(adev->dev, "amdgpu_device_ip_resume failed (%d).\n", r); + return r; + } ++ amdgpu_fence_driver_hw_init(adev); + + r = amdgpu_device_ip_late_init(adev); + if (r) +@@ -4843,10 +4806,6 @@ int amdgpu_do_asic_reset(struct list_hea + if (r) + goto out; + +- r = amdgpu_device_ip_resume_phase3(tmp_adev); +- if (r) +- goto out; +- + if (vram_lost) + amdgpu_device_fill_reset_magic(tmp_adev); + diff --git a/queue-5.15/series b/queue-5.15/series index 355f35f8c7..8e43920af2 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -116,3 +116,4 @@ revert-pci-use-preserve_config-in-place-of-pci_flags.patch iio-imu-inv_icm42600-fix-spi-burst-write-not-supported.patch iio-imu-inv_icm42600-fix-timestamps-after-suspend-if-sensor-is-on.patch iio-adc-rockchip_saradc-fix-information-leak-in-triggered-buffer.patch +revert-drm-amdgpu-rework-resume-handling-for-display-v2.patch