aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_objects.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2007-12-16 01:12:07 -0800
committerKeith Packard <keithp@keithp.com>2007-12-21 12:16:29 -0800
commit881ee70ab7bab5d6f6140dc9bf1e19c7b5844084 (patch)
tree9048804d2930a7ff8c3cf77dfd9488a81668a9ae /linux-core/drm_objects.h
parent6d44f48002c19d67187adb660ef74dd1870d52c2 (diff)
Move dummy_read_page from drm_ttm_set_user to drm_ttm_create.
I'm hoping to use the dummy_read_page for kernel allocated buffers to avoid allocating extra pages for read-only buffers (like vertex and batch buffers). This also eliminates the 'write' parameter to drm_ttm_set_user and just has DRM_TTM_PAGE_WRITE passed into drm_ttm_create.
Diffstat (limited to 'linux-core/drm_objects.h')
-rw-r--r--linux-core/drm_objects.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/linux-core/drm_objects.h b/linux-core/drm_objects.h
index fa029d8e..375420dc 100644
--- a/linux-core/drm_objects.h
+++ b/linux-core/drm_objects.h
@@ -297,7 +297,9 @@ struct drm_ttm {
};
-extern struct drm_ttm *drm_ttm_create(struct drm_device *dev, unsigned long size, uint32_t page_flags);
+extern struct drm_ttm *drm_ttm_create(struct drm_device *dev, unsigned long size,
+ uint32_t page_flags,
+ struct page *dummy_read_page);
extern int drm_ttm_bind(struct drm_ttm *ttm, struct drm_bo_mem_reg *bo_mem);
extern void drm_ttm_unbind(struct drm_ttm *ttm);
extern void drm_ttm_evict(struct drm_ttm *ttm);
@@ -307,10 +309,8 @@ extern void drm_ttm_cache_flush(void);
extern int drm_ttm_populate(struct drm_ttm *ttm);
extern int drm_ttm_set_user(struct drm_ttm *ttm,
struct task_struct *tsk,
- int write,
unsigned long start,
- unsigned long num_pages,
- struct page *dummy_read_page);
+ unsigned long num_pages);
/*
* Destroy a ttm. The user normally calls drmRmMap or a similar IOCTL to do
@@ -362,7 +362,7 @@ extern int drm_ttm_destroy(struct drm_ttm *ttm);
/*
* This ttm will be written to by the GPU
*/
-#define DRM_TTM_PAGE_USER_WRITE (1 << 6)
+#define DRM_TTM_PAGE_WRITE (1 << 6)
/*
* This ttm was mapped to the GPU, and so the contents may have
* been modified