1. 03 12月, 2014 5 次提交
  2. 02 12月, 2014 1 次提交
    • T
      drm/i915: Don't pin LRC in GGTT when dumping in debugfs · 064ca1d2
      Thomas Daniel 提交于
      LRC object does not need to be mapped into the GGTT when dumping. A side-effect
      of this patch is that a compiler warning goes away (not checking return value
      of i915_gem_obj_ggtt_pin).
      
      v2: Broke out individual context dumping into a new function as the indentation
      was getting a bit crazy.  Added notification of contexts with no gem object for
      debugging purposes.  Removed unnecessary pin_pages and unpin_pages, replaced
      with explicit get_pages for the context object as there may be no backing store
      allocated at this time (Comment for get_pages says "Ensure that the associated
      pages are gathered from the backing storage and pinned into our object").
      Improved error checking - get_pages and get_page are checked for failure.
      Signed-off-by: NThomas Daniel <thomas.daniel@intel.com>
      [danvet: Align paramter continuation lines properly. Also add some
      braces to the nested loops again for readability.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      064ca1d2
  3. 26 11月, 2014 1 次提交
    • V
      drm/i915: Cancel vdd off work before suspend · afa4e53a
      Ville Syrjälä 提交于
      Currently we just make sure vdd is off before suspending, but we don't
      cancel the vdd off work. The work wil not touch vdd if
      want_panel_vdd==false so in theory this is fine.
      
      In the past that was perfectly fine since the vdd off work didn't do
      anything when want_panel_vdd==false, so even if the work would have been
      run during system resume before i915 has resumed, nothing would happen.
      
      However since pps_lock() will now grab the power domain references before
      it can check want_panel_vdd, we may end up toggling the power wells on/off
      already before the driver has resumed. That is not really acceptable, so
      cancel the vdd off work when suspending the encoder.
      
      The problem appeared when pps_lock() was introduced in:
       commit 773538e8
       Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
       Date:   Thu Sep 4 14:54:56 2014 +0300
      
          drm/i915: Reset power sequencer pipe tracking when disp2d is off
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      afa4e53a
  4. 24 11月, 2014 1 次提交
    • V
      drm/i915: Ignore SURFLIVE and flip counter when the GPU gets reset · bdfa7542
      Ville Syrjälä 提交于
      During a GPU reset we need to get pending page flip cleared out
      since the ring contents are gone and flip will never complete
      on its own. This used to work until the mmio vs. CS flip race
      detection came about. That piece of code is looking for a
      specific surface address in the SURFLIVE register, but as
      a flip to that address may never happen the check may never
      pass. So we should just skip the SURFLIVE and flip counter
      checks when the GPU gets reset.
      
      intel_display_handle_reset() tries to effectively complete
      the flip anyway by calling .update_primary_plane(). But that
      may not satisfy the conditions of the mmio vs. CS race
      detection since there's no guarantee that a modeset didn't
      sneak in between the GPU reset and intel_display_handle_reset().
      Such a modeset will not wait for pending flips due to the ongoing GPU
      reset, and then the primary plane updates performed by
      intel_display_handle_reset() will already use the new surface
      address, and thus the surface address the flip is waiting for
      might never appear in SURFLIVE. The result is that the flip
      will never complete and attempts to perform further page flips
      will fail with -EBUSY.
      
      During the GPU reset intel_crtc_has_pending_flip() will return
      false regardless, so the deadlock with a modeset vs. the error
      work acquiring crtc->mutex was avoided. And the reset_counter
      check in intel_crtc_has_pending_flip() actually made this bug
      even less severe since it allowed normal modesets to go through
      even though there's a pending flip.
      
      This is a regression introduced by me here:
       commit 75f7f3ec
       Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
       Date:   Tue Apr 15 21:41:34 2014 +0300
      
          drm/i915: Fix mmio vs. CS flip race on ILK+
      
      Testcase: igt/kms_flip/flip-vs-panning-vs-hang
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      bdfa7542
  5. 21 11月, 2014 6 次提交
  6. 20 11月, 2014 22 次提交
  7. 19 11月, 2014 4 次提交
    • I
      drm/i915: disable rps irqs earlier during suspend/unload · 2eb5252e
      Imre Deak 提交于
      After the previous patch RPS disabling doesn't depend any more on the
      first level interrupts being disabled, so we can move it everywhere
      earlier. Doing so let's us think about the uninitialization steps
      afterwards independently of any asynchronous RPS events that can happen
      atm. It also makes the system/runtime suspend time RPS disabling more
      uniform. Finally this gets rid of the WARN in
      intel_suspend_gt_powersave(), which we can hit if a final RPS work runs
      after we disabled the first level interrupts.
      
      Testcase: igt/pm_rpm
      Reference: https://bugs.freedesktop.org/show_bug.cgi?id=82939Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2eb5252e
    • I
      drm/i915: sanitize rps irq disabling · d4d70aa5
      Imre Deak 提交于
      When disabling the RPS interrupts there is a tricky dependency between
      the thread disabling the interrupts, the RPS interrupt handler and the
      corresponding RPS work. The RPS work can reenable the interrupts, so
      there is no straightforward order in the disabling thread to (1) make
      sure that any RPS work is flushed and to (2) disable all RPS
      interrupts. Currently this is solved by masking the interrupts using two
      separate mask registers (first level display IMR and PM IMR) and doing
      the disabling when all first level interrupts are disabled.
      
      This works, but the requirement to run with all first level interrupts
      disabled is unnecessary making the suspend / unload time ordering of RPS
      disabling wrt. other unitialization steps difficult and error prone.
      Removing this restriction allows us to disable RPS early during suspend
      / unload and forget about it for the rest of the sequence. By adding a
      more explicit method for avoiding the above race, it also becomes easier
      to prove its correctness. Finally currently we can hit the WARN in
      snb_update_pm_irq(), when a final RPS work runs with the first level
      interrupts already disabled. This won't lead to any problem (due to the
      separate interrupt masks), but with the change in this and the next
      patch we can get rid of the WARN, while leaving it in place for other
      scenarios.
      
      To address the above points, add a new RPS interrupts_enabled flag and
      use this during RPS disabling to avoid requeuing the RPS work and
      reenabling of the RPS interrupts. Since the interrupt disabling happens
      now in intel_suspend_gt_powersave(), we will disable RPS interrupts
      explicitly during suspend (and not just through the first level mask),
      but there is no problem doing so, it's also more consistent and allows
      us to unify more of the RPS disabling during suspend and unload time in
      the next patch.
      
      v2/v3:
      - rebase on patch "drm/i915: move rps irq disable one level up" in the
        patchset
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d4d70aa5
    • I
      drm/i915: sanitize rps irq enabling · 3cc134e3
      Imre Deak 提交于
      Atm we first enable the RPS interrupts then we clear any pending ones.
      By this we could lose an interrupt arriving after we unmasked it. This
      may not be a problem as the caller should handle such a race, but logic
      still calls for the opposite order. Also we can delay enabling the
      interrupts until after all the RPS initialization is ready with the
      following order:
      
      1. disable left-over RPS (earlier via intel_uncore_sanitize)
      2. clear any pending RPS interrupts
      3. initialize RPS
      4. enable RPS interrupts
      
      This also allows us to do the 2. and 4. step the same way for all
      platforms, so let's follow this order to simplifying things.
      
      Also make sure any queued interrupts are also cleared.
      
      v2:
      - rebase on the GEN9 patches where we don't support RPS yet, so we
        musn't enable RPS interrupts on it (Paulo)
      v3:
      - avoid enabling RPS interrupts on GEN>9 too (Paulo)
      - clarify the RPS init sequence in the log message (Chris)
      - add POSTING_READ to gen6_reset_rps_interrupts() (Paulo)
      - WARN if any PM_IIR bits are set in gen6_enable_rps_interrupts()
        (Paulo)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3cc134e3
    • I
      drm/i915: move rps irq disable one level up · e534770a
      Imre Deak 提交于
      We disable the RPS interrupts for all platforms at the same spot, so
      move it one level up in the callstack to simplify things.
      
      No functional change.
      
      v2:
      - rebase on the GEN9 patches where RPS isn't supported yet, so we don't
        need to disable RPS interrupts on it (Paulo)
      v3:
      - avoid disabling the interrupts on GEN>9 too (Paulo)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      e534770a