Skip to content
  • Linus Torvalds's avatar
    Merge tag 'acpi-video-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ea45ea70
    Linus Torvalds authored
    Pull ACPI video support fixes from Rafael Wysocki:
     "I'm sending a separate pull request for this as it may be somewhat
      controversial.  The breakage addressed here is not really new and the
      fixes may not satisfy all users of the affected systems, but we've had
      so much back and forth dance in this area over the last several weeks
      that I think it's time to actually make some progress.
    
      The source of the problem is that about a year ago we started to tell
      BIOSes that we're compatible with Windows 8, which we really need to
      do, because some systems shipping with Windows 8 are tested with it
      and nothing else, so if we tell their BIOSes that we aren't compatible
      with Windows 8, we expose our users to untested BIOS/AML code paths.
    
      However, as it turns out, some Windows 8-specific AML code paths are
      not tested either, because Windows 8 actually doesn't use the ACPI
      methods containing them, so if we declare Windows 8 compatibility and
      attempt to use those ACPI methods, things break.  That occurs mostly
      in the backlight support area where in particular the _BCM and _BQC
      methods are plain unusable on some systems if the OS declares Windows
      8 compatibility.
    
      [ The additional twist is that they actually become usable if the OS
        says it is not compatible with Windows 8, but that may cause
        problems to show up elsewhere ]
    
      Investigation carried out by Matthew Garrett indicates that what
      Windows 8 does about backlight is to leave backlight control up to
      individual graphics drivers.  At least there's evidence that it does
      that if the Intel graphics driver is used, so we've decided to follow
      Windows 8 in that respect and allow i915 to control backlight (Daniel
      likes that part).
    
      The first commit from Aaron Lu makes ACPICA export the variable from
      which we can infer whether or not the BIOS believes that we are
      compatible with Windows 8.
    
      The second commit from Matthew Garrett prepares the ACPI video driver
      by making it initialize the ACPI backlight even if it is not going to
      be used afterward (that is needed for backlight control to work on
      Thinkpads).
    
      The third commit implements the actual workaround making i915 take
      over backlight control if the firmware thinks it's dealing with
      Windows 8 and is based on the work of multiple developers, including
      Matthew Garrett, Chun-Yi Lee, Seth Forshee, and Aaron Lu.
    
      The final commit from Aaron Lu makes us follow Windows 8 by informing
      the firmware through the _DOS method that it should not carry out
      automatic brightness changes, so that brightness can be controlled by
      GUI.
    
      Hopefully, this approach will allow us to avoid using blacklists of
      systems that should not declare Windows 8 compatibility just to avoid
      backlight control problems in the future.
    
       - Change from Aaron Lu makes ACPICA export a variable which can be
         used by driver code to determine whether or not the BIOS believes
         that we are compatible with Windows 8.
    
       - Change from Matthew Garrett makes the ACPI video driver initialize
         the ACPI backlight even if it is not going to be used afterward
         (that is needed for backlight control to work on Thinkpads).
    
       - Fix from Rafael J Wysocki implements Windows 8 backlight support
         workaround making i915 take over bakclight control if the firmware
         thinks it's dealing with Windows 8.  Based on the work of multiple
         developers including Matthew Garrett, Chun-Yi Lee, Seth Forshee,
         and Aaron Lu.
    
       - Fix from Aaron Lu makes the kernel follow Windows 8 by informing
         the firmware through the _DOS method that it should not carry out
         automatic brightness changes, so that brightness can be controlled
         by GUI"
    
    * tag 'acpi-video-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
      ACPI / video: no automatic brightness changes by win8-compatible firmware
      ACPI / video / i915: No ACPI backlight if firmware expects Windows 8
      ACPI / video: Always call acpi_video_init_brightness() on init
      ACPICA: expose OSI version
    ea45ea70