1. 10 4月, 2015 3 次提交
  2. 27 3月, 2015 3 次提交
    • 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
    • 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: Prevent out of range pt in gen6_for_each_pde · fdc454c1
      Michel Thierry 提交于
      Found by static analysis tool, this was harmless as the pt was not
      used out of scope though.
      
      Introduced by commit 678d96fb
      ("drm/i915: Track GEN6 page table usage").
      
      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>
      fdc454c1
  3. 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
  4. 20 3月, 2015 3 次提交
    • 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
    • B
      drm/i915: Track GEN6 page table usage · 678d96fb
      Ben Widawsky 提交于
      Instead of implementing the full tracking + dynamic allocation, this
      patch does a bit less than half of the work, by tracking and warning on
      unexpected conditions. The tracking itself follows which PTEs within a
      page table are currently being used for objects. The next patch will
      modify this to actually allocate the page tables only when necessary.
      
      With the current patch there isn't much in the way of making a gen
      agnostic range allocation function. However, in the next patch we'll add
      more specificity which makes having separate functions a bit easier to
      manage.
      
      One important change introduced here is that DMA mappings are
      created/destroyed at the same page directories/tables are
      allocated/deallocated.
      
      Notice that aliasing PPGTT is not managed here. The patch which actually
      begins dynamic allocation/teardown explains the reasoning for this.
      
      v2: s/pdp.page_directory/pdp.page_directories
      Make a scratch page allocation helper
      
      v3: Rebase and expand commit message.
      
      v4: Allocate required pagetables only when it is needed, _bind_to_vm
      instead of bind_vma (Daniel).
      
      v5: Rebased to remove the unnecessary noise in the diff, also:
       - PDE mask is GEN agnostic, renamed GEN6_PDE_MASK to I915_PDE_MASK.
       - Removed unnecessary checks in gen6_alloc_va_range.
       - Changed map/unmap_px_single macros to use dma functions directly and
         be part of a static inline function instead.
       - Moved drm_device plumbing through page tables operation to its own
         patch.
       - Moved allocate/teardown_va_range calls until they are fully
         implemented (in subsequent patch).
       - Merged pt and scratch_pt unmap_and_free path.
       - Moved scratch page allocator helper to the patch that will use it.
      
      v6: Reduce complexity by not tearing down pagetables dynamically, the
      same can be achieved while freeing empty vms. (Daniel)
      
      v7: s/i915_dma_map_px_single/i915_dma_map_single
      s/gen6_write_pdes/gen6_write_pde
      Prevent a NULL case when only GGTT is available. (Mika)
      
      v8: Rebased after s/page_tables/page_table/.
      
      v9: Reworked i915_pte_index and i915_pte_count.
      Also exercise bitmap allocation here (gen6_alloc_va_range) and fix
      incorrect write_page_range in i915_gem_restore_gtt_mappings (Mika).
      
      Cc: Daniel Vetter <daniel@ffwll.ch>
      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> (v3+)
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      678d96fb
    • M
      drm/i915: page table generalizations · 07749ef3
      Michel Thierry 提交于
      No functional changes, but will improve code clarity and removed some
      duplicated defines.
      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>
      07749ef3
  5. 25 2月, 2015 3 次提交
    • B
      drm/i915: Create page table allocators · 06fda602
      Ben Widawsky 提交于
      As we move toward dynamic page table allocation, it becomes much easier
      to manage our data structures if break do things less coarsely by
      breaking up all of our actions into individual tasks.  This makes the
      code easier to write, read, and verify.
      
      Aside from the dissection of the allocation functions, the patch
      statically allocates the page table structures without a page directory.
      This remains the same for all platforms,
      
      The patch itself should not have much functional difference. The primary
      noticeable difference is the fact that page tables are no longer
      allocated, but rather statically declared as part of the page directory.
      This has non-zero overhead, but things gain additional complexity as a
      result.
      
      This patch exists for a few reasons:
      1. Splitting out the functions allows easily combining GEN6 and GEN8
      code. Page tables have no difference based on GEN8. As we'll see in a
      future patch when we add the DMA mappings to the allocations, it
      requires only one small change to make work, and error handling should
      just fall into place.
      
      2. Unless we always want to allocate all page tables under a given PDE,
      we'll have to eventually break this up into an array of pointers (or
      pointer to pointer).
      
      3. Having the discrete functions is easier to review, and understand.
      All allocations and frees now take place in just a couple of locations.
      Reviewing, and catching leaks should be easy.
      
      4. Less important: the GFP flags are confined to one location, which
      makes playing around with such things trivial.
      
      v2: Updated commit message to explain why this patch exists
      
      v3: For lrc, s/pdp.page_directory[i].daddr/pdp.page_directory[i]->daddr/
      
      v4: Renamed free_pt/pd_single functions to unmap_and_free_pt/pd (Daniel)
      
      v5: Added additional safety checks in gen8 clear/free/unmap.
      
      v6: Use WARN_ON and return -EINVAL in alloc_pt_range (Mika).
      
      v7: Make err_out loop symmetrical to the way we allocate in
      alloc_pt_range. Also s/page_tables/page_table and correct commit
      message (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> (v3+)
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      06fda602
    • B
      drm/i915: Complete page table structures · 7324cc04
      Ben Widawsky 提交于
      Move the remaining members over to the new page table structures.
      
      This can be squashed with the previous commit if desire. The reasoning
      is the same as that patch. I simply felt it is easier to review if split.
      
      v2: In lrc: s/ppgtt->pd_dma_addr[i]/ppgtt->pdp.page_directory[i].daddr/
      v3: Rebase.
      v4: Rebased after s/page_tables/page_table/.
      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>
      7324cc04
    • B
      drm/i915: page table abstractions · d7b3de91
      Ben Widawsky 提交于
      When we move to dynamic page allocation, keeping page_directory and pagetabs as
      separate structures will help to break actions into simpler tasks.
      
      To help transition the code nicely there is some wasted space in gen6/7.
      This will be ameliorated shortly.
      
      Following the x86 pagetable terminology:
      PDPE = struct i915_page_directory_pointer_entry.
      PDE = struct i915_page_directory_entry [page_directory].
      PTE = struct i915_page_table_entry [page_tables].
      
      v2: fixed mismatches after clean-up/rebase.
      
      v3: Clarify the names of the multiple levels of page tables (Daniel)
      
      v4: Addressing Mika's review comments.
      s/gen8_free_page_directories/gen8_free_page_directory and free the
      page tables for the directory there.
      In gen8_ppgtt_allocate_page_directories, do not leak previously allocated
      pt in case the page_directory alloc fails.
      Update error return handling in gen8_ppgtt_alloc.
      
      v5: Do not leak pt on error in gen6_ppgtt_allocate_page_tables. (Mika)
      
      v6: s/page_tables/page_table/. (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>
      d7b3de91
  6. 14 2月, 2015 2 次提交
  7. 15 12月, 2014 1 次提交
    • T
      drm/i915: Infrastructure for supporting different GGTT views per object · fe14d5f4
      Tvrtko Ursulin 提交于
      Things like reliable GGTT mappings and mirrored 2d-on-3d display will need
      to map objects into the same address space multiple times.
      
      Added a GGTT view concept and linked it with the VMA to distinguish between
      multiple instances per address space.
      
      New objects and GEM functions which do not take this new view as a parameter
      assume the default of zero (I915_GGTT_VIEW_NORMAL) which preserves the
      previous behaviour.
      
      This now means that objects can have multiple VMA entries so the code which
      assumed there will only be one also had to be modified.
      
      Alternative GGTT views are supposed to borrow DMA addresses from obj->pages
      which is DMA mapped on first VMA instantiation and unmapped on the last one
      going away.
      
      v2:
          * Removed per view special casing in i915_gem_ggtt_prepare /
            finish_object in favour of creating and destroying DMA mappings
            on first VMA instantiation and last VMA destruction. (Daniel Vetter)
          * Simplified i915_vma_unbind which does not need to count the GGTT views.
            (Daniel Vetter)
          * Also moved obj->map_and_fenceable reset under the same check.
          * Checkpatch cleanups.
      
      v3:
          * Only retire objects once the last VMA is unbound.
      
      v4:
          * Keep scatter-gather table for alternative views persistent for the
            lifetime of the VMA.
          * Propagate binding errors to callers and handle appropriately.
      
      v5:
          * Explicitly look for normal GGTT view in i915_gem_obj_bound to align
            usage in i915_gem_object_ggtt_unpin. (Michel Thierry)
          * Change to single if statement in i915_gem_obj_to_ggtt. (Michel Thierry)
          * Removed stray semi-colon in i915_gem_object_set_cache_level.
      
      For: VIZ-4544
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NMichel Thierry <michel.thierry@intel.com>
      [danvet: Drop hunk from i915_gem_shrink since it's just prettification
      but upsets a __must_check warning.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fe14d5f4
  8. 03 12月, 2014 2 次提交
  9. 20 11月, 2014 1 次提交
  10. 04 11月, 2014 1 次提交
  11. 03 9月, 2014 1 次提交
  12. 13 8月, 2014 4 次提交
  13. 12 8月, 2014 1 次提交
    • 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
  14. 08 8月, 2014 1 次提交
  15. 17 6月, 2014 1 次提交
    • A
      drm/i915: Added write-enable pte bit supportt · 24f3a8cf
      Akash Goel 提交于
      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: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      24f3a8cf
  16. 23 5月, 2014 2 次提交
  17. 07 5月, 2014 1 次提交
    • V
      drm/i915/chv: PPAT setup for Cherryview · ee0ce478
      Ville Syrjälä 提交于
      Ignore the cache bits in PPAT and just set the snoop bit where
      appropriate. BDW WB is mapped to snooped access, while all other
      modes are mapped to non-snooped access.
      
      The hardware supposedly ignores everything except the snoop bit
      in the PPAT entries.
      
      Additionally the hardware actually enforces snooping for all
      page table accesses, and thus the snoop bit is ignored for PDEs.
      
      v2: Rebased on top of the bdw resume fix to reload the ppat entries.
      
      v3: Rebase on top of the i915_gem_gtt.h header extraction.
      
      Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> (v1)
      Acked-by: NBen Widawsky <ben@bwidawsk.net>
      Reviewed-by: NRafael Barbalho <rafael.barbalho@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ee0ce478
  18. 02 4月, 2014 1 次提交
    • B
      drm/i915: Split out GTT specific header file · 0260c420
      Ben Widawsky 提交于
      This file contains all necessary defines, prototypes and typesdefs for
      manipulating GEN graphics address translation (this does not include the
      legacy AGP driver)
      
      Reiterating the comment in the header,
      "Please try to maintain the following order within this file unless it
      makes sense to do otherwise. From top to bottom:
      1. typedefs
      2. #defines, and macros
      3. structure definitions
      4. function prototypes
      
      Within each section, please try to order by generation in ascending
      order, from top to bottom (ie. GEN6 on the top, GEN8 on the bottom)."
      
      I've made some minor cleanups, and fixed a couple of typos while here -
      but there should be no functional changes.
      
      The purpose of the patch is to reduce clutter in our main header file,
      making room for new growth, and make documentation of our interfaces
      easier by splitting things out.
      
      With a little more work, like making i915_gtt a pointer, we could
      potentially completely isolate this header from i915_drv.h. At the
      moment however, I don't think it's worth the effort.
      
      Personally, I would have liked to put the PTE encoding functions in this
      file too, but I didn't want to rock the boat too much.
      
      A similar patch has been in use on my machine for some time. This exact
      patch though has only been compile tested.
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0260c420