drm/prime: Support page array >= 4GB
authorPhilip Yang <Philip.Yang@amd.com>
Mon, 21 Aug 2023 20:02:01 +0000 (16:02 -0400)
committerChristian König <christian.koenig@amd.com>
Tue, 13 Feb 2024 15:36:04 +0000 (16:36 +0100)
commitb671cd3d456315f63171a670769356a196cf7fd0
treecef3120600d427ad4fc3a88b03b8888e0863b671
parent2c80a2b715df75881359d07dbaacff8ad411f40e
drm/prime: Support page array >= 4GB

Without unsigned long typecast, the size is passed in as zero if page
array size >= 4GB, nr_pages >= 0x100000, then sg list converted will
have the first and the last chunk lost.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230821200201.24685-1-Philip.Yang@amd.com
drivers/gpu/drm/drm_prime.c