diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-05 19:02:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-05 19:02:01 -0400 |
commit | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (patch) | |
tree | 666dabc25a9b02e5c05f9eba32fa6b0d8027341a /drivers/gpu/drm/drm_vm.c | |
parent | 9779714c8af09d57527f18d9aa2207dcc27a8687 (diff) | |
parent | 96576a9e1a0cdb8a43d3af5846be0948f52b4460 (diff) |
Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (204 commits)
agp: intel-agp: do not use PCI resources before pci_enable_device()
agp: efficeon-agp: do not use PCI resources before pci_enable_device()
drm: kill BKL from common code
drm/kms: Simplify setup of the initial I2C encoder config.
drm,io-mapping: Specify slot to use for atomic mappings
drm/radeon/kms: only expose underscan on avivo chips
drm/radeon: add new pci ids
drm: Cleanup after failing to create master->unique and dev->name
drm/radeon: tone down overchatty acpi debug messages.
drm/radeon/kms: enable underscan option for digital connectors
drm/radeon/kms: fix calculation of h/v scaling factors
drm/radeon/kms/igp: sideport is AMD only
drm/radeon/kms: handle the case of no active displays properly in the bandwidth code
drm: move ttm global code to core drm
drm/i915: Clear the Ironlake dithering flags when the pipe doesn't want it.
drm/radeon/kms: make sure HPD is set to NONE on analog-only connectors
drm/radeon/kms: make sure rio_mem is valid before unmapping it
drm/agp/i915: trim stolen space to 32M
drm/i915: Unset cursor if out-of-bounds upon mode change (v4)
drm/i915: Unreference object not handle on creation
...
Diffstat (limited to 'drivers/gpu/drm/drm_vm.c')
-rw-r--r-- | drivers/gpu/drm/drm_vm.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index c3b13fb41d0c..3778360eceea 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c | |||
@@ -61,7 +61,7 @@ static pgprot_t drm_io_prot(uint32_t map_type, struct vm_area_struct *vma) | |||
61 | tmp = pgprot_writecombine(tmp); | 61 | tmp = pgprot_writecombine(tmp); |
62 | else | 62 | else |
63 | tmp = pgprot_noncached(tmp); | 63 | tmp = pgprot_noncached(tmp); |
64 | #elif defined(__sparc__) | 64 | #elif defined(__sparc__) || defined(__arm__) |
65 | tmp = pgprot_noncached(tmp); | 65 | tmp = pgprot_noncached(tmp); |
66 | #endif | 66 | #endif |
67 | return tmp; | 67 | return tmp; |
@@ -601,6 +601,7 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) | |||
601 | } | 601 | } |
602 | 602 | ||
603 | switch (map->type) { | 603 | switch (map->type) { |
604 | #if !defined(__arm__) | ||
604 | case _DRM_AGP: | 605 | case _DRM_AGP: |
605 | if (drm_core_has_AGP(dev) && dev->agp->cant_use_aperture) { | 606 | if (drm_core_has_AGP(dev) && dev->agp->cant_use_aperture) { |
606 | /* | 607 | /* |
@@ -615,20 +616,31 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) | |||
615 | break; | 616 | break; |
616 | } | 617 | } |
617 | /* fall through to _DRM_FRAME_BUFFER... */ | 618 | /* fall through to _DRM_FRAME_BUFFER... */ |
619 | #endif | ||
618 | case _DRM_FRAME_BUFFER: | 620 | case _DRM_FRAME_BUFFER: |
619 | case _DRM_REGISTERS: | 621 | case _DRM_REGISTERS: |
620 | offset = dev->driver->get_reg_ofs(dev); | 622 | offset = dev->driver->get_reg_ofs(dev); |
621 | vma->vm_flags |= VM_IO; /* not in core dump */ | 623 | vma->vm_flags |= VM_IO; /* not in core dump */ |
622 | vma->vm_page_prot = drm_io_prot(map->type, vma); | 624 | vma->vm_page_prot = drm_io_prot(map->type, vma); |
625 | #if !defined(__arm__) | ||
623 | if (io_remap_pfn_range(vma, vma->vm_start, | 626 | if (io_remap_pfn_range(vma, vma->vm_start, |
624 | (map->offset + offset) >> PAGE_SHIFT, | 627 | (map->offset + offset) >> PAGE_SHIFT, |
625 | vma->vm_end - vma->vm_start, | 628 | vma->vm_end - vma->vm_start, |
626 | vma->vm_page_prot)) | 629 | vma->vm_page_prot)) |
627 | return -EAGAIN; | 630 | return -EAGAIN; |
631 | #else | ||
632 | if (remap_pfn_range(vma, vma->vm_start, | ||
633 | (map->offset + offset) >> PAGE_SHIFT, | ||
634 | vma->vm_end - vma->vm_start, | ||
635 | vma->vm_page_prot)) | ||
636 | return -EAGAIN; | ||
637 | #endif | ||
638 | |||
628 | DRM_DEBUG(" Type = %d; start = 0x%lx, end = 0x%lx," | 639 | DRM_DEBUG(" Type = %d; start = 0x%lx, end = 0x%lx," |
629 | " offset = 0x%llx\n", | 640 | " offset = 0x%llx\n", |
630 | map->type, | 641 | map->type, |
631 | vma->vm_start, vma->vm_end, (unsigned long long)(map->offset + offset)); | 642 | vma->vm_start, vma->vm_end, (unsigned long long)(map->offset + offset)); |
643 | |||
632 | vma->vm_ops = &drm_vm_ops; | 644 | vma->vm_ops = &drm_vm_ops; |
633 | break; | 645 | break; |
634 | case _DRM_CONSISTENT: | 646 | case _DRM_CONSISTENT: |