asus-wmi: Disable acpi-video backlight on desktop machines
Some Asus motherboards for desktop PC-s export an acpi-video interface advertising backlight support. Test the dmi chassis-type and tell acpi-video to not register a backlight interface on desktops. https://bugzilla.redhat.com/show_bug.cgi?id=1097436 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
This commit is contained in:
parent
ce363c2bcb
commit
d8c66f6299
@ -46,6 +46,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/thermal.h>
|
#include <linux/thermal.h>
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
|
#include <linux/dmi.h>
|
||||||
#include <acpi/video.h>
|
#include <acpi/video.h>
|
||||||
|
|
||||||
#include "asus-wmi.h"
|
#include "asus-wmi.h"
|
||||||
@ -1734,6 +1735,7 @@ 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;
|
||||||
@ -1770,6 +1772,11 @@ static int asus_wmi_add(struct platform_device *pdev)
|
|||||||
if (err)
|
if (err)
|
||||||
goto fail_rfkill;
|
goto fail_rfkill;
|
||||||
|
|
||||||
|
/* 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_dmi_promote_vendor();
|
||||||
if (asus->driver->quirks->wmi_backlight_power)
|
if (asus->driver->quirks->wmi_backlight_power)
|
||||||
acpi_video_dmi_promote_vendor();
|
acpi_video_dmi_promote_vendor();
|
||||||
if (!acpi_video_backlight_support()) {
|
if (!acpi_video_backlight_support()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user