linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Backlight control broken on UM325 (OLED) on 5.15 (bisected)
@ 2021-11-14 10:56 Samuel Čavoj
  2021-11-15 15:43 ` Alex Deucher
  0 siblings, 1 reply; 5+ messages in thread
From: Samuel Čavoj @ 2021-11-14 10:56 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Harry Wentland, Roman Li, Leo Li, amd-gfx, dri-devel, linux-kernel

Hello,

the backlight control no longer works on my ASUS UM325 (Ryzen 5700U)
OLED laptop. I have bisected the breakage to commit 7fd13baeb7a3a48.

    commit 7fd13baeb7a3a48cae12c36c52f06bf4e9e7d728 (HEAD, refs/bisect/bad)
    Author: Alex Deucher <alexander.deucher@amd.com>
    Date:   Thu Jul 8 16:31:10 2021 -0400
     
        drm/amdgpu/display: add support for multiple backlights
        
        On platforms that support multiple backlights, register
        each one separately.  This lets us manage them independently
        rather than registering a single backlight and applying the
        same settings to both.
        
        v2: fix typo:
        Reported-by: kernel test robot <lkp@intel.com>
        
        Reviewed-by: Roman Li <Roman.Li@amd.com>
        Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

I have encountered another user with the same issue on reddit[0].

The node in /sys/class/backlight exists, writing to it just does
nothing. I would be glad to help debugging the issue. Thank you very
much.

Regards,
Samuel Čavoj

[0]: https://www.reddit.com/r/AMDLaptops/comments/qst0fm/after_updating_to_linux_515_my_brightness/

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

* Re: Backlight control broken on UM325 (OLED) on 5.15 (bisected)
  2021-11-14 10:56 Backlight control broken on UM325 (OLED) on 5.15 (bisected) Samuel Čavoj
@ 2021-11-15 15:43 ` Alex Deucher
  2021-11-16 13:32   ` Samuel Čavoj
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Deucher @ 2021-11-15 15:43 UTC (permalink / raw)
  To: Samuel Čavoj
  Cc: Alex Deucher, Leo Li, Roman Li, Maling list - DRI developers,
	LKML, amd-gfx list

On Mon, Nov 15, 2021 at 2:35 AM Samuel Čavoj <samuel@cavoj.net> wrote:
>
> Hello,
>
> the backlight control no longer works on my ASUS UM325 (Ryzen 5700U)
> OLED laptop. I have bisected the breakage to commit 7fd13baeb7a3a48.
>
>     commit 7fd13baeb7a3a48cae12c36c52f06bf4e9e7d728 (HEAD, refs/bisect/bad)
>     Author: Alex Deucher <alexander.deucher@amd.com>
>     Date:   Thu Jul 8 16:31:10 2021 -0400
>
>         drm/amdgpu/display: add support for multiple backlights
>
>         On platforms that support multiple backlights, register
>         each one separately.  This lets us manage them independently
>         rather than registering a single backlight and applying the
>         same settings to both.
>
>         v2: fix typo:
>         Reported-by: kernel test robot <lkp@intel.com>
>
>         Reviewed-by: Roman Li <Roman.Li@amd.com>
>         Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>
> I have encountered another user with the same issue on reddit[0].
>
> The node in /sys/class/backlight exists, writing to it just does
> nothing. I would be glad to help debugging the issue. Thank you very
> much.

That patch adds support for systems with multiple backlights.  Do you
have multiple backlight devices now?  If so, does the other one work?

Can you also try this patch?

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
index 4811b0faafd9..67163c9d49e6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
@@ -854,8 +854,8 @@ int amdgpu_acpi_init(struct amdgpu_device *adev)
                if (amdgpu_device_has_dc_support(adev)) {
 #if defined(CONFIG_DRM_AMD_DC)
                        struct amdgpu_display_manager *dm = &adev->dm;
-                       if (dm->backlight_dev[0])
-                               atif->bd = dm->backlight_dev[0];
+                       if (dm->backlight_dev[1])
+                               atif->bd = dm->backlight_dev[1];
 #endif
                } else {
                        struct drm_encoder *tmp;


Alex

>
> Regards,
> Samuel Čavoj
>
> [0]: https://www.reddit.com/r/AMDLaptops/comments/qst0fm/after_updating_to_linux_515_my_brightness/

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

* Re: Backlight control broken on UM325 (OLED) on 5.15 (bisected)
  2021-11-15 15:43 ` Alex Deucher
@ 2021-11-16 13:32   ` Samuel Čavoj
  2021-11-17 15:26     ` Li, Roman
  0 siblings, 1 reply; 5+ messages in thread
From: Samuel Čavoj @ 2021-11-16 13:32 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Alex Deucher, Leo Li, Roman Li, Maling list - DRI developers,
	LKML, amd-gfx list

Hi Alex,

thank you for your response.

On 15.11.2021 10:43, Alex Deucher wrote:
> [...]
>
> That patch adds support for systems with multiple backlights.  Do you
> have multiple backlight devices now?  If so, does the other one work?

No, there is still only one backlight device -- amdgpu_bl0.
> 
> Can you also try this patch?
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> index 4811b0faafd9..67163c9d49e6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -854,8 +854,8 @@ int amdgpu_acpi_init(struct amdgpu_device *adev)
>                 if (amdgpu_device_has_dc_support(adev)) {
>  #if defined(CONFIG_DRM_AMD_DC)
>                         struct amdgpu_display_manager *dm = &adev->dm;
> -                       if (dm->backlight_dev[0])
> -                               atif->bd = dm->backlight_dev[0];
> +                       if (dm->backlight_dev[1])
> +                               atif->bd = dm->backlight_dev[1];
>  #endif
>                 } else {
>                         struct drm_encoder *tmp;
> 

There is no difference in behaviour after applying the patch.

Samuel

> 
> Alex
> 
> >
> > Regards,
> > Samuel Čavoj
> >
> > [0]: https://www.reddit.com/r/AMDLaptops/comments/qst0fm/after_updating_to_linux_515_my_brightness/

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

* RE: Backlight control broken on UM325 (OLED) on 5.15 (bisected)
  2021-11-16 13:32   ` Samuel Čavoj
@ 2021-11-17 15:26     ` Li, Roman
  2021-11-17 16:35       ` Samuel Čavoj
  0 siblings, 1 reply; 5+ messages in thread
From: Li, Roman @ 2021-11-17 15:26 UTC (permalink / raw)
  To: Samuel Čavoj, Alex Deucher
  Cc: Deucher, Alexander, Li, Sun peng (Leo),
	Maling list - DRI developers, LKML, amd-gfx list

[Public]

Hi Samuel,

Can you please try: https://patchwork.freedesktop.org/patch/463485/ ?

Thanks,
Roman

> -----Original Message-----
> From: Samuel Čavoj <samuel@cavoj.net>
> Sent: Tuesday, November 16, 2021 8:33 AM
> To: Alex Deucher <alexdeucher@gmail.com>
> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Li, Sun peng (Leo)
> <Sunpeng.Li@amd.com>; Li, Roman <Roman.Li@amd.com>; Maling list - DRI
> developers <dri-devel@lists.freedesktop.org>; LKML <linux-
> kernel@vger.kernel.org>; amd-gfx list <amd-gfx@lists.freedesktop.org>
> Subject: Re: Backlight control broken on UM325 (OLED) on 5.15 (bisected)
>
> Hi Alex,
>
> thank you for your response.
>
> On 15.11.2021 10:43, Alex Deucher wrote:
> > [...]
> >
> > That patch adds support for systems with multiple backlights.  Do you
> > have multiple backlight devices now?  If so, does the other one work?
>
> No, there is still only one backlight device -- amdgpu_bl0.
> >
> > Can you also try this patch?
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > index 4811b0faafd9..67163c9d49e6 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > @@ -854,8 +854,8 @@ int amdgpu_acpi_init(struct amdgpu_device *adev)
> >                 if (amdgpu_device_has_dc_support(adev)) {  #if
> > defined(CONFIG_DRM_AMD_DC)
> >                         struct amdgpu_display_manager *dm = &adev->dm;
> > -                       if (dm->backlight_dev[0])
> > -                               atif->bd = dm->backlight_dev[0];
> > +                       if (dm->backlight_dev[1])
> > +                               atif->bd = dm->backlight_dev[1];
> >  #endif
> >                 } else {
> >                         struct drm_encoder *tmp;
> >
>
> There is no difference in behaviour after applying the patch.
>
> Samuel
>
> >
> > Alex
> >
> > >
> > > Regards,
> > > Samuel Čavoj
> > >
> > > [0]:
> > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> > >
> w.reddit.com%2Fr%2FAMDLaptops%2Fcomments%2Fqst0fm%2Fafter_updating
> _t
> > >
> o_linux_515_my_brightness%2F&amp;data=04%7C01%7CRoman.Li%40amd.co
> m%7
> > >
> Ce1c766a2f7014cdb664308d9a9059cc6%7C3dd8961fe4884e608e11a82d994e1
> 83d
> > >
> %7C0%7C0%7C637726663861883494%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi
> MC4wLj
> > >
> AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;s
> dat
> > >
> a=hfsaEzng9%2FjAI2F%2BKg87Tv2Mu%2FfPurCQELr62%2B%2FVF%2BQ%3D&a
> mp;res
> > > erved=0

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

* Re: Backlight control broken on UM325 (OLED) on 5.15 (bisected)
  2021-11-17 15:26     ` Li, Roman
@ 2021-11-17 16:35       ` Samuel Čavoj
  0 siblings, 0 replies; 5+ messages in thread
From: Samuel Čavoj @ 2021-11-17 16:35 UTC (permalink / raw)
  To: Li, Roman
  Cc: Alex Deucher, Deucher, Alexander, Li, Sun peng (Leo),
	Maling list - DRI developers, LKML, amd-gfx list

Hi Roman,

On 17.11.2021 15:26, Li, Roman wrote:
> [Public]
> 
> Hi Samuel,
> 
> Can you please try: https://patchwork.freedesktop.org/patch/463485/ ?

Yup, that did the trick. Works as before. Thank you very much.

Samuel

> 
> Thanks,
> Roman
> 
> > -----Original Message-----
> > From: Samuel Čavoj <samuel@cavoj.net>
> > Sent: Tuesday, November 16, 2021 8:33 AM
> > To: Alex Deucher <alexdeucher@gmail.com>
> > Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Li, Sun peng (Leo)
> > <Sunpeng.Li@amd.com>; Li, Roman <Roman.Li@amd.com>; Maling list - DRI
> > developers <dri-devel@lists.freedesktop.org>; LKML <linux-
> > kernel@vger.kernel.org>; amd-gfx list <amd-gfx@lists.freedesktop.org>
> > Subject: Re: Backlight control broken on UM325 (OLED) on 5.15 (bisected)
> >
> > Hi Alex,
> >
> > thank you for your response.
> >
> > On 15.11.2021 10:43, Alex Deucher wrote:
> > > [...]
> > >
> > > That patch adds support for systems with multiple backlights.  Do you
> > > have multiple backlight devices now?  If so, does the other one work?
> >
> > No, there is still only one backlight device -- amdgpu_bl0.
> > >
> > > Can you also try this patch?
> > >
> > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > > index 4811b0faafd9..67163c9d49e6 100644
> > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> > > @@ -854,8 +854,8 @@ int amdgpu_acpi_init(struct amdgpu_device *adev)
> > >                 if (amdgpu_device_has_dc_support(adev)) {  #if
> > > defined(CONFIG_DRM_AMD_DC)
> > >                         struct amdgpu_display_manager *dm = &adev->dm;
> > > -                       if (dm->backlight_dev[0])
> > > -                               atif->bd = dm->backlight_dev[0];
> > > +                       if (dm->backlight_dev[1])
> > > +                               atif->bd = dm->backlight_dev[1];
> > >  #endif
> > >                 } else {
> > >                         struct drm_encoder *tmp;
> > >
> >
> > There is no difference in behaviour after applying the patch.
> >
> > Samuel
> >
> > >
> > > Alex
> > >
> > > >
> > > > Regards,
> > > > Samuel Čavoj
> > > >
> > > > [0]:
> > > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fww
> > > >
> > w.reddit.com%2Fr%2FAMDLaptops%2Fcomments%2Fqst0fm%2Fafter_updating
> > _t
> > > >
> > o_linux_515_my_brightness%2F&amp;data=04%7C01%7CRoman.Li%40amd.co
> > m%7
> > > >
> > Ce1c766a2f7014cdb664308d9a9059cc6%7C3dd8961fe4884e608e11a82d994e1
> > 83d
> > > >
> > %7C0%7C0%7C637726663861883494%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi
> > MC4wLj
> > > >
> > AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;s
> > dat
> > > >
> > a=hfsaEzng9%2FjAI2F%2BKg87Tv2Mu%2FfPurCQELr62%2B%2FVF%2BQ%3D&a
> > mp;res
> > > > erved=0

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

end of thread, other threads:[~2021-11-17 16:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-14 10:56 Backlight control broken on UM325 (OLED) on 5.15 (bisected) Samuel Čavoj
2021-11-15 15:43 ` Alex Deucher
2021-11-16 13:32   ` Samuel Čavoj
2021-11-17 15:26     ` Li, Roman
2021-11-17 16:35       ` Samuel Čavoj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).