1. 02 9月, 2014 3 次提交
  2. 30 7月, 2014 1 次提交
  3. 21 7月, 2014 2 次提交
  4. 16 7月, 2014 1 次提交
  5. 15 7月, 2014 1 次提交
  6. 08 7月, 2014 2 次提交
  7. 06 6月, 2014 1 次提交
  8. 27 5月, 2014 3 次提交
  9. 20 5月, 2014 1 次提交
    • H
      ACPI / video: Add an acpi_video_unregister_backlight function · 1b7f37e1
      Hans de Goede 提交于
      Add an acpi_video_unregister_backlight function, which only unregisters
      the backlight device, and leaves the acpi_notifier in place. Some acpi_vendor
      driver need this as they don't want the acpi_video# backlight device, but do
      need the acpi-video driver for hotkey handling.
      
      Chances are that this new acpi_video_unregister_backlight() is actually
      what existing acpi_vendor drivers have wanted all along. Currently acpi_vendor
      drivers which want to disable the acpi_video# backlight device, make 2 calls:
      
      acpi_video_dmi_promote_vendor();
      acpi_video_unregister();
      
      The intention here is to make things independent of when acpi_video_register()
      gets called. As acpi_video_register() will get called on acpi-video load time
      on non intel gfx machines, while it gets called on i915 load time on intel
      gfx machines.
      
      This leads to the following 2 interesting scenarios:
      
       a) intel gfx:
        1) acpi-video module gets loaded (as it is a dependency of acpi_vendor
           and i915)
        2) acpi-video does NOT call acpi_video_register()
        3) acpi_vendor loads (lets assume it loads before i915), calls
           acpi_video_dmi_promote_vendor(); which sets
           ACPI_VIDEO_BACKLIGHT_DMI_VENDOR
        4) calls acpi_video_unregister -> not registered, nop
        5) i915 loads, calls acpi_video_register
        6) acpi_video_register registers the acpi_notifier for the hotkeys,
           does NOT register a backlight device because of
           ACPI_VIDEO_BACKLIGHT_DMI_VENDOR
      
       b) non intel gfx
        1) acpi-video module gets loaded (as it is a dependency acpi_vendor)
        2) acpi-video calls acpi_video_register()
        3) acpi_video_register registers the acpi_notifier for the hotkeys,
           and a backlight device
        4) acpi_vendor loads, calls acpi_video_dmi_promote_vendor()
        5) calls acpi_video_unregister, this unregisters BOTH the acpi_notifier
           for the hotkeys AND the backlight device
      
      So here we have possibly the same acpi_vendor module, making the same calls,
      but with different results, in one cases acpi-video does handle hotkeys,
      in the other it does not.
      
      Note that the a) scenario turns into b) if we assume the i915 module loads
      before the vendor_acpi module, so we also have different behavior depending
      on module loading order!
      
      So as said I believe that quite a few existing acpi_vendor modules really
      always want the behavior of a), hence this patch adds a new
      acpi_video_unregister_backlight() which gives the behavior of a) independent
      of module loading order.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      1b7f37e1
  10. 17 5月, 2014 1 次提交
  11. 16 5月, 2014 1 次提交
  12. 13 5月, 2014 1 次提交
  13. 07 5月, 2014 1 次提交
    • H
      ACPI / video: change acpi-video brightness_switch_enabled default to 0 · 886129a8
      Hans de Goede 提交于
      acpi-video is unique in that it not only generates brightness up/down
      keypresses, but also (sometimes) actively changes the brightness itself.
      
      This presents an inconsistent kernel interface to userspace, basically there
      are 2 different scenarios, depending on the laptop model:
      
       1) On some laptops a brightness up/down keypress means: show a brightness osd
       with the current brightness, iow it is a brightness has changed notification.
      
       2) Where as on (a lot of) other laptops it means a brightness up/down key was
       pressed, deal with it.
      
      Most of the desktop environments interpret any press as in scenario 2, and
      change the brightness up / down as a response to the key events, causing it
      to be changed twice, once by acpi-video and once by the DE.
      
      With the new default for video.use_native_backlight we will be moving even
      more laptops over to behaving as in scenario 2. Making the remaining laptops
      even more of a weird exception. Also note that it is hard to detect scenario
      1 properly in userspace, and AFAIK none of the DE-s deals with it.
      
      Therefor this commit changes the default of brightness_switch_enabled to 0
      making its behavior consistent with all the other backlight drivers.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      886129a8
  14. 06 5月, 2014 1 次提交
  15. 07 4月, 2014 1 次提交
  16. 19 3月, 2014 1 次提交
  17. 20 2月, 2014 2 次提交
  18. 07 12月, 2013 1 次提交
    • L
      ACPI: Clean up inclusions of ACPI header files · 8b48463f
      Lv Zheng 提交于
      Replace direct inclusions of <acpi/acpi.h>, <acpi/acpi_bus.h> and
      <acpi/acpi_drivers.h>, which are incorrect, with <linux/acpi.h>
      inclusions and remove some inclusions of those files that aren't
      necessary.
      
      First of all, <acpi/acpi.h>, <acpi/acpi_bus.h> and <acpi/acpi_drivers.h>
      should not be included directly from any files that are built for
      CONFIG_ACPI unset, because that generally leads to build warnings about
      undefined symbols in !CONFIG_ACPI builds.  For CONFIG_ACPI set,
      <linux/acpi.h> includes those files and for CONFIG_ACPI unset it
      provides stub ACPI symbols to be used in that case.
      
      Second, there are ordering dependencies between those files that always
      have to be met.  Namely, it is required that <acpi/acpi_bus.h> be included
      prior to <acpi/acpi_drivers.h> so that the acpi_pci_root declarations the
      latter depends on are always there.  And <acpi/acpi.h> which provides
      basic ACPICA type declarations should always be included prior to any other
      ACPI headers in CONFIG_ACPI builds.  That also is taken care of including
      <linux/acpi.h> as appropriate.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Acked-by: Bjorn Helgaas <bhelgaas@google.com> (drivers/pci stuff)
      Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> (Xen stuff)
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8b48463f
  19. 16 11月, 2013 1 次提交
  20. 07 11月, 2013 3 次提交
  21. 26 10月, 2013 1 次提交
  22. 16 10月, 2013 2 次提交
    • 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
    • A
      ACPI / video: seperate backlight control and event interface · 67b662e1
      Aaron Lu 提交于
      The backlight control and event delivery functionality provided by ACPI
      video module is mixed together and registered all during video device
      enumeration time. As a result, the two functionality are also removed
      together on module unload time or by the acpi_video_unregister function.
      The two functionalities are actually independent and one may be useful
      while the other one may be broken, so it is desirable to seperate the
      two functionalities such that it is clear and easy to disable one
      functionality without affecting the other one.
      
      APIs to selectively remove backlight control interface and/or event
      delivery functionality can be easily added once needed.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      67b662e1
  23. 23 8月, 2013 1 次提交
  24. 05 8月, 2013 1 次提交
    • F
      ACPI / video: improve quirk check in acpi_video_bqc_quirk() · b3b301c5
      Felipe Contreras 提交于
      If the _BCL package ordering is descending, the first level
      (br->levels[2]) is likely to be 0, and if the number of levels
      matches the number of steps, we might confuse a returned level to
      mean the index.
      
      For example:
      
        current_level = max_level = 100
        test_level = 0
        returned level = 100
      
      In this case 100 means the level, not the index, and _BCM failed.
      Still, if the _BCL package ordering is descending, the index of
      level 0 is also 100, so we assume _BQC is indexed, when it's not.
      
      This causes all _BQC calls to return bogus values causing weird
      behavior from the user's perspective.  For example:
      
      xbacklight -set 10; xbacklight -set 20;
      
      would flash to 90% and then slowly down to the desired level (20).
      
      The solution is simple; test anything other than the first level
      (e.g. 1).
      
      [rjw: Changelog]
      Signed-off-by: NFelipe Contreras <felipe.contreras@gmail.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      b3b301c5
  25. 04 8月, 2013 4 次提交
  26. 26 7月, 2013 1 次提交
  27. 19 7月, 2013 1 次提交