All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac
@ 2024-12-27  7:37 Alex Deucher
  2024-12-27  7:50 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Deucher @ 2024-12-27  7:37 UTC (permalink / raw)
  To: stable, gregkh, sashal; +Cc: 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)")
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;
 		}
 	}
 
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac
  2024-12-27  7:37 [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac Alex Deucher
@ 2024-12-27  7:50 ` Greg KH
  2025-01-02  8:52   ` Jiri Slaby
  2025-01-02 18:08   ` Deucher, Alexander
  0 siblings, 2 replies; 7+ messages in thread
From: Greg KH @ 2024-12-27  7:50 UTC (permalink / raw)
  To: Alex Deucher; +Cc: stable, sashal

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac
  2024-12-27  7:50 ` Greg KH
@ 2025-01-02  8:52   ` Jiri Slaby
  2025-01-02 18:08   ` Deucher, Alexander
  1 sibling, 0 replies; 7+ messages in thread
From: Jiri Slaby @ 2025-01-02  8:52 UTC (permalink / raw)
  To: Greg KH, Alex Deucher; +Cc: stable, sashal

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,
-- 
js
suse labs


^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac
  2024-12-27  7:50 ` Greg KH
  2025-01-02  8:52   ` Jiri Slaby
@ 2025-01-02 18:08   ` Deucher, Alexander
  2025-01-03 14:40     ` Greg KH
  1 sibling, 1 reply; 7+ messages in thread
From: Deucher, Alexander @ 2025-01-02 18:08 UTC (permalink / raw)
  To: Greg KH; +Cc: stable@vger.kernel.org, sashal@kernel.org

[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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac
  2025-01-02 18:08   ` Deucher, Alexander
@ 2025-01-03 14:40     ` Greg KH
  2025-01-09 18:21       ` Deucher, Alexander
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2025-01-03 14:40 UTC (permalink / raw)
  To: Deucher, Alexander; +Cc: stable@vger.kernel.org, sashal@kernel.org

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac
  2025-01-03 14:40     ` Greg KH
@ 2025-01-09 18:21       ` Deucher, Alexander
  2025-01-12 16:50         ` Salvatore Bonaccorso
  0 siblings, 1 reply; 7+ messages in thread
From: Deucher, Alexander @ 2025-01-09 18:21 UTC (permalink / raw)
  To: Greg KH; +Cc: stable@vger.kernel.org, sashal@kernel.org

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Friday, January 3, 2025 9:41 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 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?

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

>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac
  2025-01-09 18:21       ` Deucher, Alexander
@ 2025-01-12 16:50         ` Salvatore Bonaccorso
  0 siblings, 0 replies; 7+ messages in thread
From: Salvatore Bonaccorso @ 2025-01-12 16:50 UTC (permalink / raw)
  To: Deucher, Alexander; +Cc: Greg KH, stable@vger.kernel.org, sashal@kernel.org

Hi,

On Thu, Jan 09, 2025 at 06:21:19PM +0000, Deucher, Alexander wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
> 
> > -----Original Message-----
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Sent: Friday, January 3, 2025 9:41 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 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?
> 
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-01-12 16:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-27  7:37 [PATCH] drm/amdgpu: fix backport of commit 73dae652dcac Alex Deucher
2024-12-27  7:50 ` Greg KH
2025-01-02  8:52   ` Jiri Slaby
2025-01-02 18:08   ` Deucher, Alexander
2025-01-03 14:40     ` Greg KH
2025-01-09 18:21       ` Deucher, Alexander
2025-01-12 16:50         ` Salvatore Bonaccorso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.