| .. | .. |
|---|
| 35 | 35 | #include <linux/workqueue.h> |
|---|
| 36 | 36 | #include <acpi/video.h> |
|---|
| 37 | 37 | |
|---|
| 38 | | -ACPI_MODULE_NAME("video"); |
|---|
| 39 | | -#define _COMPONENT ACPI_VIDEO_COMPONENT |
|---|
| 40 | | - |
|---|
| 41 | 38 | void acpi_video_unregister_backlight(void); |
|---|
| 42 | 39 | |
|---|
| 43 | 40 | static bool backlight_notifier_registered; |
|---|
| .. | .. |
|---|
| 112 | 109 | static const struct dmi_system_id video_detect_dmi_table[] = { |
|---|
| 113 | 110 | /* On Samsung X360, the BIOS will set a flag (VDRV) if generic |
|---|
| 114 | 111 | * ACPI backlight device is used. This flag will definitively break |
|---|
| 115 | | - * the backlight interface (even the vendor interface) untill next |
|---|
| 112 | + * the backlight interface (even the vendor interface) until next |
|---|
| 116 | 113 | * reboot. It's why we should prevent video.ko from being used here |
|---|
| 117 | 114 | * and we can't rely on a later call to acpi_video_unregister(). |
|---|
| 118 | 115 | */ |
|---|
| .. | .. |
|---|
| 139 | 136 | .matches = { |
|---|
| 140 | 137 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."), |
|---|
| 141 | 138 | DMI_MATCH(DMI_PRODUCT_NAME, "UL30A"), |
|---|
| 139 | + }, |
|---|
| 140 | + }, |
|---|
| 141 | + { |
|---|
| 142 | + .callback = video_detect_force_vendor, |
|---|
| 143 | + .ident = "GIGABYTE GB-BXBT-2807", |
|---|
| 144 | + .matches = { |
|---|
| 145 | + DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), |
|---|
| 146 | + DMI_MATCH(DMI_PRODUCT_NAME, "GB-BXBT-2807"), |
|---|
| 147 | + }, |
|---|
| 148 | + }, |
|---|
| 149 | + { |
|---|
| 150 | + .callback = video_detect_force_vendor, |
|---|
| 151 | + .ident = "Sony VPCEH3U1E", |
|---|
| 152 | + .matches = { |
|---|
| 153 | + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), |
|---|
| 154 | + DMI_MATCH(DMI_PRODUCT_NAME, "VPCEH3U1E"), |
|---|
| 142 | 155 | }, |
|---|
| 143 | 156 | }, |
|---|
| 144 | 157 | |
|---|
| .. | .. |
|---|
| 173 | 186 | DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"), |
|---|
| 174 | 187 | }, |
|---|
| 175 | 188 | }, |
|---|
| 176 | | - { |
|---|
| 177 | | - .callback = video_detect_force_video, |
|---|
| 178 | | - .ident = "ThinkPad X201T", |
|---|
| 179 | | - .matches = { |
|---|
| 180 | | - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
|---|
| 181 | | - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201T"), |
|---|
| 182 | | - }, |
|---|
| 183 | | - }, |
|---|
| 189 | + { |
|---|
| 190 | + .callback = video_detect_force_video, |
|---|
| 191 | + .ident = "ThinkPad X201T", |
|---|
| 192 | + .matches = { |
|---|
| 193 | + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
|---|
| 194 | + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201T"), |
|---|
| 195 | + }, |
|---|
| 196 | + }, |
|---|
| 184 | 197 | |
|---|
| 185 | 198 | /* The native backlight controls do not work on some older machines */ |
|---|
| 186 | 199 | { |
|---|
| .. | .. |
|---|
| 304 | 317 | }, |
|---|
| 305 | 318 | }, |
|---|
| 306 | 319 | { |
|---|
| 320 | + .callback = video_detect_force_native, |
|---|
| 321 | + .ident = "Lenovo E41-25", |
|---|
| 322 | + .matches = { |
|---|
| 323 | + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
|---|
| 324 | + DMI_MATCH(DMI_PRODUCT_NAME, "81FS"), |
|---|
| 325 | + }, |
|---|
| 326 | + }, |
|---|
| 327 | + { |
|---|
| 328 | + .callback = video_detect_force_native, |
|---|
| 329 | + .ident = "Lenovo E41-45", |
|---|
| 330 | + .matches = { |
|---|
| 331 | + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
|---|
| 332 | + DMI_MATCH(DMI_PRODUCT_NAME, "82BK"), |
|---|
| 333 | + }, |
|---|
| 334 | + }, |
|---|
| 335 | + { |
|---|
| 307 | 336 | /* https://bugzilla.redhat.com/show_bug.cgi?id=1217249 */ |
|---|
| 308 | 337 | .callback = video_detect_force_native, |
|---|
| 309 | 338 | .ident = "Apple MacBook Pro 12,1", |
|---|
| .. | .. |
|---|
| 356 | 385 | DMI_MATCH(DMI_BOARD_NAME, "BA51_MV"), |
|---|
| 357 | 386 | }, |
|---|
| 358 | 387 | }, |
|---|
| 359 | | - |
|---|
| 388 | + { |
|---|
| 389 | + .callback = video_detect_force_native, |
|---|
| 390 | + .ident = "ASUSTeK COMPUTER INC. GA401", |
|---|
| 391 | + .matches = { |
|---|
| 392 | + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
|---|
| 393 | + DMI_MATCH(DMI_PRODUCT_NAME, "GA401"), |
|---|
| 394 | + }, |
|---|
| 395 | + }, |
|---|
| 396 | + { |
|---|
| 397 | + .callback = video_detect_force_native, |
|---|
| 398 | + .ident = "ASUSTeK COMPUTER INC. GA502", |
|---|
| 399 | + .matches = { |
|---|
| 400 | + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
|---|
| 401 | + DMI_MATCH(DMI_PRODUCT_NAME, "GA502"), |
|---|
| 402 | + }, |
|---|
| 403 | + }, |
|---|
| 404 | + { |
|---|
| 405 | + .callback = video_detect_force_native, |
|---|
| 406 | + .ident = "ASUSTeK COMPUTER INC. GA503", |
|---|
| 407 | + .matches = { |
|---|
| 408 | + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
|---|
| 409 | + DMI_MATCH(DMI_PRODUCT_NAME, "GA503"), |
|---|
| 410 | + }, |
|---|
| 411 | + }, |
|---|
| 412 | + /* |
|---|
| 413 | + * Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2 have both a |
|---|
| 414 | + * working native and video interface. However the default detection |
|---|
| 415 | + * mechanism first registers the video interface before unregistering |
|---|
| 416 | + * it again and switching to the native interface during boot. This |
|---|
| 417 | + * results in a dangling SBIOS request for backlight change for some |
|---|
| 418 | + * reason, causing the backlight to switch to ~2% once per boot on the |
|---|
| 419 | + * first power cord connect or disconnect event. Setting the native |
|---|
| 420 | + * interface explicitly circumvents this buggy behaviour, by avoiding |
|---|
| 421 | + * the unregistering process. |
|---|
| 422 | + */ |
|---|
| 423 | + { |
|---|
| 424 | + .callback = video_detect_force_native, |
|---|
| 425 | + .ident = "Clevo NL5xRU", |
|---|
| 426 | + .matches = { |
|---|
| 427 | + DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"), |
|---|
| 428 | + }, |
|---|
| 429 | + }, |
|---|
| 430 | + { |
|---|
| 431 | + .callback = video_detect_force_native, |
|---|
| 432 | + .ident = "Clevo NL5xRU", |
|---|
| 433 | + .matches = { |
|---|
| 434 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
|---|
| 435 | + DMI_MATCH(DMI_BOARD_NAME, "AURA1501"), |
|---|
| 436 | + }, |
|---|
| 437 | + }, |
|---|
| 438 | + { |
|---|
| 439 | + .callback = video_detect_force_native, |
|---|
| 440 | + .ident = "Clevo NL5xRU", |
|---|
| 441 | + .matches = { |
|---|
| 442 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
|---|
| 443 | + DMI_MATCH(DMI_BOARD_NAME, "EDUBOOK1502"), |
|---|
| 444 | + }, |
|---|
| 445 | + }, |
|---|
| 446 | + { |
|---|
| 447 | + .callback = video_detect_force_native, |
|---|
| 448 | + .ident = "Clevo NL5xNU", |
|---|
| 449 | + .matches = { |
|---|
| 450 | + DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"), |
|---|
| 451 | + }, |
|---|
| 452 | + }, |
|---|
| 453 | + /* |
|---|
| 454 | + * The TongFang PF5PU1G, PF4NU1F, PF5NU1G, and PF5LUXG/TUXEDO BA15 Gen10, |
|---|
| 455 | + * Pulse 14/15 Gen1, and Pulse 15 Gen2 have the same problem as the Clevo |
|---|
| 456 | + * NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2. See the description |
|---|
| 457 | + * above. |
|---|
| 458 | + */ |
|---|
| 459 | + { |
|---|
| 460 | + .callback = video_detect_force_native, |
|---|
| 461 | + .ident = "TongFang PF5PU1G", |
|---|
| 462 | + .matches = { |
|---|
| 463 | + DMI_MATCH(DMI_BOARD_NAME, "PF5PU1G"), |
|---|
| 464 | + }, |
|---|
| 465 | + }, |
|---|
| 466 | + { |
|---|
| 467 | + .callback = video_detect_force_native, |
|---|
| 468 | + .ident = "TongFang PF4NU1F", |
|---|
| 469 | + .matches = { |
|---|
| 470 | + DMI_MATCH(DMI_BOARD_NAME, "PF4NU1F"), |
|---|
| 471 | + }, |
|---|
| 472 | + }, |
|---|
| 473 | + { |
|---|
| 474 | + .callback = video_detect_force_native, |
|---|
| 475 | + .ident = "TongFang PF4NU1F", |
|---|
| 476 | + .matches = { |
|---|
| 477 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
|---|
| 478 | + DMI_MATCH(DMI_BOARD_NAME, "PULSE1401"), |
|---|
| 479 | + }, |
|---|
| 480 | + }, |
|---|
| 481 | + { |
|---|
| 482 | + .callback = video_detect_force_native, |
|---|
| 483 | + .ident = "TongFang PF5NU1G", |
|---|
| 484 | + .matches = { |
|---|
| 485 | + DMI_MATCH(DMI_BOARD_NAME, "PF5NU1G"), |
|---|
| 486 | + }, |
|---|
| 487 | + }, |
|---|
| 488 | + { |
|---|
| 489 | + .callback = video_detect_force_native, |
|---|
| 490 | + .ident = "TongFang PF5NU1G", |
|---|
| 491 | + .matches = { |
|---|
| 492 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
|---|
| 493 | + DMI_MATCH(DMI_BOARD_NAME, "PULSE1501"), |
|---|
| 494 | + }, |
|---|
| 495 | + }, |
|---|
| 496 | + { |
|---|
| 497 | + .callback = video_detect_force_native, |
|---|
| 498 | + .ident = "TongFang PF5LUXG", |
|---|
| 499 | + .matches = { |
|---|
| 500 | + DMI_MATCH(DMI_BOARD_NAME, "PF5LUXG"), |
|---|
| 501 | + }, |
|---|
| 502 | + }, |
|---|
| 503 | + /* |
|---|
| 504 | + * More Tongfang devices with the same issue as the Clevo NL5xRU and |
|---|
| 505 | + * NL5xNU/TUXEDO Aura 15 Gen1 and Gen2. See the description above. |
|---|
| 506 | + */ |
|---|
| 507 | + { |
|---|
| 508 | + .callback = video_detect_force_native, |
|---|
| 509 | + .ident = "TongFang GKxNRxx", |
|---|
| 510 | + .matches = { |
|---|
| 511 | + DMI_MATCH(DMI_BOARD_NAME, "GKxNRxx"), |
|---|
| 512 | + }, |
|---|
| 513 | + }, |
|---|
| 514 | + { |
|---|
| 515 | + .callback = video_detect_force_native, |
|---|
| 516 | + .ident = "TongFang GKxNRxx", |
|---|
| 517 | + .matches = { |
|---|
| 518 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
|---|
| 519 | + DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A1650TI"), |
|---|
| 520 | + }, |
|---|
| 521 | + }, |
|---|
| 522 | + { |
|---|
| 523 | + .callback = video_detect_force_native, |
|---|
| 524 | + .ident = "TongFang GKxNRxx", |
|---|
| 525 | + .matches = { |
|---|
| 526 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
|---|
| 527 | + DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A2060"), |
|---|
| 528 | + }, |
|---|
| 529 | + }, |
|---|
| 530 | + { |
|---|
| 531 | + .callback = video_detect_force_native, |
|---|
| 532 | + .ident = "TongFang GKxNRxx", |
|---|
| 533 | + .matches = { |
|---|
| 534 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
|---|
| 535 | + DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A1650TI"), |
|---|
| 536 | + }, |
|---|
| 537 | + }, |
|---|
| 538 | + { |
|---|
| 539 | + .callback = video_detect_force_native, |
|---|
| 540 | + .ident = "TongFang GKxNRxx", |
|---|
| 541 | + .matches = { |
|---|
| 542 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
|---|
| 543 | + DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A2060"), |
|---|
| 544 | + }, |
|---|
| 545 | + }, |
|---|
| 546 | + { |
|---|
| 547 | + .callback = video_detect_force_native, |
|---|
| 548 | + .ident = "TongFang GMxNGxx", |
|---|
| 549 | + .matches = { |
|---|
| 550 | + DMI_MATCH(DMI_BOARD_NAME, "GMxNGxx"), |
|---|
| 551 | + }, |
|---|
| 552 | + }, |
|---|
| 553 | + { |
|---|
| 554 | + .callback = video_detect_force_native, |
|---|
| 555 | + .ident = "TongFang GMxZGxx", |
|---|
| 556 | + .matches = { |
|---|
| 557 | + DMI_MATCH(DMI_BOARD_NAME, "GMxZGxx"), |
|---|
| 558 | + }, |
|---|
| 559 | + }, |
|---|
| 560 | + { |
|---|
| 561 | + .callback = video_detect_force_native, |
|---|
| 562 | + .ident = "TongFang GMxRGxx", |
|---|
| 563 | + .matches = { |
|---|
| 564 | + DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"), |
|---|
| 565 | + }, |
|---|
| 566 | + }, |
|---|
| 360 | 567 | /* |
|---|
| 361 | 568 | * Desktops which falsely report a backlight and which our heuristics |
|---|
| 362 | 569 | * for this do not catch. |
|---|