Skip to contentSkip to conversation

ACPI video: ignore BIOS initial backlight value for HP 1000

PATCH In review Alex Hung 5 participants 13 messages May 6, 2013 – Nov 16, 2013 ACPI

lore
Share & tools
lore

Alex Hung

author
#0 lore raw

PATCH 1/1 ACPI video: ignore BIOS initial backlight value for HP 1000

On HP 1000 lapops, BIOS reports minimum backlight on boot and causes backlight to dim completely. This ignores the initial backlight values and set to max brightness.

---
 drivers/acpi/video.c |    8 ++++++++
 1 file changed, 8 insertions(+)
drivers/acpi/video.c +8 -0
index c3932d0..5b32e15 100644
@@ -456,6 +456,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dm4 Notebook PC"),
 		},
 	},
+	{
+	 .callback = video_ignore_initial_backlight,
+	 .ident = "HP 1000 Notebook PC",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "HP 1000 Notebook PC"),
+		},
+	},
 	{}
 };
 
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 7 lines · Alex Hung

On HP 1000 lapops, BIOS reports minimum backlight on boot and causes backlight to dim completely. This ignores the initial backlight values and set to max brightness.

Queued up for a post-3.10-rc1 push as 3.10 material.

Thanks,
Rafael

Quoted 24 lines
---
 drivers/acpi/video.c |    8 ++++++++
 1 file changed, 8 insertions(+)
drivers/acpi/video.c +8 -0
index c3932d0..5b32e15 100644
@@ -456,6 +456,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dm4 Notebook PC"),
 		},
 	},
+	{
+	 .callback = video_ignore_initial_backlight,
+	 .ident = "HP 1000 Notebook PC",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "HP 1000 Notebook PC"),
+		},
+	},
 	{}
 };
 
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
#2 lore raw
In reply to Alex Hung
Quoted 5 lines · Alex Hung

On HP 1000 lapops, BIOS reports minimum backlight on boot and causes backlight to dim completely. This ignores the initial backlight values and set to max brightness.

I've checked the acpi dump from the bug page, it should be the same firmware problem which the following patch is meant to solve:
http://www.spinics.net/lists/linux-acpi/msg47212.html

commit 2c62333a408f5badd2d2ffd7177f95deeccc5ca4

Author: Aaron Lu <[email protected]>
Date:   Wed Nov 6 09:07:10 2013 +0800

ACPI / video: Quirk initial backlight level 0

Possible to give it a test? It's in Rafael's linux-next branch:
http://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git

If confirmed, we can save an entry in the DMI table.

Thanks,
Aaron

Quoted 26 lines
---
 drivers/acpi/video.c |    8 ++++++++
 1 file changed, 8 insertions(+)
drivers/acpi/video.c +8 -0
index c3932d0..5b32e15 100644
@@ -456,6 +456,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dm4 Notebook PC"),
 		},
 	},
+	{
+	 .callback = video_ignore_initial_backlight,
+	 .ident = "HP 1000 Notebook PC",
+	 .matches = {
+		DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+		DMI_MATCH([email protected]_PRODUCT_NAME, "HP 1000 Notebook PC"),
+		},
+	},
 	{}
 };
 
author
#3 lore raw

Hi,

It works as expected.

Quoted 52 lines · Aaron Lu
Quoted 5 lines · Alex Hung

On HP 1000 lapops, BIOS reports minimum backlight on boot and causes backlight to dim completely. This ignores the initial backlight values and set to max brightness.

I've checked the acpi dump from the bug page, it should be the same firmware problem which the following patch is meant to solve:
http://www.spinics.net/lists/linux-acpi/msg47212.html

commit 2c62333a408f5badd2d2ffd7177f95deeccc5ca4

Author: Aaron Lu <[email protected]>
Date:   Wed Nov 6 09:07:10 2013 +0800

ACPI / video: Quirk initial backlight level 0

Possible to give it a test? It's in Rafael's linux-next branch:
http://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git

If confirmed, we can save an entry in the DMI table.

Thanks,
Aaron

Quoted 26 lines
---
 drivers/acpi/video.c |    8 ++++++++
 1 file changed, 8 insertions(+)
drivers/acpi/video.c +8 -0
index c3932d0..5b32e15 100644
@@ -456,6 +456,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
              DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dm4 Notebook PC"),
              },
      },
+     {
+      .callback = video_ignore_initial_backlight,
+      .ident = "HP 1000 Notebook PC",
+      .matches = {
+             DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+             DMI_MATCH([email protected]_PRODUCT_NAME, "HP 1000 Notebook PC"),
+             },
+     },
      {}
 };
 
Signature · 2 lines
Cheers,
Alex Hung
#4 lore raw

More initial black screen system for removal from DMI table

Quoted 3 lines · Alex Hung

Hi,

It works as expected.

Thanks for the confirm!

Now I look at the DMI table for initial backlight broken systems, in addition to the "HP Pavilion m4" and "HP 1000 Notebook PC", the following systems are also candidates for removal:
HP Pavilion g6 Notebook PC - bug 56661
HP Pavilion dm4 - no bug entry
Fujitsu E753 - bug 60161
HP Folio 13-2000 - bug 51141

I've checked the acpidump of all the above laptops except HP dm4, which doesn't have a bug page, they all have the same problem we are talking about here. The HP dm4 is very suspicious according to its corresponding commit message and its brand.

I've asked in the individual bug page for test, once confirmed, I'll remove them all.

Hi Gustavo,
Can you please test this? I've prepared a branch for you:
https://github.com/aaronlu/linux acpi_video_dmi
It is based on Rafael's linux-next branch, with only one patch on top: remove all the above systems from the DMI table.

Thanks,
Aaron

Quoted 59 lines · Aaron Lu
Quoted 52 lines · Alex Hung
Quoted 5 lines

On HP 1000 lapops, BIOS reports minimum backlight on boot and causes backlight to dim completely. This ignores the initial backlight values and set to max brightness.

I've checked the acpi dump from the bug page, it should be the same firmware problem which the following patch is meant to solve:
http://www.spinics.net/lists/linux-acpi/msg47212.html

commit 2c62333a408f5badd2d2ffd7177f95deeccc5ca4

Author: Aaron Lu <[email protected]>
Date:   Wed Nov 6 09:07:10 2013 +0800

ACPI / video: Quirk initial backlight level 0

Possible to give it a test? It's in Rafael's linux-next branch:
http://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git

If confirmed, we can save an entry in the DMI table.

Thanks,
Aaron

Quoted 26 lines
---
 drivers/acpi/video.c |    8 ++++++++
 1 file changed, 8 insertions(+)
drivers/acpi/video.c +8 -0
index c3932d0..5b32e15 100644
@@ -456,6 +456,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
              DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dm4 Notebook PC"),
              },
      },
+     {
+      .callback = video_ignore_initial_backlight,
+      .ident = "HP 1000 Notebook PC",
+      .matches = {
+             DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+             DMI_MATCH([email protected]_PRODUCT_NAME, "HP 1000 Notebook PC"),
+             },
+     },
      {}
 };
 
#5 lore raw

Re: More initial black screen system for removal from DMI table

Em Qua, 2013-11-13 às 10:07 +0800, Aaron Lu escreveu:

Quoted 5 lines

Hi Gustavo,
Can you please test this? I've prepared a branch for you:
https://github.com/aaronlu/linux acpi_video_dmi
It is based on Rafael's linux-next branch, with only one patch on top: remove all the above systems from the DMI table.

Aaron, thanks for setting the branch up. However, I will only be able to test it over the weekend.

For completeness my instance of the bug was (wrongly) tracked here:
https://bugs.freedesktop.org/show_bug.cgi?id=43577

Abraços,
Gustavo

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw

Re: More initial black screen system for removal from DMI table

Quoted 9 lines · Gustavo Maciel Dias Vieira

Em Qua, 2013-11-13 às 10:07 +0800, Aaron Lu escreveu:

Quoted 5 lines

Hi Gustavo,
Can you please test this? I've prepared a branch for you:
https://github.com/aaronlu/linux acpi_video_dmi
It is based on Rafael's linux-next branch, with only one patch on top: remove all the above systems from the DMI table.

Aaron, thanks for setting the branch up. However, I will only be able to test it over the weekend.

No problem :-)

Quoted 3 lines

For completeness my instance of the bug was (wrongly) tracked here:
https://bugs.freedesktop.org/show_bug.cgi?id=43577

Thanks for the info. Unfortunately, there isn't acpidump either. Please attach the dump there when you have time, thanks.

As root:

# acpidump > acpidump.txt

-Aaron
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw

Re: More initial black screen system for removal from DMI table

Em Sex, 2013-11-15 às 08:42 +0800, Aaron Lu escreveu:

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Can you please test this? I've prepared a branch for you:
https://github.com/aaronlu/linux acpi_video_dmi
It is based on Rafael's linux-next branch, with only one patch on top: remove all the above systems from the DMI table.

Tested and it works perfectly, no brightness regressions observed.

Quoted 6 lines
Quoted 3 lines

For completeness my instance of the bug was (wrongly) tracked here:
https://bugs.freedesktop.org/show_bug.cgi?id=43577

Thanks for the info. Unfortunately, there isn't acpidump either. Please attach the dump there when you have time, thanks.

Done

Abraços,
Gustavo

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw

Re: More initial black screen system for removal from DMI table

Quoted 7 lines · Gustavo Maciel Dias Vieira

Em Sex, 2013-11-15 às 08:42 +0800, Aaron Lu escreveu:

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Can you please test this? I've prepared a branch for you:
https://github.com/aaronlu/linux acpi_video_dmi
It is based on Rafael's linux-next branch, with only one patch on top: remove all the above systems from the DMI table.

Tested and it works perfectly, no brightness regressions observed.

Thanks a lot for the test and info, I'll add your tested-by tag for that patch if you don't mind.

-Aaron

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

For completeness my instance of the bug was (wrongly) tracked here:
https://bugs.freedesktop.org/show_bug.cgi?id=43577

Quoted 8 lines
Quoted 2 lines

Thanks for the info. Unfortunately, there isn't acpidump either. Please attach the dump there when you have time, thanks.

Done

Abraços,
Gustavo

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw

Re: More initial black screen system for removal from DMI table

Em Sex, 2013-11-15 às 09:31 +0800, Aaron Lu escreveu:

Quoted 10 lines
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Can you please test this? I've prepared a branch for you:
https://github.com/aaronlu/linux acpi_video_dmi
It is based on Rafael's linux-next branch, with only one patch on top: remove all the above systems from the DMI table.

Tested and it works perfectly, no brightness regressions observed.

Thanks a lot for the test and info, I'll add your tested-by tag for that
patch if you don't mind.

Not at all, go ahead.

Abraços,
Gustavo

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#10 lore raw

PATCH 1/1 ACPI / video: clean up DMI table for initial black screen problem

With commit 2c62333a408f "ACPI / video: Quirk initial backlight level 0" we do not need to have the following systems in DMI table, so remove them. HP Pavilion m4, HP 1000 Notebook PC, HP Pavilion g6 Notebook PC, HP Pavilion dm4, Fujitsu E753, HP Folio 13-2000.

---
Though I don't have test done for other models, their ACPI tables suggest they have the same problem that should already be quirked by commit 2c62333a408f "ACPI / video: Quirk initial backlight level 0".

 drivers/acpi/video.c | 48 ------------------------------------------------
 1 file changed, 48 deletions(-)
drivers/acpi/video.c +0 -48
index 18dbdff4656e..4ccb89e5c4ad 100644
@@ -456,54 +456,6 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720"),
 		},
 	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "HP Folio 13-2000",
-	 .matches = {
-		DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13 - 2000 Notebook PC"),
-		},
-	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "Fujitsu E753",
-	 .matches = {
-		DMI_MATCH(DMI_BOARD_VENDOR, "FUJITSU"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E753"),
-		},
-	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "HP Pavilion dm4",
-	 .matches = {
-		DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dm4 Notebook PC"),
-		},
-	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "HP Pavilion g6 Notebook PC",
-	 .matches = {
-		 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
-		 DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion g6 Notebook PC"),
-		},
-	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "HP 1000 Notebook PC",
-	 .matches = {
-		DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "HP 1000 Notebook PC"),
-		},
-	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "HP Pavilion m4",
-	 .matches = {
-		DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion m4 Notebook PC"),
-		},
-	},
 	{}
 };
 
Signature · 1 line
1.8.3.1
#11 lore raw

PATCH v2 1/1 ACPI / video: clean up DMI table for initial black screen problem

With commit 2c62333a408f "ACPI / video: Quirk initial backlight level 0" we do not need to have the following systems in DMI table, so remove them. HP Pavilion m4, HP 1000 Notebook PC, HP Pavilion g6 Notebook PC, HP Pavilion dm4, Fujitsu E753, HP Folio 13-2000.

With this change, the use_bios_initial_backlight module parameter is no longer needed and thus removed.

---
v2:
Remove use_bios_initial_backlight parameter and related code.

 drivers/acpi/video.c | 87 ++++++++--------------------------------------------
 1 file changed, 12 insertions(+), 75 deletions(-)
drivers/acpi/video.c +12 -75
index 18dbdff4656e..995e91bcb97b 100644
@@ -82,13 +82,6 @@ static bool allow_duplicates;
 module_param(allow_duplicates, bool, 0644);
 
 /*
- * Some BIOSes claim they use minimum backlight at boot,
- * and this may bring dimming screen after boot
- */
-static bool use_bios_initial_backlight = 1;
-module_param(use_bios_initial_backlight, bool, 0644);
-
-/*
  * For Windows 8 systems: if set ture and the GPU driver has
  * registered a backlight interface, skip registering ACPI video's.
  */
@@ -406,12 +399,6 @@ static int __init video_set_bqc_offset(const struct dmi_system_id *d)
 	return 0;
 }
 
-static int video_ignore_initial_backlight(const struct dmi_system_id *d)
-{
-	use_bios_initial_backlight = 0;
-	return 0;
-}
-
 static struct dmi_system_id video_dmi_table[] __initdata = {
 	/*
 	 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
@@ -456,54 +443,6 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720"),
 		},
 	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "HP Folio 13-2000",
-	 .matches = {
-		DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13 - 2000 Notebook PC"),
-		},
-	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "Fujitsu E753",
-	 .matches = {
-		DMI_MATCH(DMI_BOARD_VENDOR, "FUJITSU"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E753"),
-		},
-	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "HP Pavilion dm4",
-	 .matches = {
-		DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dm4 Notebook PC"),
-		},
-	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "HP Pavilion g6 Notebook PC",
-	 .matches = {
-		 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
-		 DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion g6 Notebook PC"),
-		},
-	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "HP 1000 Notebook PC",
-	 .matches = {
-		DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "HP 1000 Notebook PC"),
-		},
-	},
-	{
-	 .callback = video_ignore_initial_backlight,
-	 .ident = "HP Pavilion m4",
-	 .matches = {
-		DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion m4 Notebook PC"),
-		},
-	},
 	{}
 };
 
@@ -839,20 +778,18 @@ acpi_video_init_brightness(struct acpi_video_device *device)
 	if (!device->cap._BQC)
 		goto set_level;
 
-	if (use_bios_initial_backlight) {
-		level = acpi_video_bqc_value_to_level(device, level_old);
-		/*
-		 * On some buggy laptops, _BQC returns an uninitialized
-		 * value when invoked for the first time, i.e.
-		 * level_old is invalid (no matter whether it's a level
-		 * or an index). Set the backlight to max_level in this case.
-		 */
-		for (i = 2; i < br->count; i++)
-			if (level == br->levels[i])
-				break;
-		if (i == br->count || !level)
-			level = max_level;
-	}
+	level = acpi_video_bqc_value_to_level(device, level_old);
+	/*
+	 * On some buggy laptops, _BQC returns an uninitialized
+	 * value when invoked for the first time, i.e.
+	 * level_old is invalid (no matter whether it's a level
+	 * or an index). Set the backlight to max_level in this case.
+	 */
+	for (i = 2; i < br->count; i++)
+		if (level == br->levels[i])
+			break;
+	if (i == br->count || !level)
+		level = max_level;
 
 set_level:
 	result = acpi_video_device_lcd_set_level(device, level);
Signature · 1 line
1.8.3.1
#12 lore raw

Re: [PATCH v2] ACPI / video: clean up DMI table for initial black screen problem

Quoted 11 lines · Aaron Lu

With commit 2c62333a408f "ACPI / video: Quirk initial backlight level 0" we do not need to have the following systems in DMI table, so remove them. HP Pavilion m4, HP 1000 Notebook PC, HP Pavilion g6 Notebook PC, HP Pavilion dm4, Fujitsu E753, HP Folio 13-2000.

With this change, the use_bios_initial_backlight module parameter is no longer needed and thus removed.

Queued up for the next ACPI pull request, thanks!

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.