This is for avoiding translation of the passed in address in virtual environments like Xen.
Signed-off-by: Jan Beulich <jbeul...@novell.com> --- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem.c | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) --- linux-2.6.32-rc1/drivers/gpu/drm/i915/i915_drv.c 2009-09-30 11:24:45.000000000 +0200 +++ 2.6.32-rc1-drm-i915-_PAGE_IOMAP/drivers/gpu/drm/i915/i915_drv.c 2009-09-30 00:00:00.000000000 +0200 @@ -329,7 +329,7 @@ static struct drm_driver driver = { .open = drm_open, .release = drm_release, .ioctl = drm_ioctl, - .mmap = drm_gem_mmap, + .mmap = i915_gem_mmap, .poll = drm_poll, .fasync = drm_fasync, #ifdef CONFIG_COMPAT --- linux-2.6.32-rc1/drivers/gpu/drm/i915/i915_drv.h 2009-09-30 11:24:45.000000000 +0200 +++ 2.6.32-rc1-drm-i915-_PAGE_IOMAP/drivers/gpu/drm/i915/i915_drv.h 2009-09-30 00:00:00.000000000 +0200 @@ -765,6 +765,7 @@ void i915_gem_cleanup_ringbuffer(struct int i915_gem_do_init(struct drm_device *dev, unsigned long start, unsigned long end); int i915_gem_idle(struct drm_device *dev); +int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma); int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); int i915_gem_object_set_to_gtt_domain(struct drm_gem_object *obj, int write); --- linux-2.6.32-rc1/drivers/gpu/drm/i915/i915_gem.c 2009-09-30 11:24:45.000000000 +0200 +++ 2.6.32-rc1-drm-i915-_PAGE_IOMAP/drivers/gpu/drm/i915/i915_gem.c 2009-09-30 00:00:00.000000000 +0200 @@ -1165,6 +1165,12 @@ i915_gem_mmap_ioctl(struct drm_device *d return 0; } +int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma) +{ + pgprot_val(vma->vm_page_prot) |= _PAGE_IOMAP; + return drm_gem_mmap(filp, vma); +} + /** * i915_gem_fault - fault a page into the GTT * vma: VMA in question ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel