summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-10-26 10:25:57 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2007-10-26 10:27:30 +0200
commit1681189e11b5a00ae72a55de932146ea37f7afd9 (patch)
treea4aa5ed80130d7325d61693b15cdf65944d2cacb /linux-core
parentb9d9c30474238ac8ba4899a19fe4a97e9376f6c4 (diff)
Buffer flags and masks are 64-bit.
don't mask off the high dword. Signed-off-by: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_bo.c12
-rw-r--r--linux-core/drm_bo_move.c12
-rw-r--r--linux-core/drm_objects.h3
3 files changed, 14 insertions, 13 deletions
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c
index 8d1e2f56..16203c77 100644
--- a/linux-core/drm_bo.c
+++ b/linux-core/drm_bo.c
@@ -54,9 +54,9 @@ static int drm_bo_setup_vm_locked(struct drm_buffer_object * bo);
static void drm_bo_takedown_vm_locked(struct drm_buffer_object * bo);
static void drm_bo_unmap_virtual(struct drm_buffer_object * bo);
-static inline uint32_t drm_bo_type_flags(unsigned type)
+static inline uint64_t drm_bo_type_flags(unsigned type)
{
- return (1 << (24 + type));
+ return (1ULL << (24 + type));
}
/*
@@ -785,10 +785,10 @@ static int drm_bo_mem_force_space(struct drm_device * dev,
static int drm_bo_mt_compatible(struct drm_mem_type_manager * man,
uint32_t mem_type,
- uint32_t mask, uint32_t * res_mask)
+ uint64_t mask, uint32_t * res_mask)
{
- uint32_t cur_flags = drm_bo_type_flags(mem_type);
- uint32_t flag_diff;
+ uint64_t cur_flags = drm_bo_type_flags(mem_type);
+ uint64_t flag_diff;
if (man->flags & _DRM_FLAG_MEMTYPE_CACHED)
cur_flags |= DRM_BO_FLAG_CACHED;
@@ -1271,7 +1271,7 @@ static void drm_buffer_user_object_unmap(struct drm_file *file_priv,
* Note that new_mem_flags are NOT transferred to the bo->mem.mask.
*/
-int drm_bo_move_buffer(struct drm_buffer_object * bo, uint32_t new_mem_flags,
+int drm_bo_move_buffer(struct drm_buffer_object * bo, uint64_t new_mem_flags,
int no_wait, int move_unfenced)
{
struct drm_device *dev = bo->dev;
diff --git a/linux-core/drm_bo_move.c b/linux-core/drm_bo_move.c
index 2a35d45b..7c86c4aa 100644
--- a/linux-core/drm_bo_move.c
+++ b/linux-core/drm_bo_move.c
@@ -53,8 +53,8 @@ int drm_bo_move_ttm(struct drm_buffer_object * bo,
{
struct drm_ttm *ttm = bo->ttm;
struct drm_bo_mem_reg *old_mem = &bo->mem;
- uint32_t save_flags = old_mem->flags;
- uint32_t save_mask = old_mem->mask;
+ uint64_t save_flags = old_mem->flags;
+ uint64_t save_mask = old_mem->mask;
int ret;
if (old_mem->mem_type == DRM_BO_MEM_TT) {
@@ -210,8 +210,8 @@ int drm_bo_move_memcpy(struct drm_buffer_object * bo,
void *old_iomap;
void *new_iomap;
int ret;
- uint32_t save_flags = old_mem->flags;
- uint32_t save_mask = old_mem->mask;
+ uint64_t save_flags = old_mem->flags;
+ uint64_t save_mask = old_mem->mask;
unsigned long i;
unsigned long page;
unsigned long add = 0;
@@ -333,8 +333,8 @@ int drm_bo_move_accel_cleanup(struct drm_buffer_object * bo,
struct drm_mem_type_manager *man = &dev->bm.man[new_mem->mem_type];
struct drm_bo_mem_reg *old_mem = &bo->mem;
int ret;
- uint32_t save_flags = old_mem->flags;
- uint32_t save_mask = old_mem->mask;
+ uint64_t save_flags = old_mem->flags;
+ uint64_t save_mask = old_mem->mask;
struct drm_buffer_object *old_obj;
if (bo->fence)
diff --git a/linux-core/drm_objects.h b/linux-core/drm_objects.h
index 702ece56..8b14ac6f 100644
--- a/linux-core/drm_objects.h
+++ b/linux-core/drm_objects.h
@@ -511,7 +511,8 @@ extern int drm_bo_wait(struct drm_buffer_object * bo, int lazy, int ignore_signa
int no_wait);
extern int drm_bo_mem_space(struct drm_buffer_object * bo,
struct drm_bo_mem_reg * mem, int no_wait);
-extern int drm_bo_move_buffer(struct drm_buffer_object * bo, uint32_t new_mem_flags,
+extern int drm_bo_move_buffer(struct drm_buffer_object * bo,
+ uint64_t new_mem_flags,
int no_wait, int move_unfenced);
extern int drm_bo_clean_mm(struct drm_device * dev, unsigned mem_type);
extern int drm_bo_init_mm(struct drm_device * dev, unsigned type,