aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/ttm/ttm_page_alloc.c16
-rw-r--r--include/drm/ttm/ttm_bo_api.h3
-rw-r--r--include/drm/ttm/ttm_bo_driver.h6
-rw-r--r--include/drm/ttm/ttm_memory.h2
-rw-r--r--include/drm/ttm/ttm_object.h4
-rw-r--r--include/drm/ttm/ttm_page_alloc.h2
6 files changed, 15 insertions, 18 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index d948575717bf..170e751c283e 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -355,7 +355,7 @@ restart:
355 if (nr_free) 355 if (nr_free)
356 goto restart; 356 goto restart;
357 357
358 /* Not allowed to fall tough or break because 358 /* Not allowed to fall through or break because
359 * following context is inside spinlock while we are 359 * following context is inside spinlock while we are
360 * outside here. 360 * outside here.
361 */ 361 */
@@ -556,7 +556,7 @@ out:
556} 556}
557 557
558/** 558/**
559 * Fill the given pool if there isn't enough pages and requested number of 559 * Fill the given pool if there aren't enough pages and the requested number of
560 * pages is small. 560 * pages is small.
561 */ 561 */
562static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool, 562static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool,
@@ -576,8 +576,8 @@ static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool,
576 576
577 pool->fill_lock = true; 577 pool->fill_lock = true;
578 578
579 /* If allocation request is small and there is not enough 579 /* If allocation request is small and there are not enough
580 * pages in pool we fill the pool first */ 580 * pages in a pool we fill the pool up first. */
581 if (count < _manager->options.small 581 if (count < _manager->options.small
582 && count > pool->npages) { 582 && count > pool->npages) {
583 struct list_head new_pages; 583 struct list_head new_pages;
@@ -614,9 +614,9 @@ static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool,
614} 614}
615 615
616/** 616/**
617 * Cut count nubmer of pages from the pool and put them to return list 617 * Cut 'count' number of pages from the pool and put them on the return list.
618 * 618 *
619 * @return count of pages still to allocate to fill the request. 619 * @return count of pages still required to fulfill the request.
620 */ 620 */
621static unsigned ttm_page_pool_get_pages(struct ttm_page_pool *pool, 621static unsigned ttm_page_pool_get_pages(struct ttm_page_pool *pool,
622 struct list_head *pages, int ttm_flags, 622 struct list_head *pages, int ttm_flags,
@@ -637,7 +637,7 @@ static unsigned ttm_page_pool_get_pages(struct ttm_page_pool *pool,
637 goto out; 637 goto out;
638 } 638 }
639 /* find the last pages to include for requested number of pages. Split 639 /* find the last pages to include for requested number of pages. Split
640 * pool to begin and halves to reduce search space. */ 640 * pool to begin and halve it to reduce search space. */
641 if (count <= pool->npages/2) { 641 if (count <= pool->npages/2) {
642 i = 0; 642 i = 0;
643 list_for_each(p, &pool->list) { 643 list_for_each(p, &pool->list) {
@@ -651,7 +651,7 @@ static unsigned ttm_page_pool_get_pages(struct ttm_page_pool *pool,
651 break; 651 break;
652 } 652 }
653 } 653 }
654 /* Cut count number of pages from pool */ 654 /* Cut 'count' number of pages from the pool */
655 list_cut_position(pages, &pool->list, p); 655 list_cut_position(pages, &pool->list, p);
656 pool->npages -= count; 656 pool->npages -= count;
657 count = 0; 657 count = 0;
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
index 62a0e4c4ceee..42e346985186 100644
--- a/include/drm/ttm/ttm_bo_api.h
+++ b/include/drm/ttm/ttm_bo_api.h
@@ -662,9 +662,6 @@ extern int ttm_bo_kmap(struct ttm_buffer_object *bo, unsigned long start_page,
662 662
663extern void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map); 663extern void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map);
664 664
665#if 0
666#endif
667
668/** 665/**
669 * ttm_fbdev_mmap - mmap fbdev memory backed by a ttm buffer object. 666 * ttm_fbdev_mmap - mmap fbdev memory backed by a ttm buffer object.
670 * 667 *
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 09af2d746d1c..94eb1434316e 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -78,7 +78,7 @@ struct ttm_backend_func {
78 * 78 *
79 * Bind the backend pages into the aperture in the location 79 * Bind the backend pages into the aperture in the location
80 * indicated by @bo_mem. This function should be able to handle 80 * indicated by @bo_mem. This function should be able to handle
81 * differences between aperture- and system page sizes. 81 * differences between aperture and system page sizes.
82 */ 82 */
83 int (*bind) (struct ttm_backend *backend, struct ttm_mem_reg *bo_mem); 83 int (*bind) (struct ttm_backend *backend, struct ttm_mem_reg *bo_mem);
84 84
@@ -88,7 +88,7 @@ struct ttm_backend_func {
88 * @backend: Pointer to a struct ttm_backend. 88 * @backend: Pointer to a struct ttm_backend.
89 * 89 *
90 * Unbind previously bound backend pages. This function should be 90 * Unbind previously bound backend pages. This function should be
91 * able to handle differences between aperture- and system page sizes. 91 * able to handle differences between aperture and system page sizes.
92 */ 92 */
93 int (*unbind) (struct ttm_backend *backend); 93 int (*unbind) (struct ttm_backend *backend);
94 94
@@ -786,7 +786,7 @@ extern int ttm_bo_device_release(struct ttm_bo_device *bdev);
786 * ttm_bo_device_init 786 * ttm_bo_device_init
787 * 787 *
788 * @bdev: A pointer to a struct ttm_bo_device to initialize. 788 * @bdev: A pointer to a struct ttm_bo_device to initialize.
789 * @mem_global: A pointer to an initialized struct ttm_mem_global. 789 * @glob: A pointer to an initialized struct ttm_bo_global.
790 * @driver: A pointer to a struct ttm_bo_driver set up by the caller. 790 * @driver: A pointer to a struct ttm_bo_driver set up by the caller.
791 * @file_page_offset: Offset into the device address space that is available 791 * @file_page_offset: Offset into the device address space that is available
792 * for buffer data. This ensures compatibility with other users of the 792 * for buffer data. This ensures compatibility with other users of the
diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h
index b199170b3c2c..26c1f78d136f 100644
--- a/include/drm/ttm/ttm_memory.h
+++ b/include/drm/ttm/ttm_memory.h
@@ -41,7 +41,7 @@
41 * @do_shrink: The callback function. 41 * @do_shrink: The callback function.
42 * 42 *
43 * Arguments to the do_shrink functions are intended to be passed using 43 * Arguments to the do_shrink functions are intended to be passed using
44 * inheritance. That is, the argument class derives from struct ttm_mem_srink, 44 * inheritance. That is, the argument class derives from struct ttm_mem_shrink,
45 * and can be accessed using container_of(). 45 * and can be accessed using container_of().
46 */ 46 */
47 47
diff --git a/include/drm/ttm/ttm_object.h b/include/drm/ttm/ttm_object.h
index 0d9db099978b..e46054e5255b 100644
--- a/include/drm/ttm/ttm_object.h
+++ b/include/drm/ttm/ttm_object.h
@@ -111,7 +111,7 @@ struct ttm_object_device;
111 * 111 *
112 * @ref_obj_release: A function to be called when a reference object 112 * @ref_obj_release: A function to be called when a reference object
113 * with another ttm_ref_type than TTM_REF_USAGE is deleted. 113 * with another ttm_ref_type than TTM_REF_USAGE is deleted.
114 * this function may, for example, release a lock held by a user-space 114 * This function may, for example, release a lock held by a user-space
115 * process. 115 * process.
116 * 116 *
117 * This struct is intended to be used as a base struct for objects that 117 * This struct is intended to be used as a base struct for objects that
@@ -172,7 +172,7 @@ extern struct ttm_base_object *ttm_base_object_lookup(struct ttm_object_file
172/** 172/**
173 * ttm_base_object_unref 173 * ttm_base_object_unref
174 * 174 *
175 * @p_base: Pointer to a pointer referncing a struct ttm_base_object. 175 * @p_base: Pointer to a pointer referencing a struct ttm_base_object.
176 * 176 *
177 * Decrements the base object refcount and clears the pointer pointed to by 177 * Decrements the base object refcount and clears the pointer pointed to by
178 * p_base. 178 * p_base.
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
index 8062890f725e..129de12353f1 100644
--- a/include/drm/ttm/ttm_page_alloc.h
+++ b/include/drm/ttm/ttm_page_alloc.h
@@ -32,7 +32,7 @@
32/** 32/**
33 * Get count number of pages from pool to pages list. 33 * Get count number of pages from pool to pages list.
34 * 34 *
35 * @pages: heado of empty linked list where pages are filled. 35 * @pages: head of empty linked list where pages are filled.
36 * @flags: ttm flags for page allocation. 36 * @flags: ttm flags for page allocation.
37 * @cstate: ttm caching state for the page. 37 * @cstate: ttm caching state for the page.
38 * @count: number of pages to allocate. 38 * @count: number of pages to allocate.