• Ben Widawsky's avatar
    drm/i915: page table abstractions · d7b3de91
    Ben Widawsky authored
    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: default avatarBen Widawsky <ben@bwidawsk.net>
    Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v2+)
    Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    d7b3de91
i915_gem_gtt.h 11.3 KB