Skip to content

Commit

Permalink
Merge branches 'acpi-blacklist' and 'acpi-video'
Browse files Browse the repository at this point in the history
* acpi-blacklist:
  ACPI / blacklist: Disable Vista compatibility for Sony VGN-SR19XN.

* acpi-video:
  ACPI / video: Add force native backlight quirk for Lenovo Ideapad Z570
  ACPI / video: Allow forcing native backlight on non win8 machines
  • Loading branch information
Rafael J. Wysocki committed Apr 12, 2015
3 parents 14bd8d7 + 8a5de52 + 6449188 commit 34a1b99
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 14 deletions.
8 changes: 8 additions & 0 deletions drivers/acpi/blacklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
},
{
.callback = dmi_disable_osi_vista,
.ident = "VGN-SR19XN",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SR19XN"),
},
},
{
.callback = dmi_disable_osi_vista,
.ident = "Toshiba Satellite L355",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
Expand Down
36 changes: 30 additions & 6 deletions drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,15 @@ module_param(allow_duplicates, bool, 0644);
* For Windows 8 systems: used to decide if video module
* should skip registering backlight interface of its own.
*/
static int use_native_backlight_param = -1;
enum {
NATIVE_BACKLIGHT_NOT_SET = -1,
NATIVE_BACKLIGHT_OFF,
NATIVE_BACKLIGHT_ON,
};

static int use_native_backlight_param = NATIVE_BACKLIGHT_NOT_SET;
module_param_named(use_native_backlight, use_native_backlight_param, int, 0444);
static bool use_native_backlight_dmi = true;
static int use_native_backlight_dmi = NATIVE_BACKLIGHT_NOT_SET;

static int register_count;
static struct mutex video_list_lock;
Expand Down Expand Up @@ -237,15 +243,16 @@ static void acpi_video_switch_brightness(struct work_struct *work);

static bool acpi_video_use_native_backlight(void)
{
if (use_native_backlight_param != -1)
if (use_native_backlight_param != NATIVE_BACKLIGHT_NOT_SET)
return use_native_backlight_param;
else
else if (use_native_backlight_dmi != NATIVE_BACKLIGHT_NOT_SET)
return use_native_backlight_dmi;
return acpi_osi_is_win8();
}

bool acpi_video_verify_backlight_support(void)
{
if (acpi_osi_is_win8() && acpi_video_use_native_backlight() &&
if (acpi_video_use_native_backlight() &&
backlight_device_registered(BACKLIGHT_RAW))
return false;
return acpi_video_backlight_support();
Expand Down Expand Up @@ -414,7 +421,13 @@ static int __init video_set_bqc_offset(const struct dmi_system_id *d)

static int __init video_disable_native_backlight(const struct dmi_system_id *d)
{
use_native_backlight_dmi = false;
use_native_backlight_dmi = NATIVE_BACKLIGHT_OFF;
return 0;
}

static int __init video_enable_native_backlight(const struct dmi_system_id *d)
{
use_native_backlight_dmi = NATIVE_BACKLIGHT_ON;
return 0;
}

Expand Down Expand Up @@ -559,6 +572,17 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
DMI_MATCH(DMI_PRODUCT_NAME, "XPS L521X"),
},
},

/* Non win8 machines which need native backlight nevertheless */
{
/* https://bugzilla.redhat.com/show_bug.cgi?id=1187004 */
.callback = video_enable_native_backlight,
.ident = "Lenovo Ideapad Z570",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_NAME, "102434U"),
},
},
{}
};

Expand Down
8 changes: 0 additions & 8 deletions drivers/acpi/video_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,6 @@ static struct dmi_system_id video_detect_dmi_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 5737"),
},
},
{
.callback = video_detect_force_vendor,
.ident = "Lenovo IdeaPad Z570",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_VERSION, "Ideapad Z570"),
},
},
{ },
};

Expand Down

0 comments on commit 34a1b99

Please sign in to comment.