mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
drm/ttm: max_cpages is in unit of native page
fix calculation. Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
0aaa59f525
commit
a8d25a8629
1 changed files with 1 additions and 1 deletions
|
@ -544,7 +544,7 @@ static int ttm_alloc_new_pages(struct list_head *pages, gfp_t gfp_flags,
|
||||||
int r = 0;
|
int r = 0;
|
||||||
unsigned i, j, cpages;
|
unsigned i, j, cpages;
|
||||||
unsigned npages = 1 << order;
|
unsigned npages = 1 << order;
|
||||||
unsigned max_cpages = min(count, (unsigned)NUM_PAGES_TO_ALLOC);
|
unsigned max_cpages = min(count << order, (unsigned)NUM_PAGES_TO_ALLOC);
|
||||||
|
|
||||||
/* allocate array for page caching change */
|
/* allocate array for page caching change */
|
||||||
caching_array = kmalloc(max_cpages*sizeof(struct page *), GFP_KERNEL);
|
caching_array = kmalloc(max_cpages*sizeof(struct page *), GFP_KERNEL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue