Commit 73dae652dcac ("drm/amdgpu: rework resume handling for display (v2)") missed a small code change when it was backported resulting in an automatic backlight control breakage. Fix the backport.
Note that this patch is not in Linus' tree as it is not required there; the bug was introduced in the backport.
Fixes: 99a02eab8251 ("drm/amdgpu: rework resume handling for display (v2)") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3853 Signed-off-by: Alex Deucher alexander.deucher@amd.com Cc: stable@vger.kernel.org # 6.11.x --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 51904906545e..45e28726e148 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3721,8 +3721,12 @@ static int amdgpu_device_ip_resume_phase3(struct amdgpu_device *adev) continue; if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE) { r = adev->ip_blocks[i].version->funcs->resume(adev); - if (r) + if (r) { + DRM_ERROR("resume of IP block <%s> failed %d\n", + adev->ip_blocks[i].version->funcs->name, r); return r; + } + adev->ip_blocks[i].status.hw = true; } }
On Fri, Dec 27, 2024 at 02:37:00AM -0500, Alex Deucher wrote:
Commit 73dae652dcac ("drm/amdgpu: rework resume handling for display (v2)") missed a small code change when it was backported resulting in an automatic backlight control breakage. Fix the backport.
Note that this patch is not in Linus' tree as it is not required there; the bug was introduced in the backport.
Fixes: 99a02eab8251 ("drm/amdgpu: rework resume handling for display (v2)") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3853 Signed-off-by: Alex Deucher alexander.deucher@amd.com Cc: stable@vger.kernel.org # 6.11.x
So the 6.12.y backport is ok? What exact trees is this fix for?
thanks,
greg k-h
On 27. 12. 24, 8:50, Greg KH wrote:
On Fri, Dec 27, 2024 at 02:37:00AM -0500, Alex Deucher wrote:
Commit 73dae652dcac ("drm/amdgpu: rework resume handling for display (v2)") missed a small code change when it was backported resulting in an automatic backlight control breakage. Fix the backport.
Note that this patch is not in Linus' tree as it is not required there; the bug was introduced in the backport.
Fixes: 99a02eab8251 ("drm/amdgpu: rework resume handling for display (v2)") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3853 Signed-off-by: Alex Deucher alexander.deucher@amd.com Cc: stable@vger.kernel.org # 6.11.x
So the 6.12.y backport is ok? What exact trees is this fix for?
IMO all trees which received 73dae652dcac are broken. All the backports call "adev->ip_blocks[i].version->funcs->resume()" and not "amdgpu_ip_block_resume()" (as in upstream). Incl. 6.12.
And there is a bug report for 6.12 here too: https://bugzilla.suse.com/show_bug.cgi?id=1234782
$ git grep -A8 'stat.*amdgpu_device_ip_resume_phase3'
releases/5.15.174/drm-amdgpu-rework-resume-handling-for-display-v2.patch:+static int amdgpu_device_ip_resume_phase3(struct amdgpu_device *adev) releases/5.15.174/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+{ releases/5.15.174/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ int i, r; releases/5.15.174/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ releases/5.15.174/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ for (i = 0; i < adev->num_ip_blocks; i++) { releases/5.15.174/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ if (!adev->ip_blocks[i].status.valid || adev->ip_blocks[i].status.hw) releases/5.15.174/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ continue; releases/5.15.174/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE) { releases/5.15.174/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ r = adev->ip_blocks[i].version->funcs->resume(adev); -- releases/6.1.120/drm-amdgpu-rework-resume-handling-for-display-v2.patch:+static int amdgpu_device_ip_resume_phase3(struct amdgpu_device *adev) releases/6.1.120/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+{ releases/6.1.120/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ int i, r; releases/6.1.120/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ releases/6.1.120/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ for (i = 0; i < adev->num_ip_blocks; i++) { releases/6.1.120/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ if (!adev->ip_blocks[i].status.valid || adev->ip_blocks[i].status.hw) releases/6.1.120/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ continue; releases/6.1.120/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE) { releases/6.1.120/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ r = adev->ip_blocks[i].version->funcs->resume(adev); -- releases/6.12.5/drm-amdgpu-rework-resume-handling-for-display-v2.patch:+static int amdgpu_device_ip_resume_phase3(struct amdgpu_device *adev) releases/6.12.5/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+{ releases/6.12.5/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ int i, r; releases/6.12.5/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ releases/6.12.5/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ for (i = 0; i < adev->num_ip_blocks; i++) { releases/6.12.5/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ if (!adev->ip_blocks[i].status.valid || adev->ip_blocks[i].status.hw) releases/6.12.5/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ continue; releases/6.12.5/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE) { releases/6.12.5/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ r = adev->ip_blocks[i].version->funcs->resume(adev); -- releases/6.6.66/drm-amdgpu-rework-resume-handling-for-display-v2.patch:+static int amdgpu_device_ip_resume_phase3(struct amdgpu_device *adev) releases/6.6.66/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+{ releases/6.6.66/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ int i, r; releases/6.6.66/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ releases/6.6.66/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ for (i = 0; i < adev->num_ip_blocks; i++) { releases/6.6.66/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ if (!adev->ip_blocks[i].status.valid || adev->ip_blocks[i].status.hw) releases/6.6.66/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ continue; releases/6.6.66/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE) { releases/6.6.66/drm-amdgpu-rework-resume-handling-for-display-v2.patch-+ r = adev->ip_blocks[i].version->funcs->resume(adev);
thanks,
[Public]
-----Original Message----- From: Greg KH gregkh@linuxfoundation.org Sent: Friday, December 27, 2024 2:50 AM To: Deucher, Alexander Alexander.Deucher@amd.com Cc: stable@vger.kernel.org; sashal@kernel.org Subject: Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac
On Fri, Dec 27, 2024 at 02:37:00AM -0500, Alex Deucher wrote:
Commit 73dae652dcac ("drm/amdgpu: rework resume handling for display (v2)") missed a small code change when it was backported resulting in an automatic backlight control breakage. Fix the backport.
Note that this patch is not in Linus' tree as it is not required there; the bug was introduced in the backport.
Fixes: 99a02eab8251 ("drm/amdgpu: rework resume handling for display (v2)") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3853 Signed-off-by: Alex Deucher alexander.deucher@amd.com Cc: stable@vger.kernel.org # 6.11.x
So the 6.12.y backport is ok? What exact trees is this fix for?
Everything older than 6.13 needs this fix. The code changed between 6.12 and 6.13 which required a backport of the patch for 6.12 and older kernels. All kernels older than 6.13 need this fix. The original backported patch targeted 6.11 and newer stable kernels. 6.11 is EOL so probably just 6.12 unless someone pulled the patch back to some older kernel as well.
Thanks,
Alex
On Thu, Jan 02, 2025 at 06:08:38PM +0000, Deucher, Alexander wrote:
[Public]
-----Original Message----- From: Greg KH gregkh@linuxfoundation.org Sent: Friday, December 27, 2024 2:50 AM To: Deucher, Alexander Alexander.Deucher@amd.com Cc: stable@vger.kernel.org; sashal@kernel.org Subject: Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac
On Fri, Dec 27, 2024 at 02:37:00AM -0500, Alex Deucher wrote:
Commit 73dae652dcac ("drm/amdgpu: rework resume handling for display (v2)") missed a small code change when it was backported resulting in an automatic backlight control breakage. Fix the backport.
Note that this patch is not in Linus' tree as it is not required there; the bug was introduced in the backport.
Fixes: 99a02eab8251 ("drm/amdgpu: rework resume handling for display (v2)") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3853 Signed-off-by: Alex Deucher alexander.deucher@amd.com Cc: stable@vger.kernel.org # 6.11.x
So the 6.12.y backport is ok? What exact trees is this fix for?
Everything older than 6.13 needs this fix. The code changed between 6.12 and 6.13 which required a backport of the patch for 6.12 and older kernels. All kernels older than 6.13 need this fix. The original backported patch targeted 6.11 and newer stable kernels. 6.11 is EOL so probably just 6.12 unless someone pulled the patch back to some older kernel as well.
The commit has been backported to the following kernels: 5.15.174 6.1.120 6.6.66 6.12.5 so can you also send proper fixes for 5.15.y, 6.1.y and 6.6.y as well?
thanks,
greg k-h
linux-stable-mirror@lists.linaro.org