1. 13 Dec, 2013 2 commits
    • Paulo Zanoni's avatar
      drm/i915: get a PC8 reference when enabling the power well · be3d26b0
      Paulo Zanoni authored
      In the current code, at haswell_modeset_global_resources, first we
      decide if we want to enable/disable the power well, then we decide if
      we want to enable/disable PC8. On the case where we're enabling PC8
      this works fine, but on the case where we disable PC8 due to a non-eDP
      monitor being enabled, we first enable the power well and then disable
      PC8. Although wrong, this doesn't seem to be causing any problems now,
      and we don't even see anything in dmesg. But the patches for runtime
      D3 turn this problem into a real bug, so we need to fix it.
      
      This fixes the "modeset-non-lpsp" subtest from the "pm_pc8" test from
      intel-gpu-tools.
      
      v2: - Rebase (i915_disable_power_well).
      v3: - More reabase.
      v4: - Rebase on top of -fixes instead of -nightly.
      
      This is commit d62292c8 in -next, but
      we need it in -fixes to address Dave's report.
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      be3d26b0
    • Paulo Zanoni's avatar
      drm/i915: change CRTC assertion on LCPLL disable · 96b40268
      Paulo Zanoni authored
      Currently, PC8 is enabled at modeset_global_resources, which is called
      after intel_modeset_update_state. Due to this, there's a small race
      condition on the case where we start enabling PC8, then do a modeset
      while PC8 is still being enabled. The racing condition triggers a WARN
      because intel_modeset_update_state will mark the CRTC as enabled, then
      the thread that's still enabling PC8 might look at the data structure
      and think that PC8 is being enabled while a pipe is enabled. Despite
      the WARN, this is not really a bug since we'll wait for the
      PC8-enabling thread to finish when we call modeset_global_resources.
      
      The spec says the CRTC cannot be enabled when we disable LCPLL, so we
      had a check for crtc->base.enabled. If we change to crtc->active we
      will still prevent disabling LCPLL while the CRTC is enabled, and we
      will also prevent the WARN above.
      
      This is a replacement for the previous patch named
          "drm/i915: get/put PC8 when we get/put a CRTC"
      
      Testcase: igt/pm_pc8/modeset-lpsp-stress-no-wait
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      (cherry picked from commit 798183c5
      from -next due to Dave's report.)
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      96b40268
  2. 12 Dec, 2013 5 commits
    • Chris Wilson's avatar
      drm/i915: Fix erroneous dereference of batch_obj inside reset_status · 4db080f9
      Chris Wilson authored
      As the rings may be processed and their requests deallocated in a
      different order to the natural retirement during a reset,
      
      /* Whilst this request exists, batch_obj will be on the
       * active_list, and so will hold the active reference. Only when this
       * request is retired will the the batch_obj be moved onto the
       * inactive_list and lose its active reference. Hence we do not need
       * to explicitly hold another reference here.
       */
      
      is violated, and the batch_obj may be dereferenced after it had been
      freed on another ring. This can be simply avoided by processing the
      status update prior to deallocating any requests.
      
      Fixes regression (a possible OOPS following a GPU hang) from
      commit aa60c664
      Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Date:   Wed Jun 12 15:13:20 2013 +0300
      
          drm/i915: find guilty batch buffer on ring resets
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      [danvet: Add the code comment Chris supplied.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      4db080f9
    • Chris Wilson's avatar
      drm/i915: Prevent double unref following alloc failure during execbuffer · 9ae9ab52
      Chris Wilson authored
      Whilst looking up the objects required for an execbuffer, an untimely
      allocation failure in creating the vma results in the object being
      unreferenced from two lists. The ownership during the lookup is meant to
      be moved from the list of objects being looked to the vma, and this
      double unreference upon error results in a use-after-free.
      
      Fixes regression from
      commit 27173f1f
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Wed Aug 14 11:38:36 2013 +0200
      
          drm/i915: Convert execbuf code to use vmas
      
      Based on the fix by Ben Widawsky.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Cc: stable@vger.kernel.org
      [danvet: Bikeshed the crucial comment above the ownership transfer as
      discussed on irc.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      9ae9ab52
    • Dave Airlie's avatar
      Merge branch 'drm-tda998x-3.12-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox into drm-fixes · 5c015db7
      Dave Airlie authored
      These four patches fix a few issues discovered since the initial merge,
      which have been reviewed by Rob Clark and Thierry Reding.
      
      * 'drm-tda998x-3.12-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox:
        DRM: Armada: prime refcounting bug fix
        DRM: Armada: fix printing of phys_addr_t/dma_addr_t
        DRM: Armada: destroy framebuffer after helper
        DRM: Armada: implement lastclose() for fbhelper
      5c015db7
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2013-12-11' of... · 25945b66
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2013-12-11' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes
      
      Just a bunch of regression fixes plus a few patches for long-standing
      issues in gem corner-cases that we've hunted down in the past weeks. Since
      apparently people hit those in the wild (and we also have nice igts for
      them) I've opted for -fixes and cc: stable.
      
      There's 1-2 things oustanding on top of this where I'm still waiting on
      confirmation from testing, but nothing really scary.
      
      * tag 'drm-intel-fixes-2013-12-11' of git://people.freedesktop.org/~danvet/drm-intel:
        drm/i915: don't update the dri1 breadcrumb with modesetting
        drm/i915: Repeat eviction search after idling the GPU
        drm/i915: Fix use-after-free in do_switch
        drm/i915: fix pm init ordering
        drm/i915: Hold mutex across i915_gem_release
        drm/i915: Skip clock checks on BDW
        drm/i915: Do not clobber config status after a forced restore of hw state
        drm/i915: Take modeset locks around intel_modeset_setup_hw_state()
      25945b66
    • Dave Airlie's avatar
      Merge branch 'bdw-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes · 62a3a126
      Dave Airlie authored
      As promised bdw fixes come separate for now. Just a few minior things.
      
      * 'bdw-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
        drm/i915/bdw: PIPE_[BC] I[ME]R moved to powerwell
        drm/i915/bdw: Limit GTT to 2GB
        drm/i915/bdw: Add comment about gen8 HWS PGA
        drm/i915/bdw: Free correct number of ppgtt pages
        drm/i915/bdw: Do gen6 style reset for gen8
        drm/i915/bdw: GEN8 backlight support
        drm/i915/bdw: Add BDW to ULT macro
      62a3a126
  3. 11 Dec, 2013 1 commit
    • Daniel Vetter's avatar
      drm/i915: don't update the dri1 breadcrumb with modesetting · 6c719fac
      Daniel Vetter authored
      The update is horribly racy since it doesn't protect at all against
      concurrent closing of the master fd. And it can't really since that
      requires us to grab a mutex.
      
      Instead of jumping through hoops and offloading this to a worker
      thread just block this bit of code for the modesetting driver.
      
      Note that the race is fairly easy to hit since we call the breadcrumb
      function for any interrupt. So the vblank interrupt (which usually
      keeps going for a bit) is enough. But even if we'd block this and only
      update the breadcrumb for user interrupts from the CS we could hit
      this race with kms/gem userspace: If a non-master is waiting somewhere
      (and hence has interrupts enabled) and the master closes its fd
      (probably due to crashing).
      
      v2: Add a code comment to explain why fixing this for real isn't
      really worth it. Also improve the commit message a bit.
      
      v3: Fix the spelling in the comment.
      Reported-by: default avatarEugene Shatokhin <eugene.shatokhin@rosalab.ru>
      Cc: Eugene Shatokhin <eugene.shatokhin@rosalab.ru>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Tested-by: default avatarEugene Shatokhin <eugene.shatokhin@rosalab.ru>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      6c719fac
  4. 10 Dec, 2013 26 commits
  5. 09 Dec, 2013 6 commits
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 78fd8223
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "This is probably a bit big, but just because I fell behind last week
        and didn't get to doing any pulls, so stuff backed up behind me, I
        actually should have sent this for -rc3 but failed to even manage
        that.
      
        So this has radeon, intel, nouveau, vmware, exynos and tegra fixes in
        it, and the line count isn't all the bad in the end"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (50 commits)
        drm: fix the addition of the side-by-side (half) flag for extra 3D modes
        drm/edid: fix length check when adding extra 3D modes
        drm/radeon/atom: fix bus probes when hw_i2c is set (v2)
        drm/radeon: fix null pointer dereference in dce6+ audio code
        drm/radeon: fixup bad vram size on SI
        udl: fix issue with imported prime buffers
        drm/vmwgfx: Add our connectors to sysfs
        drm/vmwgfx: Fix dma buffer memory size accounting
        drm/vmwgfx: Fix up and comment the dumb buffer implementation
        drm/vmwgfx: Correctly set the enabled state on crtcs
        drm/nv50/disp: min/max are reversed in nv50_crtc_gamma_set()
        drm/nouveau/sw: fix oops if gpu has its display block disabled
        drm/nouveau: unreference fence after syncing
        drm/nouveau/kms: send timestamp data for correct head in flip completion events
        drm/nouveau/clk: Add support for NVAA/NVAC
        drm/nouveau/fifo: Hook up pause and resume for NV50 and NV84+
        drm/nv10/plane: some chipsets don't support NV12
        drm/nv10/plane: add downscaling restrictions
        drm/nv10/plane: fix format computation
        drm/nv04-nv30/clk: provide an empty domain list
        ...
      78fd8223
    • Linus Torvalds's avatar
      Merge tag 'mfd-fixes-3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes · 32ac4869
      Linus Torvalds authored
      Pull mfd fixes from Samuel Ortiz:
       "This is the first 3.13 pull request for MFD fixes.  We have:
      
         - A ti-ssp build failure fix
         - An as3722 build failure fix
         - An lpc_ich copy paste error fix"
      
      * tag 'mfd-fixes-3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-fixes:
        mfd: lpc_ich: Fix Wildcat Point info name field
        mfd: ti-ssp: Fix build
        mfd: Make MFD_AS3722 depend on I2C=y
      32ac4869
    • Linus Torvalds's avatar
      Merge tag 'pm-3.13-rc3-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 77bd2adb
      Linus Torvalds authored
      Pull power management fixup from Rafael Wysocki:
       "This reverts two cpufreq commits that fixed issues for some people,
        but broke things for others, so revert them and we'll need to fix the
        original problems differently"
      
      * tag 'pm-3.13-rc3-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        Revert "cpufreq: fix garbage kobjects on errors during suspend/resume"
        Revert "cpufreq: suspend governors on system suspend/hibernate"
      77bd2adb
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 754ac457
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
       "An update to ALPS to support devices on Dell XT2 (hopefully working
        better this time around and although it is largish it should not
        affect any other ALPS devices) and a tiny update to Elantech driver to
        support newer devices as well.
      
        Also a coupe of new input event codes have been defined"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: ALPS - add support for DualPoint device on Dell XT2 model
        Input: elantech - add support for newer (August 2013) devices
        Input: add SW_MUTE_DEVICE switch definition
        Input: usbtouchscreen - separate report and transmit buffer size handling
        Input: sur40 - suppress false uninitialized variable warning
        Input: add key code for ambient light sensor button
        Input: keyboard - "keycode & KEY_MAX" changes some keycode values
      754ac457
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · b6db4eb0
      Linus Torvalds authored
      Pull crypto fix from Herbert Xu:
       "Unfortunately the last push that fixed a crash in the crypto
        scatterwalk code introduced a new crash when SG debugging is enabled.
        This fixes that"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: scatterwalk - Use sg_chain_ptr on chain entries
      b6db4eb0
    • Tom Lendacky's avatar
      crypto: scatterwalk - Use sg_chain_ptr on chain entries · 389a5390
      Tom Lendacky authored
      Now that scatterwalk_sg_chain sets the chain pointer bit the sg_page
      call in scatterwalk_sg_next hits a BUG_ON when CONFIG_DEBUG_SG is
      enabled. Use sg_chain_ptr instead of sg_page on a chain entry.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      389a5390