All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates
@ 2022-11-14 14:44 Hans de Goede
  2022-11-14 14:44 ` [PATCH 1/7] ACPI: video: Add a few bugtracker links to DMI quirks Hans de Goede
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Hans de Goede @ 2022-11-14 14:44 UTC (permalink / raw)
  To: Rafael J . Wysocki; +Cc: Hans de Goede, Len Brown, Matthew Garrett, linux-acpi

Hi Rafael, et. al.,

As mentioned already in the RFC:

"""
Here is a second attempt at always registering only a single
/sys/class/backlight device per panel.

This first round of testing has shown that native works well even on
systems so old that the don't have acpi_video backlight control support.

This patch series makes native be preferred over vendor, which should
avoid the problems seen with the 6.1 changes before the fixes.
"""

The 2 base patches (last 2 patches of the series now) are unchanged from
the RFC. New is a bunch of video_detect DMI quirk updates, 3 small fixes to
existing quirks + 2 new quirks. 1 of the new quirks is necessary to avoid
a known regression with preferring native over vendor on 1 model,
the other DMI quirk is unrelated to the other changes.

This series applies on top of the platform-drivers-x86-v6.1-3 tag from:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/

So either you will need to merge that tag (or merge v6.1-rc5 from Linus)
before applying these patches, or I can merge this through my for-next
branch which already has these changes. Either way works for me.

Regards,

Hans


Hans de Goede (7):
  ACPI: video: Add a few bugtracker links to DMI quirks
  ACPI: video: Change GIGABYTE GB-BXBT-2807 quirk to force_none
  ACPI: video: Change Sony Vaio VPCEH3U1E quirk to force_native
  ACPI: video: Add force_vendor quirk for Sony Vaio PCG-FRV35
  ACPI: video: Add force_native quirk for Sony Vaio VPCY11S1E
  ACPI: video: Simplify __acpi_video_get_backlight_type()
  ACPI: video: Prefer native over vendor

 drivers/acpi/video_detect.c | 110 ++++++++++++++++++++----------------
 1 file changed, 62 insertions(+), 48 deletions(-)

-- 
2.37.3


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

* [PATCH 1/7] ACPI: video: Add a few bugtracker links to DMI quirks
  2022-11-14 14:44 [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Hans de Goede
@ 2022-11-14 14:44 ` Hans de Goede
  2022-11-14 14:44 ` [PATCH 2/7] ACPI: video: Change GIGABYTE GB-BXBT-2807 quirk to force_none Hans de Goede
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2022-11-14 14:44 UTC (permalink / raw)
  To: Rafael J . Wysocki; +Cc: Hans de Goede, Len Brown, Matthew Garrett, linux-acpi

Add a couple of missing bugtracker links to DMI quirks

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/video_detect.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index b2a616287638..bb8052fc3fee 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -166,6 +166,7 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		},
 	},
 	{
+	 /* https://bugs.launchpad.net/bugs/1000146 */
 	 .callback = video_detect_force_vendor,
 	 /* Asus X101CH */
 	 .matches = {
@@ -190,6 +191,7 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		},
 	},
 	{
+	 /* https://bugs.launchpad.net/bugs/1000146 */
 	 .callback = video_detect_force_vendor,
 	 /* Asus 1015CX */
 	 .matches = {
@@ -233,6 +235,7 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		},
 	},
 	{
+	 /* https://bugzilla.kernel.org/show_bug.cgi?id=202401 */
 	 .callback = video_detect_force_vendor,
 	 /* Sony VPCEH3U1E */
 	 .matches = {
@@ -400,8 +403,8 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "530U4E/540U4E"),
 		},
 	},
-	/* https://bugs.launchpad.net/bugs/1894667 */
 	{
+	 /* https://bugs.launchpad.net/bugs/1894667 */
 	 .callback = video_detect_force_video,
 	 /* HP 635 Notebook */
 	 .matches = {
-- 
2.37.3


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

* [PATCH 2/7] ACPI: video: Change GIGABYTE GB-BXBT-2807 quirk to force_none
  2022-11-14 14:44 [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Hans de Goede
  2022-11-14 14:44 ` [PATCH 1/7] ACPI: video: Add a few bugtracker links to DMI quirks Hans de Goede
@ 2022-11-14 14:44 ` Hans de Goede
  2022-11-14 14:44 ` [PATCH 3/7] ACPI: video: Change Sony Vaio VPCEH3U1E quirk to force_native Hans de Goede
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2022-11-14 14:44 UTC (permalink / raw)
  To: Rafael J . Wysocki
  Cc: Hans de Goede, Len Brown, Matthew Garrett, linux-acpi,
	Jasper St . Pierre

The GIGABYTE GB-BXBT-2807 DMI quirk was added by
commit 25417185e9b5 ("ACPI: video: Add DMI quirk for GIGABYTE
GB-BXBT-2807") which says the following in its commit message:

"The GIGABYTE GB-BXBT-2807 is a mini-PC which uses off the shelf
components, like an Intel GPU which is meant for mobile systems.
As such, it, by default, has a backlight controller exposed.

Unfortunately, the backlight controller only confuses userspace, which
sees the existence of a backlight device node and has the unrealistic
belief that there is actually a backlight there!

Add a DMI quirk to force the backlight off on this system."

So in essence this quirk was using a video_detect_force_vendor quirk
to disable backlight control. Now a days we have a specific "none"
backlight type for this. Change the quirk to video_detect_force_none
and group it together with the other force_none quirks.

Cc: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/video_detect.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index bb8052fc3fee..a1ac7de186be 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -199,14 +199,6 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "1015CX"),
 		},
 	},
-	{
-	 .callback = video_detect_force_vendor,
-	 /* GIGABYTE GB-BXBT-2807 */
-	 .matches = {
-		DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "GB-BXBT-2807"),
-		},
-	},
 	{
 	 .callback = video_detect_force_vendor,
 	 /* Samsung N150/N210/N220 */
@@ -674,6 +666,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 9020M"),
 		},
 	},
+	{
+	 .callback = video_detect_force_none,
+	 /* GIGABYTE GB-BXBT-2807 */
+	 .matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "GB-BXBT-2807"),
+		},
+	},
 	{
 	 .callback = video_detect_force_none,
 	 /* MSI MS-7721 */
-- 
2.37.3


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

* [PATCH 3/7] ACPI: video: Change Sony Vaio VPCEH3U1E quirk to force_native
  2022-11-14 14:44 [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Hans de Goede
  2022-11-14 14:44 ` [PATCH 1/7] ACPI: video: Add a few bugtracker links to DMI quirks Hans de Goede
  2022-11-14 14:44 ` [PATCH 2/7] ACPI: video: Change GIGABYTE GB-BXBT-2807 quirk to force_none Hans de Goede
@ 2022-11-14 14:44 ` Hans de Goede
  2022-11-14 14:44 ` [PATCH 4/7] ACPI: video: Add force_vendor quirk for Sony Vaio PCG-FRV35 Hans de Goede
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2022-11-14 14:44 UTC (permalink / raw)
  To: Rafael J . Wysocki; +Cc: Hans de Goede, Len Brown, Matthew Garrett, linux-acpi

According to: https://bugzilla.kernel.org/show_bug.cgi?id=202401
the Sony Vaio VPCEH3U1E quirk was added to disable the acpi_video0
backlight interface because that was not working, so that userspace
will pick the actually working native nv_backlight interface instead.

With the new kernel behavior of hiding native interfaces unless
acpi_video_get_backlight_type() returns native, the current
video_detect_force_vendor quirk will cause the working nv_backlight
interface will be disabled too.

Change the quirk to video_detect_force_native to get the desired
result of only registering the nv_backlight interface.

After this all currently remaining force_vendor quirks in
video_detect_dmi_table[] are there to prefer a vendor interface over
a non working ACPI video interface, add a comment to document this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/video_detect.c | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index a1ac7de186be..327e0967ba54 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -132,6 +132,10 @@ static int video_detect_force_none(const struct dmi_system_id *d)
 }
 
 static const struct dmi_system_id video_detect_dmi_table[] = {
+	/*
+	 * Models which should use the vendor backlight interface,
+	 * because of broken ACPI video backlight control.
+	 */
 	{
 	 /* https://bugzilla.redhat.com/show_bug.cgi?id=1128309 */
 	 .callback = video_detect_force_vendor,
@@ -226,15 +230,6 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		DMI_MATCH(DMI_BOARD_NAME, "NC210/NC110"),
 		},
 	},
-	{
-	 /* https://bugzilla.kernel.org/show_bug.cgi?id=202401 */
-	 .callback = video_detect_force_vendor,
-	 /* Sony VPCEH3U1E */
-	 .matches = {
-		DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-		DMI_MATCH(DMI_PRODUCT_NAME, "VPCEH3U1E"),
-		},
-	},
 	{
 	 .callback = video_detect_force_vendor,
 	 /* Xiaomi Mi Pad 2 */
@@ -604,6 +599,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		DMI_MATCH(DMI_BOARD_NAME, "N250P"),
 		},
 	},
+	{
+	 /* https://bugzilla.kernel.org/show_bug.cgi?id=202401 */
+	 .callback = video_detect_force_native,
+	 /* Sony Vaio VPCEH3U1E */
+	 .matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "VPCEH3U1E"),
+		},
+	},
 
 	/*
 	 * These Toshibas have a broken acpi-video interface for brightness
-- 
2.37.3


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

* [PATCH 4/7] ACPI: video: Add force_vendor quirk for Sony Vaio PCG-FRV35
  2022-11-14 14:44 [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Hans de Goede
                   ` (2 preceding siblings ...)
  2022-11-14 14:44 ` [PATCH 3/7] ACPI: video: Change Sony Vaio VPCEH3U1E quirk to force_native Hans de Goede
@ 2022-11-14 14:44 ` Hans de Goede
  2022-11-14 14:44 ` [PATCH 5/7] ACPI: video: Add force_native quirk for Sony Vaio VPCY11S1E Hans de Goede
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2022-11-14 14:44 UTC (permalink / raw)
  To: Rafael J . Wysocki; +Cc: Hans de Goede, Len Brown, Matthew Garrett, linux-acpi

The Sony Vaio PCG-FRV35 advertises both native and vendor backlight
control interfaces. With the upcoming changes to prefer native over
vendor acpi_video_get_backlight_type() will start returning native on
these laptops.

But the native radeon_bl0 interface does not work, where as the sony
vendor interface does work. Add a quirk to force use of the vendor
interface.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/video_detect.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 327e0967ba54..43f667523ab0 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -239,6 +239,19 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		},
 	},
 
+	/*
+	 * Models which should use the vendor backlight interface,
+	 * because of broken native backlight control.
+	 */
+	{
+	 .callback = video_detect_force_vendor,
+	 /* Sony Vaio PCG-FRV35 */
+	 .matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "PCG-FRV35"),
+		},
+	},
+
 	/*
 	 * Toshiba models with Transflective display, these need to use
 	 * the toshiba_acpi vendor driver for proper Transflective handling.
-- 
2.37.3


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

* [PATCH 5/7] ACPI: video: Add force_native quirk for Sony Vaio VPCY11S1E
  2022-11-14 14:44 [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Hans de Goede
                   ` (3 preceding siblings ...)
  2022-11-14 14:44 ` [PATCH 4/7] ACPI: video: Add force_vendor quirk for Sony Vaio PCG-FRV35 Hans de Goede
@ 2022-11-14 14:44 ` Hans de Goede
  2022-11-14 14:44 ` [PATCH 6/7] ACPI: video: Simplify __acpi_video_get_backlight_type() Hans de Goede
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2022-11-14 14:44 UTC (permalink / raw)
  To: Rafael J . Wysocki
  Cc: Hans de Goede, Len Brown, Matthew Garrett, linux-acpi, Stefan Joosten

The Sony Vaio VPCY11S1E advertises both native and ACPI video backlight
control interfaces, but only the native interface works and the default
heuristics end up picking ACPI video on this model.

Add a video_detect_force_native DMI quirk for this.

Reported-by: Stefan Joosten <stefan@atcomputing.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/video_detect.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 43f667523ab0..0e217bf79f17 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -621,6 +621,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "VPCEH3U1E"),
 		},
 	},
+	{
+	 .callback = video_detect_force_native,
+	 /* Sony Vaio VPCY11S1E */
+	 .matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "VPCY11S1E"),
+		},
+	},
 
 	/*
 	 * These Toshibas have a broken acpi-video interface for brightness
-- 
2.37.3


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

* [PATCH 6/7] ACPI: video: Simplify __acpi_video_get_backlight_type()
  2022-11-14 14:44 [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Hans de Goede
                   ` (4 preceding siblings ...)
  2022-11-14 14:44 ` [PATCH 5/7] ACPI: video: Add force_native quirk for Sony Vaio VPCY11S1E Hans de Goede
@ 2022-11-14 14:44 ` Hans de Goede
  2022-11-14 14:44 ` [PATCH 7/7] ACPI: video: Prefer native over vendor Hans de Goede
  2022-11-14 15:27 ` [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Rafael J. Wysocki
  7 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2022-11-14 14:44 UTC (permalink / raw)
  To: Rafael J . Wysocki; +Cc: Hans de Goede, Len Brown, Matthew Garrett, linux-acpi

Simplify __acpi_video_get_backlight_type() removing a nested if which
makes the flow harder to follow.

This also results in having only 1 exit point with
return acpi_backlight_native instead of 2.

Note this drops the (video_caps & ACPI_VIDEO_BACKLIGHT) check from
the if (acpi_osi_is_win8() && native_available) return native path.
Windows 8's hardware certification requirements include that there must
be ACPI video bus backlight control, so the ACPI_VIDEO_BACKLIGHT check
is redundant.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/video_detect.c | 36 +++++++++++++++++-------------------
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 0e217bf79f17..5da6b1b449d5 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -715,6 +715,16 @@ static bool google_cros_ec_present(void)
 	return acpi_dev_found("GOOG0004") || acpi_dev_found("GOOG000C");
 }
 
+/*
+ * Windows 8 and newer no longer use the ACPI video interface, so it often
+ * does not work. So on win8+ systems prefer native brightness control.
+ * Chromebooks should always prefer native backlight control.
+ */
+static bool prefer_native_over_acpi_video(void)
+{
+	return acpi_osi_is_win8() || google_cros_ec_present();
+}
+
 /*
  * Determine which type of backlight interface to use on this system,
  * First check cmdline, then dmi quirks, then do autodetect.
@@ -760,26 +770,14 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
 	if (apple_gmux_present())
 		return acpi_backlight_apple_gmux;
 
-	/* Chromebooks should always prefer native backlight control. */
-	if (google_cros_ec_present() && native_available)
-		return acpi_backlight_native;
+	/* Use ACPI video if available, except when native should be preferred. */
+	if ((video_caps & ACPI_VIDEO_BACKLIGHT) &&
+	     !(native_available && prefer_native_over_acpi_video()))
+		return acpi_backlight_video;
 
-	/* On systems with ACPI video use either native or ACPI video. */
-	if (video_caps & ACPI_VIDEO_BACKLIGHT) {
-		/*
-		 * Windows 8 and newer no longer use the ACPI video interface,
-		 * so it often does not work. If the ACPI tables are written
-		 * for win8 and native brightness ctl is available, use that.
-		 *
-		 * The native check deliberately is inside the if acpi-video
-		 * block on older devices without acpi-video support native
-		 * is usually not the best choice.
-		 */
-		if (acpi_osi_is_win8() && native_available)
-			return acpi_backlight_native;
-		else
-			return acpi_backlight_video;
-	}
+	/* Use native if available */
+	if (native_available && prefer_native_over_acpi_video())
+		return acpi_backlight_native;
 
 	/* No ACPI video (old hw), use vendor specific fw methods. */
 	return acpi_backlight_vendor;
-- 
2.37.3


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

* [PATCH 7/7] ACPI: video: Prefer native over vendor
  2022-11-14 14:44 [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Hans de Goede
                   ` (5 preceding siblings ...)
  2022-11-14 14:44 ` [PATCH 6/7] ACPI: video: Simplify __acpi_video_get_backlight_type() Hans de Goede
@ 2022-11-14 14:44 ` Hans de Goede
  2022-11-14 15:27 ` [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Rafael J. Wysocki
  7 siblings, 0 replies; 11+ messages in thread
From: Hans de Goede @ 2022-11-14 14:44 UTC (permalink / raw)
  To: Rafael J . Wysocki; +Cc: Hans de Goede, Len Brown, Matthew Garrett, linux-acpi

When available prefer native backlight control over vendor backlight
control.

Testing has shown that there are quite a few laptop models which rely
on native backlight control (they don't have ACPI video bus backlight
control) and on which acpi_osi_is_win8() returns false.

Currently __acpi_video_get_backlight_type() returns vendor on these
laptops, leading to an empty /sys/class/backlight.

As a workaround for this acpi_video_backlight_use_native() has been
temporarily changed to always return true.

This re-introduces the problem of having multiple backlight
devices under /sys/class/backlight for a single panel.

Change __acpi_video_get_backlight_type() to prefer native over vendor
when available. So that it returns native on these models.

And change acpi_video_backlight_use_native() back to only return
true when __acpi_video_get_backlight_type() returns native.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/video_detect.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 5da6b1b449d5..a934bbc9dd37 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -776,10 +776,10 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
 		return acpi_backlight_video;
 
 	/* Use native if available */
-	if (native_available && prefer_native_over_acpi_video())
+	if (native_available)
 		return acpi_backlight_native;
 
-	/* No ACPI video (old hw), use vendor specific fw methods. */
+	/* No ACPI video/native (old hw), use vendor specific fw methods. */
 	return acpi_backlight_vendor;
 }
 
@@ -791,18 +791,6 @@ EXPORT_SYMBOL(acpi_video_get_backlight_type);
 
 bool acpi_video_backlight_use_native(void)
 {
-	/*
-	 * Call __acpi_video_get_backlight_type() to let it know that
-	 * a native backlight is available.
-	 */
-	__acpi_video_get_backlight_type(true);
-
-	/*
-	 * For now just always return true. There is a whole bunch of laptop
-	 * models where (video_caps & ACPI_VIDEO_BACKLIGHT) is false causing
-	 * __acpi_video_get_backlight_type() to return vendor, while these
-	 * models only have a native backlight control.
-	 */
-	return true;
+	return __acpi_video_get_backlight_type(true) == acpi_backlight_native;
 }
 EXPORT_SYMBOL(acpi_video_backlight_use_native);
-- 
2.37.3


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

* Re: [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates
  2022-11-14 14:44 [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Hans de Goede
                   ` (6 preceding siblings ...)
  2022-11-14 14:44 ` [PATCH 7/7] ACPI: video: Prefer native over vendor Hans de Goede
@ 2022-11-14 15:27 ` Rafael J. Wysocki
  2022-11-14 16:11   ` Hans de Goede
  7 siblings, 1 reply; 11+ messages in thread
From: Rafael J. Wysocki @ 2022-11-14 15:27 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Rafael J . Wysocki, Len Brown, Matthew Garrett, linux-acpi

On Mon, Nov 14, 2022 at 3:45 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi Rafael, et. al.,
>
> As mentioned already in the RFC:
>
> """
> Here is a second attempt at always registering only a single
> /sys/class/backlight device per panel.
>
> This first round of testing has shown that native works well even on
> systems so old that the don't have acpi_video backlight control support.
>
> This patch series makes native be preferred over vendor, which should
> avoid the problems seen with the 6.1 changes before the fixes.
> """
>
> The 2 base patches (last 2 patches of the series now) are unchanged from
> the RFC. New is a bunch of video_detect DMI quirk updates, 3 small fixes to
> existing quirks + 2 new quirks. 1 of the new quirks is necessary to avoid
> a known regression with preferring native over vendor on 1 model,
> the other DMI quirk is unrelated to the other changes.
>
> This series applies on top of the platform-drivers-x86-v6.1-3 tag from:
> https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/
>
> So either you will need to merge that tag (or merge v6.1-rc5 from Linus)
> before applying these patches, or I can merge this through my for-next
> branch which already has these changes. Either way works for me.

I'll apply them on top of the -rc5.

> Hans de Goede (7):
>   ACPI: video: Add a few bugtracker links to DMI quirks
>   ACPI: video: Change GIGABYTE GB-BXBT-2807 quirk to force_none
>   ACPI: video: Change Sony Vaio VPCEH3U1E quirk to force_native
>   ACPI: video: Add force_vendor quirk for Sony Vaio PCG-FRV35
>   ACPI: video: Add force_native quirk for Sony Vaio VPCY11S1E
>   ACPI: video: Simplify __acpi_video_get_backlight_type()
>   ACPI: video: Prefer native over vendor
>
>  drivers/acpi/video_detect.c | 110 ++++++++++++++++++++----------------
>  1 file changed, 62 insertions(+), 48 deletions(-)
>
> --

Thanks!

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

* Re: [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates
  2022-11-14 15:27 ` [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Rafael J. Wysocki
@ 2022-11-14 16:11   ` Hans de Goede
  2022-11-16 19:00     ` Rafael J. Wysocki
  0 siblings, 1 reply; 11+ messages in thread
From: Hans de Goede @ 2022-11-14 16:11 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Len Brown, Matthew Garrett, linux-acpi

Hi,

On 11/14/22 16:27, Rafael J. Wysocki wrote:
> On Mon, Nov 14, 2022 at 3:45 PM Hans de Goede <hdegoede@redhat.com> wrote:
>>
>> Hi Rafael, et. al.,
>>
>> As mentioned already in the RFC:
>>
>> """
>> Here is a second attempt at always registering only a single
>> /sys/class/backlight device per panel.
>>
>> This first round of testing has shown that native works well even on
>> systems so old that the don't have acpi_video backlight control support.
>>
>> This patch series makes native be preferred over vendor, which should
>> avoid the problems seen with the 6.1 changes before the fixes.
>> """
>>
>> The 2 base patches (last 2 patches of the series now) are unchanged from
>> the RFC. New is a bunch of video_detect DMI quirk updates, 3 small fixes to
>> existing quirks + 2 new quirks. 1 of the new quirks is necessary to avoid
>> a known regression with preferring native over vendor on 1 model,
>> the other DMI quirk is unrelated to the other changes.
>>
>> This series applies on top of the platform-drivers-x86-v6.1-3 tag from:
>> https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/
>>
>> So either you will need to merge that tag (or merge v6.1-rc5 from Linus)
>> before applying these patches, or I can merge this through my for-next
>> branch which already has these changes. Either way works for me.
> 
> I'll apply them on top of the -rc5.

Great, thank you.

Regards,

Hans


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

* Re: [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates
  2022-11-14 16:11   ` Hans de Goede
@ 2022-11-16 19:00     ` Rafael J. Wysocki
  0 siblings, 0 replies; 11+ messages in thread
From: Rafael J. Wysocki @ 2022-11-16 19:00 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Rafael J. Wysocki, Len Brown, Matthew Garrett, linux-acpi

On Mon, Nov 14, 2022 at 5:12 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi,
>
> On 11/14/22 16:27, Rafael J. Wysocki wrote:
> > On Mon, Nov 14, 2022 at 3:45 PM Hans de Goede <hdegoede@redhat.com> wrote:
> >>
> >> Hi Rafael, et. al.,
> >>
> >> As mentioned already in the RFC:
> >>
> >> """
> >> Here is a second attempt at always registering only a single
> >> /sys/class/backlight device per panel.
> >>
> >> This first round of testing has shown that native works well even on
> >> systems so old that the don't have acpi_video backlight control support.
> >>
> >> This patch series makes native be preferred over vendor, which should
> >> avoid the problems seen with the 6.1 changes before the fixes.
> >> """
> >>
> >> The 2 base patches (last 2 patches of the series now) are unchanged from
> >> the RFC. New is a bunch of video_detect DMI quirk updates, 3 small fixes to
> >> existing quirks + 2 new quirks. 1 of the new quirks is necessary to avoid
> >> a known regression with preferring native over vendor on 1 model,
> >> the other DMI quirk is unrelated to the other changes.
> >>
> >> This series applies on top of the platform-drivers-x86-v6.1-3 tag from:
> >> https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/
> >>
> >> So either you will need to merge that tag (or merge v6.1-rc5 from Linus)
> >> before applying these patches, or I can merge this through my for-next
> >> branch which already has these changes. Either way works for me.
> >
> > I'll apply them on top of the -rc5.
>
> Great, thank you.

Applied now, thanks!

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

end of thread, other threads:[~2022-11-16 19:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14 14:44 [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Hans de Goede
2022-11-14 14:44 ` [PATCH 1/7] ACPI: video: Add a few bugtracker links to DMI quirks Hans de Goede
2022-11-14 14:44 ` [PATCH 2/7] ACPI: video: Change GIGABYTE GB-BXBT-2807 quirk to force_none Hans de Goede
2022-11-14 14:44 ` [PATCH 3/7] ACPI: video: Change Sony Vaio VPCEH3U1E quirk to force_native Hans de Goede
2022-11-14 14:44 ` [PATCH 4/7] ACPI: video: Add force_vendor quirk for Sony Vaio PCG-FRV35 Hans de Goede
2022-11-14 14:44 ` [PATCH 5/7] ACPI: video: Add force_native quirk for Sony Vaio VPCY11S1E Hans de Goede
2022-11-14 14:44 ` [PATCH 6/7] ACPI: video: Simplify __acpi_video_get_backlight_type() Hans de Goede
2022-11-14 14:44 ` [PATCH 7/7] ACPI: video: Prefer native over vendor Hans de Goede
2022-11-14 15:27 ` [PATCH 0/7] ACPI: video: Prefer native over vendor + quirk updates Rafael J. Wysocki
2022-11-14 16:11   ` Hans de Goede
2022-11-16 19:00     ` Rafael J. Wysocki

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.