summaryrefslogtreecommitdiff
path: root/linux-core/nouveau_buffer.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2007-12-16 20:16:50 -0800
committerKeith Packard <keithp@keithp.com>2007-12-21 12:16:29 -0800
commitd1187641d64f442968a3b9ea6a19de6cdd45acd4 (patch)
treed90398789d325eb265a5680f83dabfc898210e04 /linux-core/nouveau_buffer.c
parent37fb2ac4071f62bad2c36cc9ca84f9c8feee6bf5 (diff)
Rename inappropriately named 'mask' fields to 'proposed_flags' instead.
Flags pending validation were stored in a misleadingly named field, 'mask'. As 'mask' is already used to indicate pieces of a flags field which are changing, it seems better to use a name reflecting the actual purpose of this field. I chose 'proposed_flags' as they may not actually end up in 'flags', and in an case will be modified when they are moved over. This affects the API, but not ABI of the user-mode interface.
Diffstat (limited to 'linux-core/nouveau_buffer.c')
-rw-r--r--linux-core/nouveau_buffer.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/linux-core/nouveau_buffer.c b/linux-core/nouveau_buffer.c
index 59751ff2..a652bb1d 100644
--- a/linux-core/nouveau_buffer.c
+++ b/linux-core/nouveau_buffer.c
@@ -56,7 +56,7 @@ nouveau_bo_fence_type(struct drm_buffer_object *bo,
{
/* When we get called, *fclass is set to the requested fence class */
- if (bo->mem.mask & (DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE))
+ if (bo->mem.proposed_flags & (DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE))
*type = 3;
else
*type = 1;
@@ -130,8 +130,8 @@ nouveau_bo_init_mem_type(struct drm_device *dev, uint32_t type,
return 0;
}
-static uint32_t
-nouveau_bo_evict_mask(struct drm_buffer_object *bo)
+static uint64_t
+nouveau_bo_evict_flags(struct drm_buffer_object *bo)
{
switch (bo->mem.mem_type) {
case DRM_BO_MEM_LOCAL:
@@ -207,8 +207,9 @@ nouveau_bo_move_gart(struct drm_buffer_object *bo, int evict, int no_wait,
tmp_mem = *new_mem;
tmp_mem.mm_node = NULL;
- tmp_mem.mask = DRM_BO_FLAG_MEM_TT |
- DRM_BO_FLAG_CACHED | DRM_BO_FLAG_FORCE_CACHING;
+ tmp_mem.proposed_flags = (DRM_BO_FLAG_MEM_TT |
+ DRM_BO_FLAG_CACHED |
+ DRM_BO_FLAG_FORCE_CACHING);
ret = drm_bo_mem_space(bo, &tmp_mem, no_wait);
@@ -291,7 +292,7 @@ struct drm_bo_driver nouveau_bo_driver = {
.fence_type = nouveau_bo_fence_type,
.invalidate_caches = nouveau_bo_invalidate_caches,
.init_mem_type = nouveau_bo_init_mem_type,
- .evict_mask = nouveau_bo_evict_mask,
+ .evict_flags = nouveau_bo_evict_flags,
.move = nouveau_bo_move,
.ttm_cache_flush= nouveau_bo_flush_ttm
};