1. 31 Jan, 2018 2 commits
    • Vadim Pasternak's avatar
      platform/x86: Move Mellanox platform hotplug driver to platform/mellanox · 1f976f69
      Vadim Pasternak authored
      In preparation for making the hotplug driver build for different
      architectures, move mlxcpld-hotplug.c to platform/mellanox and the
      header to include/linux/platform_data as mlxreg.h to reflect the new
      interface changes to come.
      
      Replace references to CPLD with REG throughout the files, consistent
      with the new name.
      Signed-off-by: default avatarVadim Pasternak <vadimp@mellanox.com>
      Acked-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      [dvhart: update copyright, rewrite commit message]
      Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
      1f976f69
    • Lukas Wunner's avatar
      Revert "apple-gmux: lock iGP IO to protect from vgaarb changes" · d6fa7588
      Lukas Wunner authored
      Commit 4eebd5a4 ("apple-gmux: lock iGP IO to protect from vgaarb
      changes") amended this driver's ->probe hook to lock decoding of normal
      (non-legacy) I/O space accesses to the integrated GPU on dual-GPU
      MacBook Pros.  The lock stays in place until the driver is unbound.
      
      The change was made to work around an issue with the out-of-tree nvidia
      graphics driver (available at http://www.nvidia.com/object/unix.html).
      It contains the following sequence in nvidia/nv.c:
      
      	#if defined(CONFIG_VGA_ARB) && !defined(NVCPU_PPC64LE)
      	#if defined(VGA_DEFAULT_DEVICE)
      	    vga_tryget(VGA_DEFAULT_DEVICE, VGA_RSRC_LEGACY_MASK);
      	#endif
      	    vga_set_legacy_decoding(dev, VGA_RSRC_NONE);
      	#endif
      
      This code was reported to cause deadlocks with VFIO already in 2013:
      https://devtalk.nvidia.com/default/topic/545560
      
      I've reported the issue to Nvidia developers once more in 2017:
      https://www.spinics.net/lists/dri-devel/msg138754.html
      
      On the MacBookPro10,1, this code apparently breaks backlight control
      (which is handled by apple-gmux via an I/O region starting at 0x700),
      as reported by Petri Hodju:
      https://bugzilla.kernel.org/show_bug.cgi?id=86121
      
      I tried to replicate Petri's observations on my MacBook9,1, which uses
      the same Intel Ivy Bridge + Nvidia GeForce GT 650M architecture, to no
      avail.  On my machine apple-gmux' I/O region remains accessible even
      with the nvidia driver loaded and commit 4eebd5a4 reverted.
      Petri reported that apple-gmux becomes accessible again after a
      suspend/resume cycle because the BIOS changed the VGA routing on the
      root port to the Nvidia GPU.  Perhaps this is a BIOS issue after all
      that can be fixed with an update?
      
      In any case, the change made by commit 4eebd5a4 has turned out to
      cause two new issues:
      
      * Wilfried Klaebe reports a deadlock when launching Xorg because it
        opens /dev/vga_arbiter and calls vga_get(), but apple-gmux is holding
        a lock on I/O space indefinitely.  It looks like apple-gmux' current
        behavior is an abuse of the vgaarb API as locks are not meant to be
        held for longer periods:
        https://bugzilla.kernel.org/show_bug.cgi?id=88861#c11
        https://bugzilla.kernel.org/attachment.cgi?id=217541
      
      * On dual GPU MacBook Pros introduced since 2013, the integrated GPU is
        powergated on boot und thus becomes invisible to Linux unless a custom
        EFI protocol is used to leave it powered on.  (A patch exists but is
        not in mainline yet due to several negative side effects.)  On these
        machines, locking I/O to the integrated GPU (as done by 4eebd5a4)
        fails and backlight control is therefore broken:
        https://bugzilla.kernel.org/show_bug.cgi?id=105051
      
      So let's revert commit 4eebd5a4 please.  Users experiencing the
      issue with the proprietary nvidia driver can comment out the above-
      quoted problematic code as a workaround (or try updating the BIOS).
      
      Cc: Petri Hodju <petrihodju@yahoo.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Bruno Prémont <bonbons@linux-vserver.org>
      Cc: Andy Ritger <aritger@nvidia.com>
      Cc: Ronald Tschalär <ronald@innovation.ch>
      Tested-by: default avatarWilfried Klaebe <linux-kernel@lebenslange-mailadresse.de>
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
      d6fa7588
  2. 29 Jan, 2018 7 commits
  3. 26 Jan, 2018 1 commit
  4. 25 Jan, 2018 1 commit
  5. 24 Jan, 2018 1 commit
  6. 20 Jan, 2018 1 commit
  7. 16 Jan, 2018 7 commits
  8. 15 Jan, 2018 1 commit
  9. 08 Jan, 2018 1 commit
  10. 06 Jan, 2018 1 commit
  11. 02 Jan, 2018 1 commit
  12. 28 Dec, 2017 2 commits
  13. 21 Dec, 2017 8 commits
  14. 12 Dec, 2017 6 commits