Commit 1e3344d6 authored by Hans de Goede's avatar Hans de Goede

platform/x86: asus-wmi: Move acpi_backlight=native quirks to ACPI video_detect.c

Remove the asus-wmi quirk_entry.wmi_backlight_native quirk-flag, which
called acpi_video_set_dmi_backlight_type(acpi_backlight_native) and replace
it with acpi/video_detect.c video_detect_dmi_table[] entries using the
video_detect_force_native callback.

acpi_video_set_dmi_backlight_type() is troublesome because it may end up
getting called after other backlight drivers have already called
acpi_video_get_backlight_type() resulting in the other drivers
already being registered even though they should not.
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 52796b30
...@@ -564,6 +564,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = { ...@@ -564,6 +564,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "GA503"), DMI_MATCH(DMI_PRODUCT_NAME, "GA503"),
}, },
}, },
{
.callback = video_detect_force_native,
/* Asus UX303UB */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "UX303UB"),
},
},
/* /*
* Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2 have both a * Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2 have both a
* working native and video interface. However the default detection * working native and video interface. However the default detection
......
...@@ -97,11 +97,6 @@ static struct quirk_entry quirk_asus_x200ca = { ...@@ -97,11 +97,6 @@ static struct quirk_entry quirk_asus_x200ca = {
.wmi_backlight_set_devstate = true, .wmi_backlight_set_devstate = true,
}; };
static struct quirk_entry quirk_asus_ux303ub = {
.wmi_backlight_native = true,
.wmi_backlight_set_devstate = true,
};
static struct quirk_entry quirk_asus_x550lb = { static struct quirk_entry quirk_asus_x550lb = {
.wmi_backlight_set_devstate = true, .wmi_backlight_set_devstate = true,
.xusb2pr = 0x01D9, .xusb2pr = 0x01D9,
...@@ -372,15 +367,6 @@ static const struct dmi_system_id asus_quirks[] = { ...@@ -372,15 +367,6 @@ static const struct dmi_system_id asus_quirks[] = {
}, },
.driver_data = &quirk_asus_x200ca, .driver_data = &quirk_asus_x200ca,
}, },
{
.callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. UX303UB",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
DMI_MATCH(DMI_PRODUCT_NAME, "UX303UB"),
},
.driver_data = &quirk_asus_ux303ub,
},
{ {
.callback = dmi_matched, .callback = dmi_matched,
.ident = "ASUSTeK COMPUTER INC. UX330UAK", .ident = "ASUSTeK COMPUTER INC. UX330UAK",
......
...@@ -3634,9 +3634,6 @@ static int asus_wmi_add(struct platform_device *pdev) ...@@ -3634,9 +3634,6 @@ static int asus_wmi_add(struct platform_device *pdev)
if (asus->driver->quirks->wmi_force_als_set) if (asus->driver->quirks->wmi_force_als_set)
asus_wmi_set_als(); asus_wmi_set_als();
if (asus->driver->quirks->wmi_backlight_native)
acpi_video_set_dmi_backlight_type(acpi_backlight_native);
if (asus->driver->quirks->xusb2pr) if (asus->driver->quirks->xusb2pr)
asus_wmi_set_xusb2pr(asus); asus_wmi_set_xusb2pr(asus);
......
...@@ -29,7 +29,6 @@ struct quirk_entry { ...@@ -29,7 +29,6 @@ struct quirk_entry {
bool hotplug_wireless; bool hotplug_wireless;
bool scalar_panel_brightness; bool scalar_panel_brightness;
bool store_backlight_power; bool store_backlight_power;
bool wmi_backlight_native;
bool wmi_backlight_set_devstate; bool wmi_backlight_set_devstate;
bool wmi_force_als_set; bool wmi_force_als_set;
bool use_kbd_dock_devid; bool use_kbd_dock_devid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment