1. 09 8月, 2013 2 次提交
    • J
      Revert "HID: hid-logitech-dj: querying_devices was never set" · 8e5654ce
      Jiri Kosina 提交于
      This reverts commit 407a2c2a.
      
      Explanation provided by Benjamin Tissoires:
      
      Commit "HID: hid-logitech-dj, querying_devices was never set" activate
      a flag which guarantees that we do not ask the receiver for too many
      enumeration. When the flag is set, each following enumeration call is
      discarded (the usb request is not forwarded to the receiver). The flag
      is then released when the driver receive a pairing information event,
      which normally follows the enumeration request.
      However, the USB3 bug makes the driver think the enumeration request
      has been forwarded to the receiver. However, it is actually not the
      case because the USB stack returns -EPIPE. So, when a new unknown
      device appears, the workaround consisting in asking for a new
      enumeration is not working anymore: this new enumeration is discarded
      because of the flag, which is never reset.
      
      A solution could be to trigger a timeout before releasing it, but for
      now, let's just revert the patch.
      Reported-by: NBenjamin Tissoires <benjamin.tissoires@gmail.com>
      Tested-by: NSune Mølgaard <sune@molgaard.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      8e5654ce
    • C
      hwmon: (adt7470) Fix incorrect return code check · 93d783bc
      Curt Brune 提交于
      In adt7470_write_word_data(), which writes two bytes using
      i2c_smbus_write_byte_data(), the return codes are incorrectly AND-ed
      together when they should be OR-ed together.
      
      The return code of i2c_smbus_write_byte_data() is zero for success.
      
      The upshot is only the first byte was ever written to the hardware.
      The 2nd byte was never written out.
      
      I noticed that trying to set the fan speed limits was not working
      correctly on my system.  Setting the fan speed limits is the only
      code that uses adt7470_write_word_data().  After making the change
      the limit settings work and the alarms work also.
      Signed-off-by: NCurt Brune <curt@cumulusnetworks.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      93d783bc
  2. 08 8月, 2013 21 次提交
  3. 07 8月, 2013 8 次提交
    • J
      drm/i915: do not disable backlight on vgaswitcheroo switch off · 3f577573
      Jani Nikula 提交于
      On muxed systems, the other vgaswitcheroo client may depend on i915 to
      handle the backlight. We began switching off the backlight since
      
      commit a261b246
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Jul 26 19:21:47 2012 +0200
      
          drm/i915: disable all crtcs at suspend time
      
      breaking backlight on discreet graphics in (some) muxed systems.
      
      Keep the backlight on when the state is changed through vgaswitcheroo.
      
      Note: The alternative would be to add a quirk table to achieve the same
      based on system identifiers, but AFAICS it would asymptotically approach
      effectively the same as this patch as more IDs are added, but with the
      maintenance burden of the quirk table.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=55311Tested-by: NFede <fedevx@yahoo.com>
      Tested-by: NAximab <laurent.debian@gmail.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59785Tested-by: Nsfievet <sebastien.fievet@free.fr>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3f577573
    • V
      drm/i915: Don't call encoder's get_config unless encoder is active · 3eaba51c
      Ville Syrjälä 提交于
      The SDVO code tries to compare the encoder's and crtc's idea of the
      pixel_multiplier. Normally they have to match, but when transitioning
      to DPMS off, we turn off the pipe before reading out the pipe_config,
      so the pixel_multiplier in the pipe_config will be 0, whereas the
      encoder will still have its pixel_multiplier set to whatever value we
      were using when the display was active. This leads to a warning
      from intel_modeset_check_state().
      
      WARNING: CPU: 1 PID: 2846 at drivers/gpu/drm/i915/intel_sdvo.c:1378 intel_sdvo_get_config+0x158/0x160()
      SDVO pixel multiplier mismatch, port: 0, encoder: 1
      Modules linked in: snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep
      CPU: 1 PID: 2846 Comm: Xorg Not tainted 3.11.0-rc3-00208-gbe1e8d7-dirty #19
      Hardware name: Apple Computer, Inc. Macmini1,1/Mac-F4208EC8, BIOS  MM11.88Z.0055.B03.0604071521 04/07/06
       00000000 00000000 ef0afa54 c1597bbb c1737ea4 ef0afa84 c10392ca c1737e6c
       ef0afab0 00000b1e c1737ea4 00000562 c12dfbe8 c12dfbe8 ef0afb14 00000000
       f697ec00 ef0afa9c c103936e 00000009 ef0afa94 c1737e6c ef0afab0 ef0afadc
      Call Trace:
       [<c1597bbb>] dump_stack+0x41/0x56
       [<c10392ca>] warn_slowpath_common+0x7a/0xa0
       [<c103936e>] warn_slowpath_fmt+0x2e/0x30
       [<c12dfbe8>] intel_sdvo_get_config+0x158/0x160
       [<c12c3220>] check_crtc_state+0x1e0/0xb10
       [<c12cdc7d>] intel_modeset_check_state+0x29d/0x7c0
       [<c12dfe5c>] intel_sdvo_dpms+0x5c/0xa0
       [<c12985de>] drm_mode_obj_set_property_ioctl+0x40e/0x420
       [<c1298625>] drm_mode_connector_property_set_ioctl+0x35/0x40
       [<c1289294>] drm_ioctl+0x3e4/0x540
       [<c10fc1a2>] do_vfs_ioctl+0x72/0x570
       [<c10fc72f>] SyS_ioctl+0x8f/0xa0
       [<c159b7fa>] sysenter_do_call+0x12/0x22
      ---[ end trace 7ce940aff1366d60 ]---
      
      Fix the problem by skipping the encoder get_config() function for
      inactive encoders.
      Tested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3eaba51c
    • A
      drm/i915: avoid brightness overflow when doing scale · 22505b82
      Aaron Lu 提交于
      Some card's max brightness level is pretty large, e.g. on Acer Aspire
      4732Z, the max level is 989910. If user space set a large enough level
      then the current scale done in intel_panel_set_backlight will cause an
      integer overflow and the scaled level will be mistakenly small, leaving
      user with an almost black screen. This patch fixes this problem.
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      [danvet: Add a comment to explain what's going on.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      22505b82
    • P
      drm/i915: update last_vblank when disabling the power well · 9dbd8feb
      Paulo Zanoni 提交于
      The DRM layer keeps track of our vblanks and it assumes our vblank
      counters only go back to zero when they overflow. The problem is that
      when we disable the power well our counters also go to zero, but it
      doesn't mean they did overflow. So on this patch we grab the lock and
      update last_vblank so the DRM layer won't think our counters
      overflowed.
      
      This patch fixes the following intel-gpu-tools test:
      ./kms_flip --run-subtest blocking-absolute-wf_vblank
      
      Regression introduced by the following commit:
      
      commit bf51d5e2
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Wed Jul 3 17:12:13 2013 -0300
          drm/i915: switch disable_power_well default value to 1
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66808Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Added a comment that this might be better done in
      drm_vblank_post_modeset in general.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9dbd8feb
    • D
      drm/i915: fix gen4 digital port hotplug definitions · 0ce99f74
      Daniel Vetter 提交于
      Apparently Bspec is wrong in this case here even for gm45. Note that
      Bspec is horribly misguided on i965g/gm, so we don't have any other
      data points besides that it seems to make machines work better.
      
      With this changes all the bits in PORT_HOTPLUG_STAT for the digital
      ports are ordered the same way. This seems to agree with what register
      dumps from the hpd storm handling code shows, where the LIVE bit and
      the short/long pulse STATUS bits light up at the same time with this
      enumeration (but no with the one from Bspec).
      
      Also tested on my gm45 which has two DP+ ports, and everything seems
      to still work as expected.
      
      References: http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg23054.html
      Cc: Egbert Eich <eich@suse.com>
      Cc: Jan Niggemann <jn@hz6.de>
      Tested-by: NJan Niggemann <jn@hz6.de>
      [danvet: Add a big warning that Bspec seems to be wrong for these
      bits, suggested by Jani.]
      Acked-by: NJani Nikula <jani.nikula@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0ce99f74
    • D
      drm/ast: invalidate page tables when pinning a BO · 3ac65259
      Dave Airlie 提交于
      same fix as cirrus and mgag200.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3ac65259
    • E
      drm/mgag200: Invalidate page tables when pinning a BO · ecaac1c8
      Egbert Eich 提交于
      When a BO gets pinned the placement may get changed. If the memory is
      mapped into user space and user space has already accessed the mapped
      range the page tables are set up but now point to the wrong memory.
      Set bo.mdev->dev_mapping in mgag200_bo_create() to make sure that
      ttm_bo_unmap_virtual() called from ttm_bo_handle_move_mem() will take
      care of this.
      
      v2: Don't call ttm_bo_unmap_virtual() in mgag200_bo_pin(), fix comment.
      Signed-off-by: NEgbert Eich <eich@suse.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ecaac1c8
    • M
      drm/cirrus: Invalidate page tables when pinning a BO · 109a5159
      Michal Srb 提交于
      This is a cirrus version of Egbert Eich's patch for mgag200.
      
      Without bo.bdev->dev_mapping set, the ttm_bo_unmap_virtual_locked
      called from ttm_bo_handle_move_mem returns with no effect. If any
      application accessed the memory before it was moved, it will
      access wrong memory next time. This causes crashes when changing
      resolution down.
      Signed-off-by: NMichal Srb <msrb@suse.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      109a5159
  4. 06 8月, 2013 2 次提交
    • R
      ACPI: Drop physical_node_id_bitmap from struct acpi_device · 007ccfcf
      Rafael J. Wysocki 提交于
      The physical_node_id_bitmap in struct acpi_device is only used for
      looking up the first currently unused dependent phyiscal node ID
      by acpi_bind_one().  It is not really necessary, however, because
      acpi_bind_one() walks the entire physical_node_list of the given
      device object for sanity checking anyway and if that list is always
      sorted by node_id, it is straightforward to find the first gap
      between the currently used node IDs and use that number as the ID
      of the new list node.
      
      This also removes the artificial limit of the maximum number of
      dependent physical devices per ACPI device object, which now depends
      only on the capacity of unsigend int.  As a result, it fixes a
      regression introduced by commit e2ff3940 (ACPI / memhotplug: Bind
      removable memory blocks to ACPI device nodes) that caused
      acpi_memory_enable_device() to fail when the number of 128 MB blocks
      within one removable memory module was greater than 32.
      Reported-and-tested-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NToshi Kani <toshi.kani@hp.com>
      Reviewed-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      007ccfcf
    • R
      ACPI / PM: Walk physical_node_list under physical_node_lock · 623cf33c
      Rafael J. Wysocki 提交于
      The list of physical devices corresponding to an ACPI device
      object is walked by acpi_system_wakeup_device_seq_show() and
      physical_device_enable_wakeup() without taking that object's
      physical_node_lock mutex.  Since each of those functions may be
      run at any time as a result of a user space action, the lack of
      appropriate locking in them may lead to a kernel crash if that
      happens during device hot-add or hot-remove involving the device
      object in question.
      
      Fix the issue by modifying acpi_system_wakeup_device_seq_show() and
      physical_device_enable_wakeup() to use physical_node_lock as
      appropriate.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Cc: All <stable@vger.kernel.org>
      623cf33c
  5. 05 8月, 2013 2 次提交
    • L
      regmap: cache: Make sure to sync the last register in a block · 2d49b598
      Lars-Peter Clausen 提交于
      regcache_sync_block_raw_flush() expects the address of the register after last
      register that needs to be synced as its parameter. But the last call to
      regcache_sync_block_raw_flush() in regcache_sync_block_raw() passes the address
      of the last register in the block. This effectively always skips over the last
      register in a block, even if it needs to be synced. In order to fix it increase
      the address by one register.
      
      The issue was introduced in commit 75a5f89f ("regmap: cache: Write consecutive
      registers in a single block write").
      
      Cc: stable@vger.kernel.org # 3.10+
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      2d49b598
    • 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
  6. 04 8月, 2013 5 次提交