drm/radeon: fixup clean flag handling

main
Dave Airlie 2008-10-06 16:39:25 +10:00
parent af2323b4b3
commit a981a68603
4 changed files with 5 additions and 0 deletions

View 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);

View 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);

View 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);

View 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)