drm/radeon: fixup clean flag handling
authorDave Airlie <airlied@redhat.com>
Mon, 6 Oct 2008 06:39:25 +0000 (16:39 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 6 Oct 2008 06:39:25 +0000 (16:39 +1000)
linux-core/drm_bo.c
linux-core/drm_bo_move.c
linux-core/drm_vm.c
linux-core/radeon_gem.c

index fa3e055..ecf65c2 100644 (file)
@@ -1174,6 +1174,7 @@ out_unlock:
        }
        /* clear the clean flags */
        bo->mem.flags &= ~DRM_BO_FLAG_CLEAN;
+       bo->mem.proposed_flags &= ~DRM_BO_FLAG_CLEAN;
 
        mutex_unlock(&dev->struct_mutex);
        mutex_unlock(&bm->evict_mutex);
index 207a5e0..7fe12f4 100644 (file)
@@ -635,6 +635,7 @@ int drm_bo_kmap(struct drm_buffer_object *bo, unsigned long start_page,
 
        /* clear the clean flags */
        bo->mem.flags &= ~DRM_BO_FLAG_CLEAN;
+       bo->mem.proposed_flags &= ~DRM_BO_FLAG_CLEAN;
 
        if (bus_size == 0) {
                return drm_bo_kmap_ttm(bo, start_page, num_pages, map);
index 48d7b05..228ea6c 100644 (file)
@@ -794,6 +794,7 @@ static void drm_bo_vm_open_locked(struct vm_area_struct *vma)
 
        /* clear the clean flags */
        bo->mem.flags &= ~DRM_BO_FLAG_CLEAN;
+       bo->mem.proposed_flags &= ~DRM_BO_FLAG_CLEAN;
 
        drm_vm_open_locked(vma);
        atomic_inc(&bo->usage);
index 7cdcf47..8c6f836 100644 (file)
@@ -1244,6 +1244,8 @@ static int radeon_gem_relocate(struct drm_device *dev, struct drm_file *file_pri
        radeon_gem_set_domain(obj, read_domains, write_domain, &flags, false);
 
        obj_priv->bo->mem.flags &= ~DRM_BO_FLAG_CLEAN;
+       obj_priv->bo->mem.proposed_flags &= ~DRM_BO_FLAG_CLEAN;
+
        if (flags == DRM_BO_FLAG_MEM_VRAM)
                *offset = obj_priv->bo->offset + dev_priv->fb_location;
        else if (flags == DRM_BO_FLAG_MEM_TT)