Commit fe52e37f authored by Chris Wilson's avatar Chris Wilson

drm/i915: Remove bitmap tracking for used-pdes

We only operate on known extents (both for alloc/clear) and so we can use
both the knowledge of the bind/unbind range along with the knowledge of
the existing pagetable to avoid having to allocate temporary and
auxiliary bitmaps.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170215084357.19977-13-chris@chris-wilson.co.uk
parent dd19674b
This diff is collapsed.
...@@ -226,8 +226,8 @@ struct i915_page_table { ...@@ -226,8 +226,8 @@ struct i915_page_table {
struct i915_page_directory { struct i915_page_directory {
struct i915_page_dma base; struct i915_page_dma base;
unsigned long *used_pdes;
struct i915_page_table *page_table[I915_PDES]; /* PDEs */ struct i915_page_table *page_table[I915_PDES]; /* PDEs */
unsigned int used_pdes;
}; };
struct i915_page_directory_pointer { struct i915_page_directory_pointer {
...@@ -520,9 +520,7 @@ static inline size_t gen8_pte_count(uint64_t address, uint64_t length) ...@@ -520,9 +520,7 @@ static inline size_t gen8_pte_count(uint64_t address, uint64_t length)
static inline dma_addr_t static inline dma_addr_t
i915_page_dir_dma_addr(const struct i915_hw_ppgtt *ppgtt, const unsigned n) i915_page_dir_dma_addr(const struct i915_hw_ppgtt *ppgtt, const unsigned n)
{ {
return test_bit(n, ppgtt->pdp.used_pdpes) ? return px_dma(ppgtt->pdp.page_directory[n]);
px_dma(ppgtt->pdp.page_directory[n]) :
px_dma(ppgtt->base.scratch_pd);
} }
static inline struct i915_ggtt * static inline struct i915_ggtt *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment