.. | .. |
---|
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 | { |
---|
.. | .. |
---|
295 | 308 | }, |
---|
296 | 309 | }, |
---|
297 | 310 | { |
---|
| 311 | + /* https://bugzilla.suse.com/show_bug.cgi?id=1208724 */ |
---|
| 312 | + .callback = video_detect_force_native, |
---|
| 313 | + /* Lenovo Ideapad Z470 */ |
---|
| 314 | + .matches = { |
---|
| 315 | + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
---|
| 316 | + DMI_MATCH(DMI_PRODUCT_VERSION, "IdeaPad Z470"), |
---|
| 317 | + }, |
---|
| 318 | + }, |
---|
| 319 | + { |
---|
298 | 320 | /* https://bugzilla.redhat.com/show_bug.cgi?id=1187004 */ |
---|
299 | 321 | .callback = video_detect_force_native, |
---|
300 | 322 | .ident = "Lenovo Ideapad Z570", |
---|
301 | 323 | .matches = { |
---|
302 | 324 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
---|
303 | | - DMI_MATCH(DMI_PRODUCT_NAME, "102434U"), |
---|
| 325 | + DMI_MATCH(DMI_PRODUCT_VERSION, "Ideapad Z570"), |
---|
| 326 | + }, |
---|
| 327 | + }, |
---|
| 328 | + { |
---|
| 329 | + .callback = video_detect_force_native, |
---|
| 330 | + .ident = "Lenovo E41-25", |
---|
| 331 | + .matches = { |
---|
| 332 | + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
---|
| 333 | + DMI_MATCH(DMI_PRODUCT_NAME, "81FS"), |
---|
| 334 | + }, |
---|
| 335 | + }, |
---|
| 336 | + { |
---|
| 337 | + .callback = video_detect_force_native, |
---|
| 338 | + .ident = "Lenovo E41-45", |
---|
| 339 | + .matches = { |
---|
| 340 | + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
---|
| 341 | + DMI_MATCH(DMI_PRODUCT_NAME, "82BK"), |
---|
| 342 | + }, |
---|
| 343 | + }, |
---|
| 344 | + { |
---|
| 345 | + .callback = video_detect_force_native, |
---|
| 346 | + /* Lenovo ThinkPad X131e (3371 AMD version) */ |
---|
| 347 | + .matches = { |
---|
| 348 | + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
---|
| 349 | + DMI_MATCH(DMI_PRODUCT_NAME, "3371"), |
---|
| 350 | + }, |
---|
| 351 | + }, |
---|
| 352 | + { |
---|
| 353 | + .callback = video_detect_force_native, |
---|
| 354 | + /* Apple iMac11,3 */ |
---|
| 355 | + .matches = { |
---|
| 356 | + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), |
---|
| 357 | + DMI_MATCH(DMI_PRODUCT_NAME, "iMac11,3"), |
---|
| 358 | + }, |
---|
| 359 | + }, |
---|
| 360 | + { |
---|
| 361 | + /* https://gitlab.freedesktop.org/drm/amd/-/issues/1838 */ |
---|
| 362 | + .callback = video_detect_force_native, |
---|
| 363 | + /* Apple iMac12,1 */ |
---|
| 364 | + .matches = { |
---|
| 365 | + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), |
---|
| 366 | + DMI_MATCH(DMI_PRODUCT_NAME, "iMac12,1"), |
---|
| 367 | + }, |
---|
| 368 | + }, |
---|
| 369 | + { |
---|
| 370 | + /* https://gitlab.freedesktop.org/drm/amd/-/issues/2753 */ |
---|
| 371 | + .callback = video_detect_force_native, |
---|
| 372 | + /* Apple iMac12,2 */ |
---|
| 373 | + .matches = { |
---|
| 374 | + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), |
---|
| 375 | + DMI_MATCH(DMI_PRODUCT_NAME, "iMac12,2"), |
---|
304 | 376 | }, |
---|
305 | 377 | }, |
---|
306 | 378 | { |
---|
.. | .. |
---|
356 | 428 | DMI_MATCH(DMI_BOARD_NAME, "BA51_MV"), |
---|
357 | 429 | }, |
---|
358 | 430 | }, |
---|
359 | | - |
---|
| 431 | + { |
---|
| 432 | + .callback = video_detect_force_native, |
---|
| 433 | + .ident = "ASUSTeK COMPUTER INC. GA401", |
---|
| 434 | + .matches = { |
---|
| 435 | + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
---|
| 436 | + DMI_MATCH(DMI_PRODUCT_NAME, "GA401"), |
---|
| 437 | + }, |
---|
| 438 | + }, |
---|
| 439 | + { |
---|
| 440 | + .callback = video_detect_force_native, |
---|
| 441 | + .ident = "ASUSTeK COMPUTER INC. GA502", |
---|
| 442 | + .matches = { |
---|
| 443 | + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
---|
| 444 | + DMI_MATCH(DMI_PRODUCT_NAME, "GA502"), |
---|
| 445 | + }, |
---|
| 446 | + }, |
---|
| 447 | + { |
---|
| 448 | + .callback = video_detect_force_native, |
---|
| 449 | + .ident = "ASUSTeK COMPUTER INC. GA503", |
---|
| 450 | + .matches = { |
---|
| 451 | + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), |
---|
| 452 | + DMI_MATCH(DMI_PRODUCT_NAME, "GA503"), |
---|
| 453 | + }, |
---|
| 454 | + }, |
---|
| 455 | + /* |
---|
| 456 | + * Clevo NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2 have both a |
---|
| 457 | + * working native and video interface. However the default detection |
---|
| 458 | + * mechanism first registers the video interface before unregistering |
---|
| 459 | + * it again and switching to the native interface during boot. This |
---|
| 460 | + * results in a dangling SBIOS request for backlight change for some |
---|
| 461 | + * reason, causing the backlight to switch to ~2% once per boot on the |
---|
| 462 | + * first power cord connect or disconnect event. Setting the native |
---|
| 463 | + * interface explicitly circumvents this buggy behaviour, by avoiding |
---|
| 464 | + * the unregistering process. |
---|
| 465 | + */ |
---|
| 466 | + { |
---|
| 467 | + .callback = video_detect_force_native, |
---|
| 468 | + .ident = "Clevo NL5xRU", |
---|
| 469 | + .matches = { |
---|
| 470 | + DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"), |
---|
| 471 | + }, |
---|
| 472 | + }, |
---|
| 473 | + { |
---|
| 474 | + .callback = video_detect_force_native, |
---|
| 475 | + .ident = "Clevo NL5xRU", |
---|
| 476 | + .matches = { |
---|
| 477 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
---|
| 478 | + DMI_MATCH(DMI_BOARD_NAME, "AURA1501"), |
---|
| 479 | + }, |
---|
| 480 | + }, |
---|
| 481 | + { |
---|
| 482 | + .callback = video_detect_force_native, |
---|
| 483 | + .ident = "Clevo NL5xRU", |
---|
| 484 | + .matches = { |
---|
| 485 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
---|
| 486 | + DMI_MATCH(DMI_BOARD_NAME, "EDUBOOK1502"), |
---|
| 487 | + }, |
---|
| 488 | + }, |
---|
| 489 | + { |
---|
| 490 | + .callback = video_detect_force_native, |
---|
| 491 | + .ident = "Clevo NL5xNU", |
---|
| 492 | + .matches = { |
---|
| 493 | + DMI_MATCH(DMI_BOARD_NAME, "NL5xNU"), |
---|
| 494 | + }, |
---|
| 495 | + }, |
---|
| 496 | + /* |
---|
| 497 | + * The TongFang PF5PU1G, PF4NU1F, PF5NU1G, and PF5LUXG/TUXEDO BA15 Gen10, |
---|
| 498 | + * Pulse 14/15 Gen1, and Pulse 15 Gen2 have the same problem as the Clevo |
---|
| 499 | + * NL5xRU and NL5xNU/TUXEDO Aura 15 Gen1 and Gen2. See the description |
---|
| 500 | + * above. |
---|
| 501 | + */ |
---|
| 502 | + { |
---|
| 503 | + .callback = video_detect_force_native, |
---|
| 504 | + .ident = "TongFang PF5PU1G", |
---|
| 505 | + .matches = { |
---|
| 506 | + DMI_MATCH(DMI_BOARD_NAME, "PF5PU1G"), |
---|
| 507 | + }, |
---|
| 508 | + }, |
---|
| 509 | + { |
---|
| 510 | + .callback = video_detect_force_native, |
---|
| 511 | + .ident = "TongFang PF4NU1F", |
---|
| 512 | + .matches = { |
---|
| 513 | + DMI_MATCH(DMI_BOARD_NAME, "PF4NU1F"), |
---|
| 514 | + }, |
---|
| 515 | + }, |
---|
| 516 | + { |
---|
| 517 | + .callback = video_detect_force_native, |
---|
| 518 | + .ident = "TongFang PF4NU1F", |
---|
| 519 | + .matches = { |
---|
| 520 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
---|
| 521 | + DMI_MATCH(DMI_BOARD_NAME, "PULSE1401"), |
---|
| 522 | + }, |
---|
| 523 | + }, |
---|
| 524 | + { |
---|
| 525 | + .callback = video_detect_force_native, |
---|
| 526 | + .ident = "TongFang PF5NU1G", |
---|
| 527 | + .matches = { |
---|
| 528 | + DMI_MATCH(DMI_BOARD_NAME, "PF5NU1G"), |
---|
| 529 | + }, |
---|
| 530 | + }, |
---|
| 531 | + { |
---|
| 532 | + .callback = video_detect_force_native, |
---|
| 533 | + .ident = "TongFang PF5NU1G", |
---|
| 534 | + .matches = { |
---|
| 535 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
---|
| 536 | + DMI_MATCH(DMI_BOARD_NAME, "PULSE1501"), |
---|
| 537 | + }, |
---|
| 538 | + }, |
---|
| 539 | + { |
---|
| 540 | + .callback = video_detect_force_native, |
---|
| 541 | + .ident = "TongFang PF5LUXG", |
---|
| 542 | + .matches = { |
---|
| 543 | + DMI_MATCH(DMI_BOARD_NAME, "PF5LUXG"), |
---|
| 544 | + }, |
---|
| 545 | + }, |
---|
| 546 | + /* |
---|
| 547 | + * More Tongfang devices with the same issue as the Clevo NL5xRU and |
---|
| 548 | + * NL5xNU/TUXEDO Aura 15 Gen1 and Gen2. See the description above. |
---|
| 549 | + */ |
---|
| 550 | + { |
---|
| 551 | + .callback = video_detect_force_native, |
---|
| 552 | + .ident = "TongFang GKxNRxx", |
---|
| 553 | + .matches = { |
---|
| 554 | + DMI_MATCH(DMI_BOARD_NAME, "GKxNRxx"), |
---|
| 555 | + }, |
---|
| 556 | + }, |
---|
| 557 | + { |
---|
| 558 | + .callback = video_detect_force_native, |
---|
| 559 | + .ident = "TongFang GKxNRxx", |
---|
| 560 | + .matches = { |
---|
| 561 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
---|
| 562 | + DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A1650TI"), |
---|
| 563 | + }, |
---|
| 564 | + }, |
---|
| 565 | + { |
---|
| 566 | + .callback = video_detect_force_native, |
---|
| 567 | + .ident = "TongFang GKxNRxx", |
---|
| 568 | + .matches = { |
---|
| 569 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
---|
| 570 | + DMI_MATCH(DMI_BOARD_NAME, "POLARIS1501A2060"), |
---|
| 571 | + }, |
---|
| 572 | + }, |
---|
| 573 | + { |
---|
| 574 | + .callback = video_detect_force_native, |
---|
| 575 | + .ident = "TongFang GKxNRxx", |
---|
| 576 | + .matches = { |
---|
| 577 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
---|
| 578 | + DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A1650TI"), |
---|
| 579 | + }, |
---|
| 580 | + }, |
---|
| 581 | + { |
---|
| 582 | + .callback = video_detect_force_native, |
---|
| 583 | + .ident = "TongFang GKxNRxx", |
---|
| 584 | + .matches = { |
---|
| 585 | + DMI_MATCH(DMI_SYS_VENDOR, "TUXEDO"), |
---|
| 586 | + DMI_MATCH(DMI_BOARD_NAME, "POLARIS1701A2060"), |
---|
| 587 | + }, |
---|
| 588 | + }, |
---|
| 589 | + { |
---|
| 590 | + .callback = video_detect_force_native, |
---|
| 591 | + .ident = "TongFang GMxNGxx", |
---|
| 592 | + .matches = { |
---|
| 593 | + DMI_MATCH(DMI_BOARD_NAME, "GMxNGxx"), |
---|
| 594 | + }, |
---|
| 595 | + }, |
---|
| 596 | + { |
---|
| 597 | + .callback = video_detect_force_native, |
---|
| 598 | + .ident = "TongFang GMxZGxx", |
---|
| 599 | + .matches = { |
---|
| 600 | + DMI_MATCH(DMI_BOARD_NAME, "GMxZGxx"), |
---|
| 601 | + }, |
---|
| 602 | + }, |
---|
| 603 | + { |
---|
| 604 | + .callback = video_detect_force_native, |
---|
| 605 | + .ident = "TongFang GMxRGxx", |
---|
| 606 | + .matches = { |
---|
| 607 | + DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"), |
---|
| 608 | + }, |
---|
| 609 | + }, |
---|
360 | 610 | /* |
---|
361 | 611 | * Desktops which falsely report a backlight and which our heuristics |
---|
362 | 612 | * for this do not catch. |
---|