mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
platform/x86: asus-wmi: Drop DMI chassis-type check from backlight handling
Remove this check from the asus-wmi backlight handling: /* Some Asus desktop boards export an acpi-video backlight interface, stop this from showing up */ chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE); if (chassis_type && !strcmp(chassis_type, "3")) acpi_video_set_dmi_backlight_type(acpi_backlight_vendor); This acpi_video_set_dmi_backlight_type(acpi_backlight_vendor) call must be removed because other changes in this series change the native backlight drivers to no longer unconditionally register their backlight. Instead these drivers now do this check: if (acpi_video_get_backlight_type(false) != acpi_backlight_native) return 0; /* bail */ So leaving this in place can break things on laptops with a broken DMI chassis-type, which would have GPU native brightness control before the addition of the acpi_video_get_backlight_type() != native check. Removing this should be ok now, since the ACPI video code has improved heuristics for this itself now (which includes a chassis-type check). Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
0172df18dc
commit
2603c681e0
@ -3553,7 +3553,6 @@ static int asus_wmi_add(struct platform_device *pdev)
|
|||||||
struct platform_driver *pdrv = to_platform_driver(pdev->dev.driver);
|
struct platform_driver *pdrv = to_platform_driver(pdev->dev.driver);
|
||||||
struct asus_wmi_driver *wdrv = to_asus_wmi_driver(pdrv);
|
struct asus_wmi_driver *wdrv = to_asus_wmi_driver(pdrv);
|
||||||
struct asus_wmi *asus;
|
struct asus_wmi *asus;
|
||||||
const char *chassis_type;
|
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
int err;
|
int err;
|
||||||
u32 result;
|
u32 result;
|
||||||
@ -3635,12 +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();
|
||||||
|
|
||||||
/* Some Asus desktop boards export an acpi-video backlight interface,
|
|
||||||
stop this from showing up */
|
|
||||||
chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE);
|
|
||||||
if (chassis_type && !strcmp(chassis_type, "3"))
|
|
||||||
acpi_video_set_dmi_backlight_type(acpi_backlight_vendor);
|
|
||||||
|
|
||||||
if (asus->driver->quirks->wmi_backlight_power)
|
if (asus->driver->quirks->wmi_backlight_power)
|
||||||
acpi_video_set_dmi_backlight_type(acpi_backlight_vendor);
|
acpi_video_set_dmi_backlight_type(acpi_backlight_vendor);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user