1. 23 7月, 2014 6 次提交
  2. 12 7月, 2014 1 次提交
  3. 11 7月, 2014 1 次提交
  4. 09 7月, 2014 1 次提交
  5. 08 7月, 2014 1 次提交
  6. 07 7月, 2014 1 次提交
    • D
      drm/i915: rework digital port IRQ handling (v2) · 13cf5504
      Dave Airlie 提交于
      The digital ports from Ironlake and up have the ability to distinguish
      between long and short HPD pulses. Displayport 1.1 only uses the short
      form to request link retraining usually, so we haven't really needed
      support for it until now.
      
      However with DP 1.2 MST we need to handle the short irqs on their
      own outside the modesetting locking the long hpd's involve. This
      patch adds the framework to distinguish between short/long to the
      current code base, to lay the basis for future DP 1.2 MST work.
      
      This should mean we get better bisectability in case of regression
      due to the new irq handling.
      
      v2: add GM45 support (untested, due to lack of hw)
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      Reviewed-by: NTodd Previte <tprevite@gmail.com>
      [danvet: Fix conflicts in i915_irq.c with Oscar Mateo's irq handling
      race fixes and a trivial one in intel_drv.h with the psr code.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      13cf5504
  7. 18 6月, 2014 4 次提交
    • O
      drm/i915/chv: Ack interrupts before handling them (CHV) · 27b6c122
      Oscar Mateo 提交于
      Otherwise, we might receive a new interrupt before we have time to
      ack the first one, eventually missing it.
      
      Without an atomic XCHG operation with mmio space, this patch merely
      reduces the window in which we can miss an interrupt (especially when
      you consider how heavyweight the I915_READ/I915_WRITE operations are).
      
      Notice that, before clearing a port-sourced interrupt in the IIR, the
      corresponding interrupt source status in the PORT_HOTPLUG_STAT must be
      cleared.
      
      Spotted by Bob Beckett <robert.beckett@intel.com>.
      
      v2:
      - Add warning to commit message and comments to the code as per Chris
        Wilson's request.
      - Imre Deak pointed out that the pipe underrun flag might not be signaled
        in IIR, so do not make valleyview_pipestat_irq_handler depend on it.
      
      v3: Improve the source code comment.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      27b6c122
    • O
      drm/i915/bdw: Ack interrupts before handling them (GEN8) · 38cc46d7
      Oscar Mateo 提交于
      Otherwise, we might receive a new interrupt before we have time to
      ack the first one, eventually missing it.
      
      The right order should be:
      
      1 - Disable Master Interrupt Control.
      2 - Find the category of interrupt that is pending.
      3 - Find the source(s) of the interrupt and clear the Interrupt Identity bits (IIR)
      4 - Process the interrupt(s) that had bits set in the IIRs.
      5 - Re-enable Master Interrupt Control.
      
      Without an atomic XCHG operation with mmio space, the above merely reduces the window
      in which we can miss an interrupt (especially when you consider how heavyweight the
      I915_READ/I915_WRITE operations are).
      
      Spotted by Bob Beckett <robert.beckett@intel.com>.
      
      v2: Add warning to commit message and comments to the code as per Chris Wilson's request.
      
      v3: Improve the source code comment.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      38cc46d7
    • O
      drm/i915/vlv: Ack interrupts before handling them (VLV) · 3ff60f89
      Oscar Mateo 提交于
      Otherwise, we might receive a new interrupt before we have time to
      ack the first one, eventually missing it.
      
      Without an atomic XCHG operation with mmio space, this patch merely
      reduces the window in which we can miss an interrupt (especially when
      you consider how heavyweight the I915_READ/I915_WRITE operations are).
      
      Notice that, before clearing a port-sourced interrupt in the IIR, the
      corresponding interrupt source status in the PORT_HOTPLUG_STAT must be
      cleared.
      
      Spotted by Bob Beckett <robert.beckett@intel.com>.
      
      v2:
      - Reorder the IIR clearing to reduce the window even further.
      - Add warning to commit message and comments to the code as per Chris
        Wilson's request.
      - Imre Deak pointed out that the pipe underrun flag might not be signaled
        in IIR, so do not make valleyview_pipestat_irq_handler depend on it.
      
      v3: Improve the source code comment.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3ff60f89
    • O
      drm/i915: Ack interrupts before handling them (GEN5 - GEN7) · 72c90f62
      Oscar Mateo 提交于
      Otherwise, we might receive a new interrupt before we have time to ack the first
      one, eventually missing it.
      
      According to BSPec, the right order should be:
      
      1 - Disable Master Interrupt Control.
      2 - Find the source(s) of the interrupt.
      3 - Clear the Interrupt Identity bits (IIR).
      4 - Process the interrupt(s) that had bits set in the IIRs.
      5 - Re-enable Master Interrupt Control.
      
      Without an atomic XCHG operation with mmio space, the above merely reduces the window
      in which we can miss an interrupt (especially when you consider how heavyweight the
      I915_READ/I915_WRITE operations are).
      
      We maintain the "disable SDE interrupts when handling" hack since apparently it works.
      
      Spotted by Bob Beckett <robert.beckett@intel.com>.
      
      v2: Add warning to commit message and comments to the code as per Chris Wilson's request.
      v3: Improve the source comments.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      72c90f62
  8. 17 6月, 2014 1 次提交
    • S
      drm/i915: Replaced Blitter ring based flips with MMIO flips · 84c33a64
      Sourab Gupta 提交于
      This patch enables the framework for using MMIO based flip calls,
      in contrast with the CS based flip calls which are being used currently.
      
      MMIO based flip calls can be enabled on architectures where
      Render and Blitter engines reside in different power wells. The
      decision to use MMIO flips can be made based on workloads to give
      100% residency for Media power well.
      
      v2: The MMIO flips now use the interrupt driven mechanism for issuing the
      flips when target seqno is reached. (Incorporating Ville's idea)
      
      v3: Rebasing on latest code. Code restructuring after incorporating
      Damien's comments
      
      v4: Addressing Ville's review comments
          -general cleanup
          -updating only base addr instead of calling update_primary_plane
          -extending patch for gen5+ platforms
      
      v5: Addressed Ville's review comments
          -Making mmio flip vs cs flip selection based on module parameter
          -Adding check for DRIVER_MODESET feature in notify_ring before calling
           notify mmio flip.
          -Other changes mostly in function arguments
      
      v6: -Having a seperate function to check condition for using mmio flips (Ville)
          -propogating error code from i915_gem_check_olr (Ville)
      
      v7: -Adding __must_check with i915_gem_check_olr (Chris)
          -Renaming mmio_flip_data to mmio_flip (Chris)
          -Rebasing on latest nightly
      
      v8: -Rebasing on latest code
          -squash 3rd patch in series(mmio setbase vs page flip race) with this patch
          -Added new tiling mode update in intel_do_mmio_flip (Chris)
      
      v9: -check for obj->last_write_seqno being 0 instead of obj->ring being NULL in
      intel_postpone_flip, as this is a more restrictive condition (Chris)
      
      v10: -Applied Chris's suggestions for squashing patches 2,3 into this patch.
      These patches make the selection of CS vs MMIO flip at the page flip time, and
      make the module parameter for using mmio flips as tristate, the states being
      'force CS flips', 'force mmio flips', 'driver discretion'.
      Changed the logic for driver discretion (Chris)
      
      v11: Minor code cleanup(better readability, fixing whitespace errors, using
      lockdep to check mutex locked status in postpone_flip, removal of __must_check
      in function definition) (Chris)
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NSourab Gupta <sourab.gupta@intel.com>
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Tested-by: Chris Wilson <chris@chris-wilson.co.uk> # snb, ivb
      [danvet: Fix up parameter alignement checkpatch spotted.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      84c33a64
  9. 11 6月, 2014 2 次提交
  10. 05 6月, 2014 4 次提交
    • V
      drm/i915: Set AGPBUSY# bit in init_clock_gating · 12fabbcb
      Ville Syrjälä 提交于
      I don't see why we wouldn't want interrupts to wake up the CPU from C3
      always, so just set the AGPBUSY# bit in gen3_init_clock_gating().
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      12fabbcb
    • D
      drm/i915: Extract gen8_gt_irq_reset · d6e3cca3
      Daniel Vetter 提交于
      Fallout from an intermediate patch revision that I deemed worth saving.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d6e3cca3
    • D
      drm/i915: Inline ilk/gen8_irq_reset · 723761b8
      Daniel Vetter 提交于
      No point in having this indirection.
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      723761b8
    • D
      drm/i915: Fix up fifo underrun tracking, take N · 2ae2a50c
      Daniel Vetter 提交于
      So apparently this is tricky.
      
      We need to consider:
      - We start out with all the hw enabling bits disabled, both the
        individual fifo underrun interrupts and the shared display error
        interrupts masked. Otherwise if the bios config is broken we'll blow
        up with a NULL deref in our interrupt handler since the crtc
        structures aren't set up yet at driver load time.
      - On gmch we need to mask fifo underruns on the sw side, so always
        need to set that in sanitize_crtc for those platforms.
      - On other platforms we try to set the sw tracking so that it reflects
        the real state. But since a few platforms have shared bits we must
        _not_ disable fifo underrun reporting. Otherwise we'll never enable
        the shared error interrupt.
      
      This is the state before out patch, but unfortunately this is not good
      enough. But after a suspend resume operation this is broken:
      1. We don't enable the hw interrupts since the same code runs on
      resume as on driver load.
      2. The fifo underrun state adjustments we do in sanitize_crtc doesn't
      fire on resume since (except for hilarious firmware) all pipes are off
      at that point. But they also don't hurt since the subsequent crtc
      enabling due to force_restore will enable fifo underruns.
      
      Which means when we enable fifo underrun reporting we notice that the
      per-crtc state is already correct and short-circuit everthing out. And
      the interrupt doesn't get enabled.
      
      A similar problem would happen if the bios doesn't light up anything
      when the driver loads. Which is exactly what happens when we reload
      the driver since our unload functions disables all outputs.
      
      Now we can't just rip out the short-circuit logic and unconditionally
      update the fifo underrun reporting interrupt masking: We have some
      checks for shared error interrupts to catch issues that happened when
      the shared error interrupt was disabled.
      
      The right fix is to push down this logic so that we can always update
      the hardware state, but only check for missed fifo underruns on a real
      enabled->disabled transition and ignore them when we're already
      disabled.
      
      On platforms with shared error interrupt the pipe CRC interrupts are
      grouped together with the fifo underrun reporting this fixes pipe CRC
      support after suspend and driver reloads.
      
      Testcase: igt/kms_pipe_crc_basic/suspend-*
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2ae2a50c
  11. 04 6月, 2014 1 次提交
  12. 23 5月, 2014 3 次提交
    • O
      drm/i915: Split the ringbuffers from the rings (3/3) · 93b0a4e0
      Oscar Mateo 提交于
      Manual cleanup after the previous Coccinelle script.
      
      Yes, I could write another Coccinelle script to do this but I
      don't want labor-replacing robots making an honest programmer's
      work obsolete (also, I'm lazy).
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      93b0a4e0
    • O
      drm/i915: Split the ringbuffers from the rings (2/3) · ee1b1e5e
      Oscar Mateo 提交于
      This refactoring has been performed using the following Coccinelle
      semantic script:
      
          @@
          struct intel_engine_cs r;
          @@
          (
          - (r).obj
          + r.buffer->obj
          |
          - (r).virtual_start
          + r.buffer->virtual_start
          |
          - (r).head
          + r.buffer->head
          |
          - (r).tail
          + r.buffer->tail
          |
          - (r).space
          + r.buffer->space
          |
          - (r).size
          + r.buffer->size
          |
          - (r).effective_size
          + r.buffer->effective_size
          |
          - (r).last_retired_head
          + r.buffer->last_retired_head
          )
      
          @@
          struct intel_engine_cs *r;
          @@
          (
          - (r)->obj
          + r->buffer->obj
          |
          - (r)->virtual_start
          + r->buffer->virtual_start
          |
          - (r)->head
          + r->buffer->head
          |
          - (r)->tail
          + r->buffer->tail
          |
          - (r)->space
          + r->buffer->space
          |
          - (r)->size
          + r->buffer->size
          |
          - (r)->effective_size
          + r->buffer->effective_size
          |
          - (r)->last_retired_head
          + r->buffer->last_retired_head
          )
      
          @@
          expression E;
          @@
          (
          - LP_RING(E)->obj
          + LP_RING(E)->buffer->obj
          |
          - LP_RING(E)->virtual_start
          + LP_RING(E)->buffer->virtual_start
          |
          - LP_RING(E)->head
          + LP_RING(E)->buffer->head
          |
          - LP_RING(E)->tail
          + LP_RING(E)->buffer->tail
          |
          - LP_RING(E)->space
          + LP_RING(E)->buffer->space
          |
          - LP_RING(E)->size
          + LP_RING(E)->buffer->size
          |
          - LP_RING(E)->effective_size
          + LP_RING(E)->buffer->effective_size
          |
          - LP_RING(E)->last_retired_head
          + LP_RING(E)->buffer->last_retired_head
          )
      
      Note: On top of this this patch also removes the now unused ringbuffer
      fields in intel_engine_cs.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      [danvet: Add note about fixup patch included here.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ee1b1e5e
    • O
      drm/i915: s/intel_ring_buffer/intel_engine_cs · a4872ba6
      Oscar Mateo 提交于
      In the upcoming patches we plan to break the correlation between
      engine command streamers (a.k.a. rings) and ringbuffers, so it
      makes sense to refactor the code and make the change obvious.
      
      No functional changes.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a4872ba6
  13. 22 5月, 2014 7 次提交
  14. 21 5月, 2014 1 次提交
    • D
      drm/i915: Accurately initialize fifo underrun state on gmch platforms · c5ab3bc0
      Daniel Vetter 提交于
      We don't have hardware based disable bits on gmch platforms, so need
      to block spurious underrun reports in software. Which means that we
      _must_ start out with fifo underrun reporting disabled everywhere.
      
      This is in big contrast to ilk/hsw/cpt where there's only _one_
      disable bit for all platforms and hence we must allow underrun
      reporting on disabled pipes. Otherwise nothing really works,
      especially the CRC support since that's key'ed off the same irq
      disable bit.
      
      This allows us to ditch the fifo underrun reporting hack from the vlv
      runtime pm code and unexport the internal function from i915_irq.c
      again. Yay!
      
      v2: Keep the display irq disabling, spotted by Imre.
      
      Cc: Imre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c5ab3bc0
  15. 20 5月, 2014 3 次提交
  16. 17 5月, 2014 1 次提交
  17. 16 5月, 2014 1 次提交
    • B
      drm/i915/bdw: Implement a basic PM interrupt handler · 0961021a
      Ben Widawsky 提交于
      Almost all of it is reusable from the existing code. The primary
      difference is we need to do even less in the interrupt handler, since
      interrupts are not shared in the same way.
      
      The patch is mostly a copy-paste of the existing snb+ code, with updates
      to the relevant parts requiring changes to the interrupt handling. As
      such it /should/ be relatively trivial. It's highly likely that I missed
      some places where I need a gen8 version of the PM interrupts, but it has
      become invisible to me by now.
      
      This patch could probably be split into adding the new functions,
      followed by actually handling the interrupts. Since the code is
      currently disabled (and broken) I think the patch stands better by
      itself.
      
      v2: Move the commit about not touching the ringbuffer interrupt to the
      snb_* function where it belongs (Rodrigo)
      
      v3: Rebased on Paulo's runtime PM changes
      
      v4: Not well validated, but rebase on
      commit 730488b2
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Fri Mar 7 20:12:32 2014 -0300
      
          drm/i915: kill dev_priv->pm.regsave
      
      v5: Rebased on latest code base. (Deepak)
      
      v6: Remove conflict markers, Unnecessary empty line and use right
      IIR interrupt (Ville)
      
      v7: mask modified without rmw (Ville Syrjälä)
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDeepak S <deepak.s@linux.intel.com>
      Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0961021a
  18. 13 5月, 2014 1 次提交