summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_gem_gtt.h
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2015-06-25 18:35:13 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-06-26 11:54:00 +0300
commitc114f76a0a76eeffa1c1be392d98182c2cc30291 (patch)
treeff16feeea3a6b7787dc21fa459c8f44af0d50f5b /drivers/gpu/drm/i915/i915_gem_gtt.h
parent567047be2a7ede082d29f45524c287b87bd75e53 (diff)
downloadlinux-c114f76a0a76eeffa1c1be392d98182c2cc30291.tar.xz
drm/i915/gtt: Make scratch page i915_page_dma compatible
Lay out scratch page structure in similar manner than other paging structures. This allows us to use the same tools for setup and teardown. Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_gtt.h')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index f4bcec2b389a..216d949507af 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -223,6 +223,10 @@ struct i915_page_dma {
#define px_page(px) (px_base(px)->page)
#define px_dma(px) (px_base(px)->daddr)
+struct i915_page_scratch {
+ struct i915_page_dma base;
+};
+
struct i915_page_table {
struct i915_page_dma base;
@@ -249,10 +253,7 @@ struct i915_address_space {
u64 start; /* Start offset always 0 for dri2 */
u64 total; /* size addr space maps (ex. 2GB for ggtt) */
- struct {
- dma_addr_t addr;
- struct page *page;
- } scratch;
+ struct i915_page_scratch *scratch_page;
/**
* List of objects currently involved in rendering.