mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-08 13:58:20 +02:00
Some ia64 platforms may not support write combining on all type of memory,
so we need to consult the EFI memory map before we try to set the write
combine attribute of a page. This patch will try to map a page write
combined if it's not an AGP page and the EFI memory map says it's ok,
otherwise it falls back to a regular, uncached mapping. Can someone
please apply this to the drm tree?
From: Jesse Barnes
This commit is contained in:
parent
459ef48629
commit
385f927692
1 changed files with 9 additions and 2 deletions
|
|
@ -34,6 +34,9 @@
|
|||
*/
|
||||
|
||||
#include "drmP.h"
|
||||
#if defined(__ia64__)
|
||||
#include <linux/efi.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \c nopage method for AGP virtual memory.
|
||||
|
|
@ -639,9 +642,13 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
|
|||
vma->vm_flags |= VM_IO; /* not in core dump */
|
||||
}
|
||||
#if defined(__ia64__)
|
||||
if (map->type != _DRM_AGP)
|
||||
if (efi_range_is_wc(vma->vm_start, vma->vm_end -
|
||||
vma->vm_start))
|
||||
vma->vm_page_prot =
|
||||
pgprot_writecombine(vma->vm_page_prot);
|
||||
pgprot_writecombine(vma->vm_page_prot);
|
||||
else
|
||||
vma->vm_page_prot =
|
||||
pgprot_noncached(vma->vm_page_prot);
|
||||
#endif
|
||||
offset = dev->driver->get_reg_ofs(dev);
|
||||
#ifdef __sparc__
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue