From 4c8e8e0d0bad839cf5aacb22524885e49fe86715 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 26 Aug 2008 17:33:46 +1000 Subject: drm: add memory clean flag. When the mapping is clean this flag will be set. This can be used by a driver to save migrating and allocating pages for an object that will first be used in VRAM. --- linux-core/drm_vm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linux-core/drm_vm.c') diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index 0aabf943..48d7b057 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -792,6 +792,9 @@ static void drm_bo_vm_open_locked(struct vm_area_struct *vma) { struct drm_buffer_object *bo = (struct drm_buffer_object *) vma->vm_private_data; + /* clear the clean flags */ + bo->mem.flags &= ~DRM_BO_FLAG_CLEAN; + drm_vm_open_locked(vma); atomic_inc(&bo->usage); #ifdef DRM_ODD_MM_COMPAT -- cgit v1.2.3