1. 29 Jun, 2016 3 commits
    • Imre Deak's avatar
      drm/i915/lpt: Avoid early timeout during FDI PHY reset · 11f61457
      Imre Deak authored
      Since wait_for_atomic doesn't re-check the wait-for condition after
      expiry of the timeout it can fail when called from non-atomic context
      even if the condition is set correctly before the expiry. Fix this by
      using the non-atomic wait_for instead.
      
      Fixes: 0351b939 ("drm/i915: Do not lie about atomic timeout granularity")
      CC: Chris Wilson <chris@chris-wilson.co.uk>
      CC: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      CC: drm-intel-fixes@lists.freedesktop.org
      Link: http://patchwork.freedesktop.org/patch/msgid/1467110253-16046-3-git-send-email-imre.deak@intel.com
      (cherry picked from commit cf3598c2)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      11f61457
    • Imre Deak's avatar
      drm/i915/bxt: Avoid early timeout during PLL enable · ea12e2a0
      Imre Deak authored
      Since wait_for_atomic doesn't re-check the wait-for condition after
      expiry of the timeout it can fail when called from non-atomic context
      even if the condition is set correctly before the expiry. Fix this by
      using the non-atomic wait_for instead.
      
      I noticed this via the PLL locking timing out incorrectly, with this fix
      I couldn't reproduce the problem.
      
      Fixes: 0351b939 ("drm/i915: Do not lie about atomic timeout granularity")
      CC: Chris Wilson <chris@chris-wilson.co.uk>
      CC: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      CC: drm-intel-fixes@lists.freedesktop.org
      Link: http://patchwork.freedesktop.org/patch/msgid/1467110253-16046-2-git-send-email-imre.deak@intel.com
      (cherry picked from commit 0b786e41)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      ea12e2a0
    • Ville Syrjälä's avatar
      drm/i915: Refresh cached DP port register value on resume · 664a84d2
      Ville Syrjälä authored
      During hibernation the cached DP port register value will be left with
      whatever value we have there when we create the hibernation image.
      Currently that means the port (and eDP PLL) will be off in the cached
      value. However when we resume there is no guarantee that the value
      in the actual register will match the cached value. If i915 isn't
      loaded in the kernel that loads the hibernation image, the port may
      well be on (eg. left on by the BIOS). The encoder state readout
      does the right thing in this case and updates our encoder state
      to reflect the actual hardware state. However the post-resume modeset
      will then use the stale cached port register value in
      intel_dp_link_down() and potentially confuse the hardware.
      
      This was caught by the following assert
       WARNING: CPU: 3 PID: 5288 at ../drivers/gpu/drm/i915/intel_dp.c:2184 assert_edp_pll+0x99/0xa0 [i915]
       eDP PLL state assertion failure (expected on, current off)
      on account of the eDP PLL getting prematurely turned off when
      shutting down the port, since the DP_PLL_ENABLE bit wasn't set
      in the cached register value.
      
      Presumably I introduced this problem in
      commit 6fec7662 ("drm/i915: Use intel_dp->DP in eDP PLL setup")
      as before that we didn't update the cached value after shuttting the
      port down. That's assuming the port got enabled at least once prior
      to hibernating. If that didn't happen then the cached value would
      still have been totally out of sync with reality (eg. first boot w/o
      eDP on, then hibernate, and then resume with eDP on).
      
      So, let's fix this properly and refresh the cached register value from
      the hardware register during resume.
      
      DDI platforms shouldn't use the cached value during port disable at
      least, so shouldn't have this particular issue. They might still have
      issues if we skip the initial modeset and then try to retrain the link
      or something. But untangling this DP vs. DDI mess is a bigger topic,
      so let's jut punt on DDI for now.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: stable@vger.kernel.org
      Fixes: 6fec7662 ("drm/i915: Use intel_dp->DP in eDP PLL setup")
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1463162036-27931-1-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarImre Deak <imre.deak@intel.com>
      (cherry picked from commit 64989ca4)
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      664a84d2
  2. 27 Jun, 2016 1 commit
  3. 26 Jun, 2016 1 commit
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 2ac9b973
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Two straightforward fixes.
      
        One is a concurrency issue only affecting SAS connected SATA drives,
        but which could hang the storage subsystem if it triggers (because the
        outstanding command count on error never goes back to zero) and the
        other is a NO_TAG fallout from the switch to hostwide tags which
        causes the system to crash on module insertion (we've checked
        carefully and only the 53c700 family of drivers is vulnerable to this
        issue)"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        53c700: fix BUG on untagged commands
        scsi: fix race between simultaneous decrements of ->host_failed
      2ac9b973
  4. 25 Jun, 2016 35 commits