aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_vm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-08-26 17:33:46 +1000
committerDave Airlie <airlied@redhat.com>2008-08-26 17:33:46 +1000
commit4c8e8e0d0bad839cf5aacb22524885e49fe86715 (patch)
treeb0d37af2d264f13155502bfbcf01048011d1df03 /linux-core/drm_vm.c
parent9afd2659430245c456cf887d47087de047c0aba8 (diff)
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.
Diffstat (limited to 'linux-core/drm_vm.c')
-rw-r--r--linux-core/drm_vm.c3
1 files changed, 3 insertions, 0 deletions
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