projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf93b44
)
drm/ttm: use NUM_PAGES_TO_ALLOC always
author
Roger He
<Hongbo.He@amd.com>
Tue, 21 Nov 2017 01:58:26 +0000
(09:58 +0800)
committer
Alex Deucher
<alexander.deucher@amd.com>
Tue, 5 Dec 2017 19:37:05 +0000
(14:37 -0500)
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/ttm/ttm_page_alloc.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index 8d7172e8381d2685cc2bdedd4c631d83536df3a8..dca4d83224376a06547a95e053e9f9d18d7a389f 100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/
drivers/gpu/drm/ttm/ttm_page_alloc.c
@@
-510,8
+510,7
@@
static int ttm_alloc_new_pages(struct list_head *pages, gfp_t gfp_flags,
int r = 0;
unsigned i, j, cpages;
unsigned npages = 1 << order;
- unsigned max_cpages = min(count,
- (unsigned)(PAGE_SIZE/sizeof(struct page *)));
+ unsigned max_cpages = min(count, (unsigned)NUM_PAGES_TO_ALLOC);
/* allocate array for page caching change */
caching_array = kmalloc(max_cpages*sizeof(struct page *), GFP_KERNEL);