From: Dave Airlie Date: Mon, 6 Oct 2008 06:39:25 +0000 (+1000) Subject: drm/radeon: fixup clean flag handling X-Git-Tag: submit/1.0/20121108.012404~642^2~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a981a6860365065682f3ca295939e629b989a9d1;p=profile%2Fivi%2Flibdrm.git drm/radeon: fixup clean flag handling --- diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c index fa3e055..ecf65c2 100644 --- a/linux-core/drm_bo.c +++ b/linux-core/drm_bo.c @@ -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); diff --git a/linux-core/drm_bo_move.c b/linux-core/drm_bo_move.c index 207a5e0..7fe12f4 100644 --- a/linux-core/drm_bo_move.c +++ b/linux-core/drm_bo_move.c @@ -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); diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index 48d7b05..228ea6c 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -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); diff --git a/linux-core/radeon_gem.c b/linux-core/radeon_gem.c index 7cdcf47..8c6f836 100644 --- a/linux-core/radeon_gem.c +++ b/linux-core/radeon_gem.c @@ -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)