summaryrefslogtreecommitdiff
path: root/linux-core/drm_compat.h
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-10-11 13:40:35 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-10-11 13:40:35 +0200
commitf2db76e2f206d2017f710eaddc4b33add4498898 (patch)
treea245512bc51f70c4458af047507605a27fae5d02 /linux-core/drm_compat.h
parentc58574c60505a699e19e1ed59e1b441be2594e53 (diff)
Big update:
Adapt for new functions in the 2.6.19 kernel. Remove the ability to have multiple regions in one TTM. This simplifies a lot of code. Remove the ability to access TTMs from user space. We don't need it anymore without ttm regions. Don't change caching policy for evicted buffers. Instead change it only when the buffer is accessed by the CPU (on the first page fault). This tremendously speeds up eviction rates. Current code is safe for kernels <= 2.6.14. Should also be OK with 2.6.19 and above.
Diffstat (limited to 'linux-core/drm_compat.h')
-rw-r--r--linux-core/drm_compat.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h
index 784b9a7d..4e95679d 100644
--- a/linux-core/drm_compat.h
+++ b/linux-core/drm_compat.h
@@ -278,19 +278,30 @@ extern int drm_map_page_into_agp(struct page *page);
* static space. The page will be put by do_nopage() since we've already
* filled out the pte.
*/
-extern struct page * get_nopage_retry(void);
+
+struct fault_data {
+ struct vm_area_struct *vma;
+ unsigned long address;
+ pgoff_t pgoff;
+ unsigned int flags;
+
+ int type;
+};
+
+extern struct page *get_nopage_retry(void);
extern void free_nopage_retry(void);
-#define NOPAGE_RETRY get_nopage_retry()
+#define NOPAGE_REFAULT get_nopage_retry()
-#endif
+extern int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
+ unsigned long pfn, pgprot_t pgprot);
-/*
- * Is the PTE for this address really clear so that we can use
- * io_remap_pfn_range?
- */
+extern struct page *drm_vm_ttm_nopage(struct vm_area_struct *vma,
+ unsigned long address,
+ int *type);
-int drm_pte_is_clear(struct vm_area_struct *vma,
- unsigned long addr);
+extern struct page *drm_vm_ttm_fault(struct vm_area_struct *vma,
+ struct fault_data *data);
#endif
+#endif