diff options
author | Dave Airlie <airlied@linux.ie> | 2004-10-23 06:59:15 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-10-23 06:59:15 +0000 |
commit | 182a0e5dac5e2ae3751abc2eaa0398aa0150a131 (patch) | |
tree | ec9525a5a06709b6ed7aabd5f3cf02fe9df6376c /linux-core/drm_compat.h | |
parent | 8d7e798d4c73650ed240a3ad194744b94043e31f (diff) |
fix pfn vs page for older kernels (2.6.9-rc kernels many not work..)
Diffstat (limited to 'linux-core/drm_compat.h')
-rw-r--r-- | linux-core/drm_compat.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index b7fc56ef..4733ba33 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -181,6 +181,18 @@ static inline void radeon_delete_i2c_busses(struct drm_device *dev) #define VM_OFFSET(vma) ((vma)->vm_pgoff << PAGE_SHIFT) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) +static inline int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t pgprot) +{ + return remap_page_range(DRM_RPR_ARG(vma) from, + pfn << PAGE_SHIFT, + size, + pgprot); +} +#endif + +extern const drm_agp_t drm_agp_entry; + /* old architectures */ #ifdef __AMD64__ #define __x86_64__ |