1. 08 5月, 2015 3 次提交
  2. 30 4月, 2015 1 次提交
  3. 24 4月, 2015 6 次提交
  4. 20 4月, 2015 5 次提交
  5. 10 4月, 2015 14 次提交
  6. 09 4月, 2015 2 次提交
  7. 27 3月, 2015 6 次提交
    • J
      drm/i915: Compare GGTT view structs instead of types · 9abc4648
      Joonas Lahtinen 提交于
      To allow for views where the view type is not defined by the view type only,
      like it is in stereo or rotated 90 degree view, change the semantic to require
      the whole view structure for comparison when we match a GGTT view.
      
      This allows including parameters like offset to be included in the view which
      is useful for eg. partial views.
      
      v3:
      - Rely on ggtt_view type being 0 for non-GGTT vma's, which equals to
        I915_GGTT_VIEW_NORMAL. (Daniel Vetter)
      - Do not use potentially slower comparison when we only want to know if
        something is or is not a normal view.
      - Rebase on top of rotated view patches. Add rotated view singleton.
      - If one view is missing in comparison they're equal only if both are missing.
      
      v4:
      - Use comparison helper in obj_to_ggtt_view too. (Tvrtko Ursulin)
      - Do WARN_ON if one view is NULL. (Tvrtko Ursulin)
      
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      9abc4648
    • K
      drm/i915: fix simple_return.cocci warnings · 2f2cf682
      kbuild test robot 提交于
      drivers/gpu/drm/i915/i915_gem_gtt.c:1349:1-4: WARNING: end returns can be simpified and declaration on line 1347 can be dropped
      
       Simplify a trivial if-return sequence.  Possibly combine with a
       preceding function call.
      Generated by: scripts/coccinelle/misc/simple_return.cocci
      
      CC: Michel Thierry <michel.thierry@intel.com>
      Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2f2cf682
    • M
      drm/i915: Add dynamic page trace events · 72744cb1
      Michel Thierry 提交于
      Traces for page directories and tables allocation and map.
      
      v2: Removed references to teardown.
      v3: bitmap_scnprintf has been deprecated.
      v4: Replace bitmap_scnprintf with scnprintf correctly, and get right
      range lengths. (Mika)
      
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: NMichel Thierry <michel.thierry@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      72744cb1
    • M
      drm/i915: Finish gen6/7 dynamic page table allocation · 4933d519
      Michel Thierry 提交于
      This patch continues on the idea from "Track GEN6 page table usage".
      From here on, in the steady state, PDEs are all pointing to the scratch
      page table (as recommended in the spec). When an object is allocated in
      the VA range, the code will determine if we need to allocate a page for
      the page table. Similarly when the object is destroyed, we will remove,
      and free the page table pointing the PDE back to the scratch page.
      
      Following patches will work to unify the code a bit as we bring in GEN8
      support. GEN6 and GEN8 are different enough that I had a hard time to
      get to this point with as much common code as I do.
      
      The aliasing PPGTT must pre-allocate all of the page tables. There are a
      few reasons for this. Two trivial ones: aliasing ppgtt goes through the
      ggtt paths, so it's hard to maintain, we currently do not restore the
      default context (assuming the previous force reload is indeed
      necessary). Most importantly though, the only way (it seems from
      empirical evidence) to invalidate the CS TLBs on non-render ring is to
      either use ring sync (which requires actually stopping the rings in
      order to synchronize when the sync completes vs. where you are in
      execution), or to reload DCLV.  Since without full PPGTT we do not ever
      reload the DCLV register, there is no good way to achieve this. The
      simplest solution is just to not support dynamic page table
      creation/destruction in the aliasing PPGTT.
      
      We could always reload DCLV, but this seems like quite a bit of excess
      overhead only to save at most 2MB-4k of memory for the aliasing PPGTT
      page tables.
      
      v2: Make the page table bitmap declared inside the function (Chris)
      Simplify the way scratching address space works.
      Move the alloc/teardown tracepoints up a level in the call stack so that
      both all implementations get the trace.
      
      v3: Updated trace event to spit out a name
      
      v4: Aliasing ppgtt is now initialized differently (in setup global gtt)
      
      v5: Rebase to latest code. Also removed unnecessary aliasing ppgtt check
      for trace, as it is no longer possible after the PPGTT cleanup patch series
      of a couple of months ago (Daniel).
      
      v6: Implement changes from code review (Daniel):
       - allocate/teardown_va_range calls added.
       - Add a scratch page allocation helper (only need the address).
       - Move trace events to a new patch.
       - Use updated mark_tlbs_dirty.
       - Moved pt preallocation for aliasing ppgtt into gen6_ppgtt_init.
      
      v7: teardown_va_range removed (Daniel).
          In init, gen6_ppgtt_clear_range call is only needed for aliasing ppgtt.
      
      v8: Rebase after s/page_tables/page_table/.
      
      v9: Remove unnecessary scratch flag in page_table struct, future patches
      can just compare against ppgtt->scratch_pt, and alloc_pt_scratch becomes
      redundant. Initialize scratch_pt and pt. (Mika)
      
      v10: Clean up aliasing ppgtt init error path and prevent leaking the
      ppgtt obj when init fails. (Mika)
      Updated commit author. (Daniel)
      
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v4+)
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4933d519
    • M
      drm/i915: Remove unnecessary gen6_ppgtt_unmap_pages · 59568eb5
      Michel Thierry 提交于
      We are already unmapping them in gen6_ppgtt_free. This function became
      redundant since commit 06fda602
      ("drm/i915: Create page table allocators").
      
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NMichel Thierry <michel.thierry@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      59568eb5
    • M
      drm/i915: Fix i915_dma_map_single positive error code · 1266cdb1
      Michel Thierry 提交于
      i915_dma_map_single relies on dma_mapping_error, which returns positive
      error codes. Found by static checker.
      
      Introduced by commit 678d96fb
      ("drm/i915: Track GEN6 page table usage").
      
      v2: Return negative error code and renamed commit title. (Dan)
      v3: Missing reported-by tag (Daniel)
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NMichel Thierry <michel.thierry@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1266cdb1
  8. 26 3月, 2015 1 次提交
  9. 23 3月, 2015 1 次提交
    • T
      drm/i915/skl: Support secondary (rotated) frame buffer mapping · 50470bb0
      Tvrtko Ursulin 提交于
      90/270 rotated scanout needs a rotated GTT view of the framebuffer.
      
      This is put in a separate VMA with a dedicated ggtt view and wired such that
      it is created when a framebuffer is pinned to a 90/270 rotated plane.
      
      Rotation is only possible with Yb/Yf buffers and error is propagated to
      user space in case of a mismatch.
      
      Special rotated page view is constructed at the VMA creation time by
      borrowing the DMA addresses from obj->pages.
      
      v2:
          * Do not bother with pages for rotated sg list, just populate the DMA
            addresses. (Daniel Vetter)
          * Checkpatch cleanup.
      
      v3:
          * Rebased on top of new plane handling (create rotated mapping when
            setting the rotation property).
          * Unpin rotated VMA on unpinning from display plane.
          * Simplify rotation check using bitwise AND. (Chris Wilson)
      
      v4:
          * Fix unpinning of optional rotated mapping so it is really considered
            to be optional.
      
      v5:
         * Rebased for fb modifier changes.
         * Rebased for atomic commit.
         * Only pin needed view for display. (Ville Syrjälä, Daniel Vetter)
      
      v6:
         * Rebased after preparatory work has been extracted out. (Daniel Vetter)
      
      v7:
         * Slightly simplified tiling geometry calculation.
         * Moved rotated GGTT view implementation into i915_gem_gtt.c (Daniel Vetter)
      
      v8:
         * Do not use i915_gem_obj_size to get object size since that actually
           returns the size of an VMA which may not exist.
         * Rebased for ggtt view changes.
      
      v9:
         * Rebased after code review changes on the preceding patches.
         * Tidy function definitions. (Joonas Lahtinen)
      
      For: VIZ-4726
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reviewed-by: Michel Thierry <michel.thierry@intel.com> (v4)
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      50470bb0
  10. 20 3月, 2015 1 次提交
    • B
      drm/i915: Track page table reload need · 563222a7
      Ben Widawsky 提交于
      This patch was formerly known as, "Force pd restore when PDEs change,
      gen6-7." I had to change the name because it is needed for GEN8 too.
      
      The real issue this is trying to solve is when a new object is mapped
      into the current address space. The GPU does not snoop the new mapping
      so we must do the gen specific action to reload the page tables.
      
      GEN8 and GEN7 do differ in the way they load page tables for the RCS.
      GEN8 does so with the context restore, while GEN7 requires the proper
      load commands in the command streamer. Non-render is similar for both.
      
      Caveat for GEN7
      The docs say you cannot change the PDEs of a currently running context.
      We never map new PDEs of a running context, and expect them to be
      present - so I think this is okay. (We can unmap, but this should also
      be okay since we only unmap unreferenced objects that the GPU shouldn't
      be tryingto va->pa xlate.) The MI_SET_CONTEXT command does have a flag
      to signal that even if the context is the same, force a reload. It's
      unclear exactly what this does, but I have a hunch it's the right thing
      to do.
      
      The logic assumes that we always emit a context switch after mapping new
      PDEs, and before we submit a batch. This is the case today, and has been
      the case since the inception of hardware contexts. A note in the comment
      let's the user know.
      
      It's not just for gen8. If the current context has mappings change, we
      need a context reload to switch
      
      v2: Rebased after ppgtt clean up patches. Split the warning for aliasing
      and true ppgtt options. And do not break aliasing ppgtt, where to->ppgtt
      is always null.
      
      v3: Invalidate PPGTT TLBs inside alloc_va_range.
      
      v4: Rename ppgtt_invalidate_tlbs to mark_tlbs_dirty and move
      pd_dirty_rings from i915_address_space to i915_hw_ppgtt. Fixes when
      neither ctx->ppgtt and aliasing_ppgtt exist.
      
      v5: Removed references to teardown_va_range.
      
      v6: Updated needs_pd_load_pre/post.
      
      v7: Fix pd_dirty_rings check in needs_pd_load_post, and update/move
      comment about updated PDEs to object_pin/bind (Mika).
      
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v2+)
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      563222a7