Skip to contentSkip to conversation

drm/amdgpu: fix backport of commit 73dae652dcac

PATCH In review Alex Deucher 4 participants 7 messages Dec 27, 2024 – Jan 12, 2025

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: fix backport of commit 73dae652dcac

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)")
Cc [email protected] # 6.11.x
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +5 -1
index 51904906545e..45e28726e148 100644
@@ -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;
 		}
 	}
 
Signature · 1 line
2.47.1
maintainer
#1 lore raw
Quoted 11 lines · Alex Deucher

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)")
Cc [email protected] # 6.11.x

So the 6.12.y backport is ok? What exact trees is this fix for?

thanks,

greg k-h

#2 lore raw
Quoted 8 lines · Greg KH
Quoted 7 lines · Alex Deucher

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.

Quoted 6 lines
Quoted 4 lines
Fixes 99a02eab8251 ("drm/amdgpu: rework resume handling for display (v2)")
Cc [email protected] # 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'
Quoted 31 lines

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)

Quoted 8 lines

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,

Signature · 2 lines
js
suse labs
author maintainer
#3 lore raw
In reply to Greg KH

[Public]

Quoted 15 lines

-----Original Message-----
From: Greg KH <[email protected]>
Sent: Friday, December 27, 2024 2:50 AM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac

Quoted 7 lines · Alex Deucher

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.

Quoted 7 lines
Quoted 5 lines
Fixes 99a02eab8251 ("drm/amdgpu: rework resume handling for display

(v2)")

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

maintainer
#4 lore raw
Quoted 23 lines · Alexander

[Public]

Quoted 21 lines

-----Original Message-----
From: Greg KH <[email protected]>
Sent: Friday, December 27, 2024 2:50 AM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac

Quoted 12 lines · Alex Deucher

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)")

Quoted 3 lines
Quoted 1 line

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

author maintainer
#5 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 36 lines

-----Original Message-----
From: Greg KH <[email protected]>
Sent: Friday, January 3, 2025 9:41 AM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac

Quoted 25 lines · Alexander

[Public]

Quoted 23 lines

-----Original Message-----
From: Greg KH <[email protected]>
Sent: Friday, December 27, 2024 2:50 AM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac

Quoted 14 lines · Alex Deucher

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)")

Quoted 3 lines
Quoted 1 line

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

Quoted 8 lines

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?

Ok. The patch is only needed for 6.11 and newer which is why I specified 6.11 on the original and the fixup. Kernels older than 6.11 didn't support DCN 4.0.1 so it's not applicable. Can we revert the original patch (73dae652dcac ("drm/amdgpu: rework resume handling for display")) from 5.15, 6.1, and 6.6?

Thanks,

Alex

Quoted 4 lines

thanks,

greg k-h

#6 lore raw

Hi,

Quoted 47 lines · Alexander

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 36 lines

-----Original Message-----
From: Greg KH <[email protected]>
Sent: Friday, January 3, 2025 9:41 AM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac

Quoted 25 lines · Alexander

[Public]

Quoted 23 lines

-----Original Message-----
From: Greg KH <[email protected]>
Sent: Friday, December 27, 2024 2:50 AM
To: Deucher, Alexander <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac

Quoted 14 lines · Alex Deucher

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)")

Quoted 3 lines
Quoted 1 line

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

Quoted 8 lines

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?

Quoted 5 lines

Ok. The patch is only needed for 6.11 and newer which is why I specified 6.11 on the original and the fixup. Kernels older than 6.11 didn't support DCN 4.0.1 so it's not applicable. Can we revert the original patch (73dae652dcac ("drm/amdgpu: rework resume handling for display")) from 5.15, 6.1, and 6.6?

That 73dae652dcac ("drm/amdgpu: rework resume handling for display") as applied as well to the 6.1.y series and needs to be reverted again, can this be the reason for the regression report in Debian as
https://bugs.debian.org/1092869 ? (caused after updating 6.1.119 to 6.1.123).

(I have asked the reporter for more information, once I have this information I can provide a proper report back).

Regards,
Salvatore