diff options
author | Dave Airlie <airlied@linux.ie> | 2007-03-23 14:56:39 +1100 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-03-23 14:56:39 +1100 |
commit | 8d918b0b63b3142d92204253bfc954ed12aa98ed (patch) | |
tree | 0d4301d8eeacc013f4572b6ad34d10d6a9dcda27 /linux-core | |
parent | 39795501a8d4d5286fd21d36f8b7258f70fec989 (diff) |
cleanup more whitespace from ttm merge
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drm_memory.c | 12 | ||||
-rw-r--r-- | linux-core/drm_proc.c | 20 | ||||
-rw-r--r-- | linux-core/drm_stub.c | 2 | ||||
-rw-r--r-- | linux-core/drm_vm.c | 22 |
4 files changed, 28 insertions, 28 deletions
diff --git a/linux-core/drm_memory.c b/linux-core/drm_memory.c index a1aaa8f5..86c869f1 100644 --- a/linux-core/drm_memory.c +++ b/linux-core/drm_memory.c @@ -61,17 +61,17 @@ int drm_alloc_memctl(size_t size) { int ret; unsigned long a_size = drm_size_align(size); - + spin_lock(&drm_memctl.lock); - ret = ((drm_memctl.cur_used + a_size) > drm_memctl.high_threshold) ? + ret = ((drm_memctl.cur_used + a_size) > drm_memctl.high_threshold) ? -ENOMEM : 0; - if (!ret) + if (!ret) drm_memctl.cur_used += a_size; spin_unlock(&drm_memctl.lock); return ret; } EXPORT_SYMBOL(drm_alloc_memctl); - + void drm_free_memctl(size_t size) { unsigned long a_size = drm_size_align(size); @@ -84,14 +84,14 @@ EXPORT_SYMBOL(drm_free_memctl); void drm_query_memctl(drm_u64_t *cur_used, drm_u64_t *low_threshold, - drm_u64_t *high_threshold) + drm_u64_t *high_threshold) { spin_lock(&drm_memctl.lock); *cur_used = drm_memctl.cur_used; *low_threshold = drm_memctl.low_threshold; *high_threshold = drm_memctl.high_threshold; spin_unlock(&drm_memctl.lock); -} +} EXPORT_SYMBOL(drm_query_memctl); void drm_init_memctl(size_t p_low_threshold, diff --git a/linux-core/drm_proc.c b/linux-core/drm_proc.c index d6da86b2..af62c62a 100644 --- a/linux-core/drm_proc.c +++ b/linux-core/drm_proc.c @@ -244,7 +244,7 @@ static int drm__vm_info(char *buf, char **start, off_t offset, int request, DRM_PROC_PRINT("%4d 0x%08lx 0x%08lx %4.4s 0x%02x 0x%08lx ", i, map->offset, - map->size, type, map->flags, + map->size, type, map->flags, (unsigned long) r_list->user_token); if (map->mtrr < 0) { @@ -438,7 +438,7 @@ static int drm__objects_info(char *buf, char **start, off_t offset, int request, drm_device_t *dev = (drm_device_t *) data; int len = 0; drm_buffer_manager_t *bm = &dev->bm; - drm_fence_manager_t *fm = &dev->fm; + drm_fence_manager_t *fm = &dev->fm; drm_u64_t used_mem; drm_u64_t low_mem; drm_u64_t high_mem; @@ -451,17 +451,17 @@ static int drm__objects_info(char *buf, char **start, off_t offset, int request, *start = &buf[offset]; *eof = 0; - + DRM_PROC_PRINT("Object accounting:\n\n"); if (fm->initialized) { - DRM_PROC_PRINT("Number of active fence objects: %d.\n", + DRM_PROC_PRINT("Number of active fence objects: %d.\n", atomic_read(&fm->count)); } else { DRM_PROC_PRINT("Fence objects are not supported by this driver\n"); } if (bm->initialized) { - DRM_PROC_PRINT("Number of active buffer objects: %d.\n\n", + DRM_PROC_PRINT("Number of active buffer objects: %d.\n\n", atomic_read(&bm->count)); } DRM_PROC_PRINT("Memory accounting:\n\n"); @@ -473,16 +473,16 @@ static int drm__objects_info(char *buf, char **start, off_t offset, int request, drm_query_memctl(&used_mem, &low_mem, &high_mem); - if (used_mem > 16*PAGE_SIZE) { - DRM_PROC_PRINT("Used object memory is %lu pages.\n", + if (used_mem > 16*PAGE_SIZE) { + DRM_PROC_PRINT("Used object memory is %lu pages.\n", (unsigned long) (used_mem >> PAGE_SHIFT)); } else { - DRM_PROC_PRINT("Used object memory is %lu bytes.\n", + DRM_PROC_PRINT("Used object memory is %lu bytes.\n", (unsigned long) used_mem); } - DRM_PROC_PRINT("Soft object memory usage threshold is %lu pages.\n", + DRM_PROC_PRINT("Soft object memory usage threshold is %lu pages.\n", (unsigned long) (low_mem >> PAGE_SHIFT)); - DRM_PROC_PRINT("Hard object memory usage threshold is %lu pages.\n", + DRM_PROC_PRINT("Hard object memory usage threshold is %lu pages.\n", (unsigned long) (high_mem >> PAGE_SHIFT)); DRM_PROC_PRINT("\n"); diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c index 348cd2c6..f4da7dac 100644 --- a/linux-core/drm_stub.c +++ b/linux-core/drm_stub.c @@ -83,7 +83,7 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS); return -ENOMEM; } - if (drm_mm_init(&dev->offset_manager, DRM_FILE_PAGE_OFFSET_START, + if (drm_mm_init(&dev->offset_manager, DRM_FILE_PAGE_OFFSET_START, DRM_FILE_PAGE_OFFSET_SIZE)) { drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS); drm_ht_remove(&dev->map_hash); diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c index a4a55e37..775ca878 100644 --- a/linux-core/drm_vm.c +++ b/linux-core/drm_vm.c @@ -684,7 +684,7 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) vma->vm_private_data = (void *)map; vma->vm_flags |= VM_RESERVED; break; - case _DRM_TTM: + case _DRM_TTM: return drm_bo_mmap_locked(vma, filp, map); default: return -EINVAL; /* This should never happen. */ @@ -732,13 +732,13 @@ EXPORT_SYMBOL(drm_mmap); */ #ifdef DRM_FULL_MM_COMPAT -static unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma, +static unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma, unsigned long address) { drm_buffer_object_t *bo = (drm_buffer_object_t *) vma->vm_private_data; unsigned long page_offset; struct page *page = NULL; - drm_ttm_t *ttm; + drm_ttm_t *ttm; drm_device_t *dev; unsigned long pfn; int err; @@ -746,10 +746,10 @@ static unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma, unsigned long bus_offset; unsigned long bus_size; int ret = NOPFN_REFAULT; - - if (address > vma->vm_end) + + if (address > vma->vm_end) return NOPFN_SIGBUS; - + err = mutex_lock_interruptible(&bo->mutex); if (err) return NOPFN_REFAULT; @@ -766,8 +766,8 @@ static unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma, */ if (!(bo->mem.flags & DRM_BO_FLAG_MAPPABLE)) { - uint32_t new_mask = bo->mem.mask | - DRM_BO_FLAG_MAPPABLE | + uint32_t new_mask = bo->mem.mask | + DRM_BO_FLAG_MAPPABLE | DRM_BO_FLAG_FORCE_MAPPABLE; err = drm_bo_move_buffer(bo, new_mask, 0, 0); if (err) { @@ -777,7 +777,7 @@ static unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma, } dev = bo->dev; - err = drm_bo_pci_offset(dev, &bo->mem, &bus_base, &bus_offset, + err = drm_bo_pci_offset(dev, &bo->mem, &bus_base, &bus_offset, &bus_size); if (err) { @@ -804,7 +804,7 @@ static unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma, pfn = page_to_pfn(page); vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); } - + err = vm_insert_pfn(vma, address, pfn); if (err) { ret = (err != -EAGAIN) ? NOPFN_OOM : NOPFN_REFAULT; @@ -903,6 +903,6 @@ int drm_bo_mmap_locked(struct vm_area_struct *vma, drm_bo_vm_open_locked(vma); #ifdef DRM_ODD_MM_COMPAT drm_bo_map_bound(vma); -#endif +#endif return 0; } |