[PATCH 2/4] drm/ttm: use NUM_PAGES_TO_ALLOC always
Christian König
ckoenig.leichtzumerken at gmail.com
Tue Nov 21 09:41:52 UTC 2017
Am 21.11.2017 um 10:32 schrieb Roger He:
> Change-Id: Ide96a1ccad9bb44b0bb0d80e123c2d810ba618ed
> Signed-off-by: Roger He <Hongbo.He at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
> index 2b83c52..27b2402 100644
> --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
> +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
> @@ -520,8 +520,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);
More information about the amd-gfx
mailing list