From e13f4cc896392bfa57aeb0fce3112745b840d4fd Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 26 Feb 2024 00:00:17 +0000 Subject: [PATCH] drm/prime: Support page array >= 4GB From Philip Yang 4ff8ec01a86568ffa5b8825bfe51c4d0d1379286 in linux-6.6.y/6.6.18 b671cd3d456315f63171a670769356a196cf7fd0 in mainline linux --- sys/dev/pci/drm/drm_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/drm_prime.c b/sys/dev/pci/drm/drm_prime.c index d526e61046e..25812a30d33 100644 --- a/sys/dev/pci/drm/drm_prime.c +++ b/sys/dev/pci/drm/drm_prime.c @@ -849,7 +849,7 @@ struct sg_table *drm_prime_pages_to_sg(struct drm_device *dev, if (max_segment == 0) max_segment = UINT_MAX; err = sg_alloc_table_from_pages_segment(sg, pages, nr_pages, 0, - nr_pages << PAGE_SHIFT, + (unsigned long)nr_pages << PAGE_SHIFT, max_segment, GFP_KERNEL); if (err) { kfree(sg); -- 2.20.1