1. 19 Jun, 2014 9 commits
  2. 18 Jun, 2014 2 commits
    • Oscar Mateo's avatar
      drm/i915: Remove ctx->last_ring · 14d8ec54
      Oscar Mateo authored
      The original comment that introduced it said:
      
      commit 0009e46c
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Fri Dec 6 14:11:02 2013 -0800
      
          drm/i915: Track which ring a context ran on
      
          Previously we dropped the association of a context to a ring. It is
          however very important to know which ring a context ran on (we could
          have reused the other member, but I was nitpicky).
      
          This is very important when we switch address spaces, which unlike
          context objects, do change per ring.
      
          As an example, if we have:
      
                  RCS   BCS
          ctx            A
          ctx      A
          ctx      B
          ctx            B
      
          Without tracking the last ring B ran on, we wouldn't know to switch the
          address space on BCS in the last row.
      
      But this is not really true, because we are already checking to != from (with
      "from" being = ring->last_context) and that should be enough to make sure we
      switch to the right address space.
      
      We would have a problem if we switched the context object for every ring (since
      then we would fail to do it in some situations) but we only switch it for the
      render ring, so we don't care.
      Signed-off-by: default avatarOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      14d8ec54
    • Daniel Vetter's avatar
      Merge branch 'topic/soix' into drm-intel-next-queued · 5d0cf3d6
      Daniel Vetter authored
      Jesse's SOix work required some patches from acpi-next, so pull it in
      through a topic barnch.
      
      Conflicts:
      	drivers/gpu/drm/i915/i915_drv.c
      	drivers/gpu/drm/i915/intel_pm.c
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      5d0cf3d6
  3. 17 Jun, 2014 12 commits
    • Oscar Mateo's avatar
      drm/i915/chv: Ack interrupts before handling them (CHV) · 27b6c122
      Oscar Mateo authored
      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: default avatarOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      27b6c122
    • Oscar Mateo's avatar
      drm/i915/bdw: Ack interrupts before handling them (GEN8) · 38cc46d7
      Oscar Mateo authored
      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: default avatarOscar Mateo <oscar.mateo@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      38cc46d7
    • Oscar Mateo's avatar
      drm/i915/vlv: Ack interrupts before handling them (VLV) · 3ff60f89
      Oscar Mateo authored
      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: default avatarOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      3ff60f89
    • Oscar Mateo's avatar
      drm/i915: Ack interrupts before handling them (GEN5 - GEN7) · 72c90f62
      Oscar Mateo authored
      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: default avatarOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      72c90f62
    • Daniel Vetter's avatar
      drm/i915: Don't BUG_ON in i915_gem_obj_offset · f25748ea
      Daniel Vetter authored
      A WARN_ON is perfectly fine.
      
      The BUG in here seems to be the cause behind hard-hangs when I cat the
      i915_gem_pageflip debugfs file (which calls this from an irq
      spinlock). But only while running a full igt run after a while. I
      still need to root cause the underlying issue.
      
      I'll also start reject patches which add new BUG_ON but don't come
      with a really good justification for it. The general rule really
      should be to just WARN and hope the driver survives for long enough.
      
      v2: Make the WARN a bit more useful per Chris' suggestion.
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f25748ea
    • Daniel Vetter's avatar
      drm/i915: Grab dev->struct_mutex in i915_gem_pageflip_info · 8a270ebf
      Daniel Vetter authored
      We could walk of a bad list otherwise when someone concurrently
      unbinds stuff for fun.
      
      I've suspected this as the root-cause behind seemingly inconsistent
      state, but alas it's not.
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      8a270ebf
    • Brad Volkin's avatar
      drm/i915: Add some L3 registers to the parser whitelist · c9224faa
      Brad Volkin authored
      Beignet needs these in order to program the L3 cache config for
      OpenCL workloads, particularly when using SLM.
      Signed-off-by: default avatarBrad Volkin <bradley.d.volkin@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      c9224faa
    • Ville Syrjälä's avatar
      drm/i915: Don't prefault the entire obj if the vma is smaller · beff0d0f
      Ville Syrjälä authored
      Take the minimum of the object size and the vma size and prefault
      only that much. Avoids a SIGBUS when mmapping only a portion of the
      object.
      
      Prefaulting was introduced here:
       commit b90b91d8
       Author: Chris Wilson <chris@chris-wilson.co.uk>
       Date:   Tue Jun 10 12:14:40 2014 +0100
      
          drm/i915: Prefault the entire object on first page fault
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Testcase: igt/gem_mmap/short-mmap
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      beff0d0f
    • Sourab Gupta's avatar
      drm/i915: Replaced Blitter ring based flips with MMIO flips · 84c33a64
      Sourab Gupta authored
      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: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarSourab Gupta <sourab.gupta@intel.com>
      Signed-off-by: default avatarAkash 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: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      84c33a64
    • Daniel Vetter's avatar
      drm/i915: Add missing statics to recent psr functions · f02a326e
      Daniel Vetter authored
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f02a326e
    • Daisy Sun's avatar
      drm/i915: Broaden FBC resolution limit to 4096*4096 · 032843a5
      Daisy Sun authored
      Staring from HSW, the resolution limit of FBC has increased to
      4096*4096
      
      Issue: VIZ-2813
      Change-Id: I842f64e3cf2c0d18d29ef1bcfef3b9bb1f1764ac
      Signed-off-by: default avatarDaisy Sun <daisy.sun@intel.com>
      Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      032843a5
    • Akash Goel's avatar
      drm/i915: Added write-enable pte bit supportt · 24f3a8cf
      Akash Goel authored
      This adds support for a write-enable bit in the entry of GTT.
      This is handled via a read-only flag in the GEM buffer object which
      is then used to see how to set the bit when writing the GTT entries.
      Currently by default the Batch buffer & Ring buffers are marked as read only.
      
      v2: Moved the pte override code for read-only bit to 'byt_pte_encode'. (Chris)
          Fixed the issue of leaving 'gt_old_ro' as unused. (Chris)
      
      v3: Removed the 'gt_old_ro' field, now setting RO bit only for Ring Buffers(Daniel).
      
      v4: Added a new 'flags' parameter to all the pte(gen6) encode & insert_entries functions,
          in lieu of overloading the cache_level enum (Daniel).
      
      v5: Removed the superfluous VLV check & changed the definition location of PTE_READ_ONLY flag (Imre)
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarAkash Goel <akash.goel@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      24f3a8cf
  4. 16 Jun, 2014 6 commits
  5. 13 Jun, 2014 11 commits