mbox series

[0/1,SRU,M] Make backlight module auto detect dell_uart_backlight

Message ID 20230913100313.200336-1-acelan.kao@canonical.com
Headers show
Series [1/1,SRU,M] UBUNTU: SAUCE: ACPI: video: Dell AIO UART backlight detection | expand

Message

AceLan Kao Sept. 13, 2023, 10:03 a.m. UTC
From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/2008882

[Impact]
There are acpi_video* sysfs backlight interface in the system which are
not working.
For Dell AIO platforms, we use dell_uart_backlight to control the display
brightness.
The old way to fix this is to unregister acpi backlight interfaces in the
backlight driver, but it may lead to some issues and the unregister
function has been removed since v6.1-rc1
77ab9d4d44cd ("ACPI: video: Remove acpi_video_set_dmi_backlight_type()")

[Fix]
The new way to do this is to collect all the quirk and auto detection
method in video_detect.c
I added an auto detection for the Dell AIO platoform to the driver which
should do the same thing as the old way.

[Test]
Verified on the Dell AIO platform and confirmed there is only on
dell_uart_backlight in the sysfs, and no acpi_video* interface.

[Where problems could occur]
There should be no regression potential, it uses different way to do the
same thing, should be pretty safe.

[Other Info]
dell-uart-backlight is still a Ubuntu only driver, so submit the patch
as UBUNTU: SAUCE: patch.

Chia-Lin Kao (AceLan) (1):
  UBUNTU: SAUCE: ACPI: video: Dell AIO UART backlight detection

 drivers/acpi/video_detect.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Andrea Righi Sept. 13, 2023, 12:10 p.m. UTC | #1
On Wed, Sep 13, 2023 at 06:03:12PM +0800, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/2008882
> 
> [Impact]
> There are acpi_video* sysfs backlight interface in the system which are
> not working.
> For Dell AIO platforms, we use dell_uart_backlight to control the display
> brightness.
> The old way to fix this is to unregister acpi backlight interfaces in the
> backlight driver, but it may lead to some issues and the unregister
> function has been removed since v6.1-rc1
> 77ab9d4d44cd ("ACPI: video: Remove acpi_video_set_dmi_backlight_type()")
> 
> [Fix]
> The new way to do this is to collect all the quirk and auto detection
> method in video_detect.c
> I added an auto detection for the Dell AIO platoform to the driver which
> should do the same thing as the old way.
> 
> [Test]
> Verified on the Dell AIO platform and confirmed there is only on
> dell_uart_backlight in the sysfs, and no acpi_video* interface.
> 
> [Where problems could occur]
> There should be no regression potential, it uses different way to do the
> same thing, should be pretty safe.
> 
> [Other Info]
> dell-uart-backlight is still a Ubuntu only driver, so submit the patch
> as UBUNTU: SAUCE: patch.

Applied to mantic/linux.

It looks like this patch could be applied upstream as well. Is there any
plan to upstream this?

Thanks,
-Andrea
AceLan Kao Sept. 14, 2023, 1:35 a.m. UTC | #2
Andrea Righi <andrea.righi@canonical.com> 於 2023年9月13日 週三 下午8:10寫道:
>
> On Wed, Sep 13, 2023 at 06:03:12PM +0800, AceLan Kao wrote:
> > From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
> >
> > BugLink: https://bugs.launchpad.net/bugs/2008882
> >
> > [Impact]
> > There are acpi_video* sysfs backlight interface in the system which are
> > not working.
> > For Dell AIO platforms, we use dell_uart_backlight to control the display
> > brightness.
> > The old way to fix this is to unregister acpi backlight interfaces in the
> > backlight driver, but it may lead to some issues and the unregister
> > function has been removed since v6.1-rc1
> > 77ab9d4d44cd ("ACPI: video: Remove acpi_video_set_dmi_backlight_type()")
> >
> > [Fix]
> > The new way to do this is to collect all the quirk and auto detection
> > method in video_detect.c
> > I added an auto detection for the Dell AIO platoform to the driver which
> > should do the same thing as the old way.
> >
> > [Test]
> > Verified on the Dell AIO platform and confirmed there is only on
> > dell_uart_backlight in the sysfs, and no acpi_video* interface.
> >
> > [Where problems could occur]
> > There should be no regression potential, it uses different way to do the
> > same thing, should be pretty safe.
> >
> > [Other Info]
> > dell-uart-backlight is still a Ubuntu only driver, so submit the patch
> > as UBUNTU: SAUCE: patch.
>
> Applied to mantic/linux.
>
> It looks like this patch could be applied upstream as well. Is there any
> plan to upstream this?
>
Upstream ask us to rewrite dell-uart-backlight to use serdev,
but serdev still has some issues with the ACPI table, the driver won't probe.
I'll keep an eye on the status of the serdev and upstream the driver
when it works.