1. 02 11月, 2015 1 次提交
  2. 26 10月, 2015 1 次提交
  3. 14 8月, 2015 1 次提交
    • H
      ACPI / video: Fix circular lock dependency issue in the video-detect code · 7231ed1a
      Hans de Goede 提交于
      Before this commit, the following would happen:
      
       a) acpi_video_get_backlight_type() gets called
       b) acpi_video_get_backlight_type() calls acpi_video_init_backlight_type()
       c) acpi_video_init_backlight_type() locks its function static init_mutex
       d) acpi_video_init_backlight_type() calls backlight_register_notifier()
       e) backlight_register_notifier() takes its notifier-chain lock
      
      And when the backlight notifier chain gets called we've:
      
       1) blocking_notifier_call_chain() gets called
       2) blocking_notifier_call_chain() takes the notifier-chain lock
       3) blocking_notifier_call_chain() calls acpi_video_backlight_notify()
       4) acpi_video_backlight_notify() calls acpi_video_get_backlight_type()
       5) acpi_video_get_backlight_type() calls acpi_video_init_backlight_type()
       6) acpi_video_init_backlight_type() locks its function static init_mutex
      
      So in the first call sequence we have:
      
       a) init_mutex gets locked
       b) notifier-chain gets locked
      
      and in the second call sequence we have:
      
       1) notifier-chain gets locked
       2) init_mutex gets locked
      
      And we've a circular locking dependency. This specific locking dependency
      is fixable without using the big hammer otherwise known as a workqueue,
      but further analysis shows a similar problem with the backlight notifier
      chain lock vs register_count_mutex from drivers/acpi/acpi_video.c,
      and fixing that becomes problematic.
      
      So this commit simply fixes this with the big hammer, performance
      wise this is a non issue as we expect the work to get scheduled
      exactly zero or one times during normal system use.
      
      Fixes: 93a291df (ACPI / video: Move backlight notifier to video_detect.c)
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reported-and-tested-by: NSedat Dilek <sedat.dilek@gmail.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7231ed1a
  4. 19 6月, 2015 11 次提交
  5. 15 6月, 2015 1 次提交
  6. 23 3月, 2015 1 次提交
  7. 25 9月, 2014 1 次提交
  8. 08 7月, 2014 1 次提交
  9. 19 3月, 2014 1 次提交
  10. 20 2月, 2014 1 次提交
  11. 05 2月, 2014 1 次提交
  12. 20 12月, 2013 1 次提交
  13. 16 10月, 2013 2 次提交
    • L
      ACPI / video: Add Lenovo IdeaPad Yoga 13 to acpi video detect blacklist · a8d52f44
      Lennart Poettering 提交于
      On the Yoga 13 the backlight control doesn't work via ACPI. (And doesn't
      work either with the low-level platform driver ideapad_laptop; but
      works correctly via the intel video driver).  This patch hence adds the
      Yoga 13 to the ACPI video detect blacklist, to make sure the broken ACPI
      backlight device is never exposed to userspace.
      
      Note that this appears unrelated to the Windows 8 backlight issues tracked
      here:
      
      https://bugzilla.kernel.org/show_bug.cgi?id=51231
      https://bugzilla.kernel.org/show_bug.cgi?id=60682
      
      The Yoga's ACPI backlight controls work neither with nor without
      acpi_osi="!Windows 2012" on the kernel command line. It appears that
      backlight control via the EC simply is not available at all, regardless
      whether done via ACPI or via the vendor driver.
      Signed-off-by: NLennart Poettering <lennart@poettering.net>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a8d52f44
    • A
      ACPI / video: Do not register backlight if win8 and native interface exists · fbc9fe1b
      Aaron Lu 提交于
      According to Matthew Garrett, "Windows 8 leaves backlight control up
      to individual graphics drivers rather than making ACPI calls itself.
      There's plenty of evidence to suggest that the Intel driver for
      Windows [8] doesn't use the ACPI interface, including the fact that
      it's broken on a bunch of machines when the OS claims to support
      Windows 8.  The simplest thing to do appears to be to disable the
      ACPI backlight interface on these systems".
      
      So for Win8 systems, if there is native backlight control interface
      registered by GPU driver, ACPI video does not need to register its own.
      Since there are systems that don't work well with this approach, a
      parameter for video module named use_native_backlight is introduced and
      has the value of false by default. For users who have a broken ACPI
      video backlight interface, video.use_native_backlight=1 is needed in
      kernel cmdline.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fbc9fe1b
  14. 26 7月, 2013 1 次提交
  15. 18 7月, 2013 1 次提交
    • R
      ACPI / video / i915: No ACPI backlight if firmware expects Windows 8 · 8c5bd7ad
      Rafael J. Wysocki 提交于
      According to Matthew Garrett, "Windows 8 leaves backlight control up
      to individual graphics drivers rather than making ACPI calls itself.
      There's plenty of evidence to suggest that the Intel driver for
      Windows [8] doesn't use the ACPI interface, including the fact that
      it's broken on a bunch of machines when the OS claims to support
      Windows 8.  The simplest thing to do appears to be to disable the
      ACPI backlight interface on these systems".
      
      There's a problem with that approach, however, because simply
      avoiding to register the ACPI backlight interface if the firmware
      calls _OSI for Windows 8 may not work in the following situations:
       (1) The ACPI backlight interface actually works on the given system
           and the i915 driver is not loaded (e.g. another graphics driver
           is used).
       (2) The ACPI backlight interface doesn't work on the given system,
           but there is a vendor platform driver that will register its
           own, equally broken, backlight interface if not prevented from
           doing so by the ACPI subsystem.
      Therefore we need to allow the ACPI backlight interface to be
      registered until the i915 driver is loaded which then will unregister
      it if the firmware has called _OSI for Windows 8 (or will register
      the ACPI video driver without backlight support if not already
      present).
      
      For this reason, introduce an alternative function for registering
      ACPI video, acpi_video_register_with_quirks(), that will check
      whether or not the ACPI video driver has already been registered
      and whether or not the backlight Windows 8 quirk has to be applied.
      If the quirk has to be applied, it will block the ACPI backlight
      support and either unregister the backlight interface if the ACPI
      video driver has already been registered, or register the ACPI
      video driver without the backlight interface otherwise.  Make
      the i915 driver use acpi_video_register_with_quirks() instead of
      acpi_video_register() in i915_driver_load().
      
      This change is based on earlier patches from Matthew Garrett,
      Chun-Yi Lee and Seth Forshee and includes a fix from Aaron Lu's.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=51231Tested-by: NAaron Lu <aaron.lu@intel.com>
      Tested-by: NIgor Gnatenko <i.gnatenko.brain@gmail.com>
      Tested-by: NYves-Alexis Perez <corsac@debian.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: NAaron Lu <aaron.lu@intel.com>
      Acked-by: NMatthew Garrett <matthew.garrett@nebula.com>
      8c5bd7ad
  16. 15 7月, 2013 1 次提交
  17. 23 5月, 2013 1 次提交
  18. 25 3月, 2013 1 次提交
  19. 30 11月, 2012 1 次提交
  20. 28 7月, 2012 2 次提交
  21. 21 3月, 2012 1 次提交
  22. 01 11月, 2011 1 次提交
  23. 12 2月, 2011 1 次提交
    • M
      ACPI / Video: Probe for output switch method when searching video devices. · ed764e7c
      Michael Karcher 提交于
      This patch reverts one hunk of 677bd810
      "ACPI video: remove output switching control", namely the removal of
      probing for _DOS/_DOD when searching for video devices.
      
      This is needed on some Fujitsu Laptops (at least S7110, P8010) for the
      ACPI backlight interface to work, as an these machines, neither ROM nor
      posting methods are available, and after removal of output switching,
      none of the caps triggers, which prevents the backlight search from
      being entered.
      
      Tested on a Fujitsu Lifebook S7110 and Fujitsu Lifebook P8010.
      This probably fixes https://bugzilla.kernel.org/show_bug.cgi?id=27312
      for the people who have no entry in /sys/class/backlight.
      
      This is the complete list of public (starting with "_") methods implemented
      on the S7110, BIOS rev 1.34:
      
      \_SB_.PCI0.GFX0._ADR
      \_SB_.PCI0.GFX0._DOS
      \_SB_.PCI0.GFX0._DOD
      \_SB_.PCI0.GFX0.CRT._ADR
      \_SB_.PCI0.GFX0.CRT._DCS
      \_SB_.PCI0.GFX0.CRT._DGS
      \_SB_.PCI0.GFX0.CRT._DSS
      \_SB_.PCI0.GFX0.LCD._ADR
      \_SB_.PCI0.GFX0.LCD._BCL
      \_SB_.PCI0.GFX0.LCD._BCM
      \_SB_.PCI0.GFX0.LCD._BQC
      \_SB_.PCI0.GFX0.LCD._DCS
      \_SB_.PCI0.GFX0.LCD._DGS
      \_SB_.PCI0.GFX0.LCD._DSS
      \_SB_.PCI0.GFX0.LCD._PS0
      \_SB_.PCI0.GFX0.LCD._PS3
      \_SB_.PCI0.GFX0.TV._ADR
      \_SB_.PCI0.GFX0.TV._DCS
      \_SB_.PCI0.GFX0.TV._DGS
      \_SB_.PCI0.GFX0.TV._DSS
      \_SB_.PCI0.GFX0.DVI._ADR
      \_SB_.PCI0.GFX0.DVI._DCS
      \_SB_.PCI0.GFX0.DVI._DGS
      \_SB_.PCI0.GFX0.DVI._DSS
      Signed-off-by: NMichael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
      Acked-by: NZhang Rui <rui.zhang@intel.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      ed764e7c
  24. 14 12月, 2010 1 次提交
  25. 29 9月, 2010 1 次提交
  26. 20 5月, 2010 1 次提交
  27. 04 12月, 2009 1 次提交
  28. 25 11月, 2009 1 次提交