* [PATCH] ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100
@ 2023-09-29 20:20 Ondrej Zary
2023-10-03 18:36 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Ondrej Zary @ 2023-09-29 20:20 UTC (permalink / raw)
To: Rafael J . Wysocki; +Cc: Len Brown, linux-acpi, linux-kernel
Toshiba Portégé R100 has both acpi_video and toshiba_acpi vendor
backlight driver working. But none of them gets activated as it has
a VGA with no kernel driver (Trident CyberBlade XP4m32).
The DMI strings are very generic ("Portable PC") so add a custom
callback function to check for Trident CyberBlade XP4m32 PCI device
before enabling the vendor backlight driver (better than acpi_video
as it has more brightness steps).
Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
Signed-off-by: Ondrej Zary <linux@zary.sk>
---
drivers/acpi/video_detect.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 442396f6ed1f..31205fee59d4 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -130,6 +130,16 @@ static int video_detect_force_native(const struct dmi_system_id *d)
return 0;
}
+static int video_detect_portege_r100(const struct dmi_system_id *d)
+{
+ struct pci_dev *dev;
+ /* Search for Trident CyberBlade XP4m32 to confirm Portégé R100 */
+ dev = pci_get_device(PCI_VENDOR_ID_TRIDENT, 0x2100, NULL);
+ if (dev)
+ acpi_backlight_dmi = acpi_backlight_vendor;
+ return 0;
+}
+
static const struct dmi_system_id video_detect_dmi_table[] = {
/*
* Models which should use the vendor backlight interface,
@@ -270,6 +280,22 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
},
},
+ /*
+ * Toshiba Portégé R100 has working both acpi_video and toshiba_acpi
+ * vendor driver. But none of them gets activated as it has a VGA with
+ * no kernel driver (Trident CyberBlade XP4m32).
+ * The DMI strings are generic so check for the VGA chip in callback.
+ */
+ {
+ .callback = video_detect_portege_r100,
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "Version 1.0"),
+ DMI_MATCH(DMI_BOARD_NAME, "Portable PC")
+ },
+ },
+
/*
* Models which need acpi_video backlight control where the GPU drivers
* do not call acpi_video_register_backlight() because no internal panel
--
Ondrej Zary
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100
2023-09-29 20:20 [PATCH] ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100 Ondrej Zary
@ 2023-10-03 18:36 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2023-10-03 18:36 UTC (permalink / raw)
To: Ondrej Zary; +Cc: Rafael J . Wysocki, Len Brown, linux-acpi, linux-kernel
On Fri, Sep 29, 2023 at 10:21 PM Ondrej Zary <linux@zary.sk> wrote:
>
> Toshiba Portégé R100 has both acpi_video and toshiba_acpi vendor
> backlight driver working. But none of them gets activated as it has
> a VGA with no kernel driver (Trident CyberBlade XP4m32).
>
> The DMI strings are very generic ("Portable PC") so add a custom
> callback function to check for Trident CyberBlade XP4m32 PCI device
> before enabling the vendor backlight driver (better than acpi_video
> as it has more brightness steps).
>
> Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
> Signed-off-by: Ondrej Zary <linux@zary.sk>
> ---
> drivers/acpi/video_detect.c | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
> index 442396f6ed1f..31205fee59d4 100644
> --- a/drivers/acpi/video_detect.c
> +++ b/drivers/acpi/video_detect.c
> @@ -130,6 +130,16 @@ static int video_detect_force_native(const struct dmi_system_id *d)
> return 0;
> }
>
> +static int video_detect_portege_r100(const struct dmi_system_id *d)
> +{
> + struct pci_dev *dev;
> + /* Search for Trident CyberBlade XP4m32 to confirm Portégé R100 */
> + dev = pci_get_device(PCI_VENDOR_ID_TRIDENT, 0x2100, NULL);
> + if (dev)
> + acpi_backlight_dmi = acpi_backlight_vendor;
> + return 0;
> +}
> +
> static const struct dmi_system_id video_detect_dmi_table[] = {
> /*
> * Models which should use the vendor backlight interface,
> @@ -270,6 +280,22 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
> },
> },
>
> + /*
> + * Toshiba Portégé R100 has working both acpi_video and toshiba_acpi
> + * vendor driver. But none of them gets activated as it has a VGA with
> + * no kernel driver (Trident CyberBlade XP4m32).
> + * The DMI strings are generic so check for the VGA chip in callback.
> + */
> + {
> + .callback = video_detect_portege_r100,
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"),
> + DMI_MATCH(DMI_PRODUCT_VERSION, "Version 1.0"),
> + DMI_MATCH(DMI_BOARD_NAME, "Portable PC")
> + },
> + },
> +
> /*
> * Models which need acpi_video backlight control where the GPU drivers
> * do not call acpi_video_register_backlight() because no internal panel
> --
Applied as 6.7 material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-03 18:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-29 20:20 [PATCH] ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100 Ondrej Zary
2023-10-03 18:36 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox