1. 08 11月, 2014 4 次提交
  2. 04 11月, 2014 1 次提交
  3. 24 10月, 2014 4 次提交
  4. 03 10月, 2014 1 次提交
  5. 24 9月, 2014 1 次提交
  6. 20 9月, 2014 1 次提交
    • D
      drm/i915: DocBook integration for frontbuffer tracking · b680c37a
      Daniel Vetter 提交于
      I shouldn't ask everyone to do this and fail myself ...
      
      This extracts all the frontbuffer tracking functions into
      intel_frontbuffer.c, adds a DOC overview section and also adds the
      missing kerneldoc for i915_gem_track_fb and also pulls it into the
      same section for convenience.
      
      v2: Don't forget about the header files.
      
      v3: Oops, might check compilation next time around. To make my life
      easier drop the increase_pllclock from set_base_atomic since really,
      it doesn't matter if you see your Oops or kgdb with a tiny bit of lag.
      
      v4: Try to better explain how to actually use this, requested by Paulo
      on irc.
      
      v5: Explain invalidate/flush a bit clearer.
      
      v6: s/business/busyness/
      Acked-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Vandana Kannan <vandana.kannan@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      b680c37a
  7. 19 9月, 2014 4 次提交
  8. 08 9月, 2014 1 次提交
  9. 03 9月, 2014 3 次提交
  10. 20 8月, 2014 1 次提交
  11. 15 8月, 2014 1 次提交
    • O
      drm/i915/bdw: Emission of requests with logical rings · 48e29f55
      Oscar Mateo 提交于
      On a previous iteration of this patch, I created an Execlists
      version of __i915_add_request and asbtracted it away as a
      vfunc. Daniel Vetter wondered then why that was needed:
      
      "with the clean split in command submission I expect every
      function to know wether it'll submit to an lrc (everything in
      intel_lrc.c) or wether it'll submit to a legacy ring (existing
      code), so I don't see a need for an add_request vfunc."
      
      The honest, hairy truth is that this patch is the glue keeping
      the whole logical ring puzzle together:
      
      - i915_add_request is used by intel_ring_idle, which in turn is
        used by i915_gpu_idle, which in turn is used in several places
        inside the eviction and gtt codes.
      - Also, it is used by i915_gem_check_olr, which is littered all
        over i915_gem.c
      - ...
      
      If I were to duplicate all the code that directly or indirectly
      uses __i915_add_request, I'll end up creating a separate driver.
      
      To show the differences between the existing legacy version and
      the new Execlists one, this time I have special-cased
      __i915_add_request instead of adding an add_request vfunc. I
      hope this helps to untangle this Gordian knot.
      Signed-off-by: NOscar Mateo <oscar.mateo@intel.com>
      Reviewed-by: NDamien Lespiau <damien.lespiau@intel.com>
      [danvet: Adjust to ringbuf->FIXME_lrc_ctx per the discussion with
      Thomas Daniel.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      48e29f55
  12. 13 8月, 2014 5 次提交
  13. 12 8月, 2014 2 次提交
    • D
      drm/i915: Some cleanups for the ppgtt lifetime handling · ee960be7
      Daniel Vetter 提交于
      So when reviewing Michel's patch I've noticed a few things and cleaned
      them up:
      - The early checks in ppgtt_release are now redundant: The inactive
        list should always be empty now, so we can ditch these checks. Even
        for the aliasing ppgtt (though that's a different confusion) since
        we tear that down after all the objects are gone.
      - The ppgtt handling functions are splattered all over. Consolidate
        them in i915_gem_gtt.c, give them OCD prefixes and add wrappers for
        get/put.
      - There was a bit a confusion in ppgtt_release about whether it cares
        about the active or inactive list. It should care about them both,
        so augment the WARNINGs to check for both.
      
      There's still create_vm_for_ctx left to do, put that is blocked on the
      removal of ppgtt->ctx. Once that's done we can rename it to
      i915_ppgtt_create and move it to its siblings for handling ppgtts.
      
      v2: Move the ppgtt checks into the inline get/put functions as
      suggested by Chris.
      
      v3: Inline the now redundant ppgtt local variable.
      
      Cc: Michel Thierry <michel.thierry@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMichel Thierry <michel.thierry@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ee960be7
    • M
      drm/i915: vma/ppgtt lifetime rules · b9d06dd9
      Michel Thierry 提交于
      VMAs should take a reference of the address space they use.
      
      Now, when the fd is closed, it will release the ref that the context was
      holding, but it will still be referenced by any vmas that are still
      active.
      
      ppgtt_release() should then only be called when the last thing referencing
      it releases the ref, and it can just call the base cleanup and free the
      ppgtt.
      
      Note that with this we will extend the lifetime of ppgtts which
      contain shared objects. But all the non-shared objects will get
      removed as soon as they drop of the active list and for the shared
      ones the shrinker can eventually reap them. Since we currently can't
      evict ppgtt pagetables either I don't think that temporary leak is
      important.
      Signed-off-by: NMichel Thierry <michel.thierry@intel.com>
      [danvet: Add note about potential ppgtt leak with this approach.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b9d06dd9
  14. 11 8月, 2014 6 次提交
  15. 07 8月, 2014 1 次提交
  16. 24 7月, 2014 1 次提交
  17. 23 7月, 2014 3 次提交
    • C
      drm/i915: Simplify i915_gem_release_all_mmaps() · eedd10f4
      Chris Wilson 提交于
      An object can only have an active gtt mapping if it is currently bound
      into the global gtt. Therefore we can simply walk the list of all bound
      objects and check the flag upon those for an active gtt mapping.
      
      From commit 48018a57
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Fri Dec 13 15:22:31 2013 -0200
      
          drm/i915: release the GTT mmaps when going into D3
      
      Also note that the WARN is inappropriate for this function as GPU
      activity is orthogonal to GTT mmap status. Rather it is the caller that
      relies upon this condition and so it should assert that the GPU is idle
      itself.
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=80081Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: cherry-pick from -next to -fixes.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      eedd10f4
    • A
      drm/i915: Do not unmap object unless no other VMAs reference it · 9490edb5
      Armin Reese 提交于
      When using an IOMMU, GEM objects are mapped by their DMA address as the
      physical address is unknown. This depends on the underlying IOMMU
      driver to map and unmap the physical pages properly as defined in
      intel_iommu.c.
      
      The current code will tell the IOMMU to unmap the GEM BO's pages on the
      destruction of the first VMA that "maps" that BO. This is clearly wrong
      as there may be other VMAs "mapping" that BO (using flink). The scanout
      is one such example.
      
      The patch fixes this issue by only unmapping the DMA maps when there are
      no more VMAs mapping that object. This is equivalent to when an object
      is considered unbound as can be seen by the code. On the first VMA that
      again because bound, we will remap.
      
      An alternate solution would be to move the dma mapping to object
      creation and destrubtion. I am not sure if this is considered an
      unfriendly thing to do.
      
      Some notes to backporters trying to backport full PPGTT:
      
      The bug can never be hit without enabling the IOMMU. The existing code
      will also do the right thing when the object is shared via dmabuf. The
      failure should be demonstrable with flink. In cases when not using
      intel_iommu_strict it is likely (likely, as defined by: off the top of
      my head) on current workloads to *not* hit this bug since we often
      teardown all VMAs for an object shared across multiple VMs.  We also
      finish access to that object before the first dma_unmapping.
      intel_iommu_strict with flinked buffers is likely to hit this issue.
      Signed-off-by: NArmin Reese <armin.c.reese@intel.com>
      [danvet: Add the excellent commit message provided by Ben.]
      Reviewed-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9490edb5
    • J
      drm/i915: add helper for checking whether IRQs are enabled · 9df7575f
      Jesse Barnes 提交于
      Now that we use the runtime IRQ enable/disable functions in our suspend
      path, we can simply check the pm._irqs_disabled flag everywhere.  So
      rename it to catch the users, and add an inline for it to make the
      checks clear everywhere.
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9df7575f