agp/intel-gtt: export the gtt pagetable iomapping
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 9 Feb 2012 16:15:45 +0000 (17:15 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 9 Feb 2012 20:24:18 +0000 (21:24 +0100)
We need this because ppgtt page directory entries need to be in the
global gtt pagetable.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/char/agp/intel-gtt.c
include/drm/intel-gtt.h

index 0a305acb0374b7350f1d60094b161c14bb85f1a9..5cf47ac2d401d2551661355d2d5fbaccfccdb72e 100644 (file)
@@ -680,6 +680,7 @@ static int intel_gtt_init(void)
                iounmap(intel_private.registers);
                return -ENOMEM;
        }
+       intel_private.base.gtt = intel_private.gtt;
 
        global_cache_flush();   /* FIXME: ? */
 
index 6d4c77ac7d760f5dcc9e00b638c570dd16819538..0a0001b9dc7853e5fb0d84b1e3b6950429afe7f8 100644 (file)
@@ -17,6 +17,8 @@ const struct intel_gtt {
        unsigned int do_idle_maps : 1;
        /* Share the scratch page dma with ppgtts. */
        dma_addr_t scratch_page_dma;
+       /* for ppgtt PDE access */
+       u32 __iomem *gtt;
 } *intel_gtt_get(void);
 
 void intel_gtt_chipset_flush(void);