Commit 04c30980 authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Greg Kroah-Hartman

drm/vmwgfx: Honor the sg list segment size limitation

[ Upstream commit bde15555 ]

When building sg tables, honor the device sg list segment size limitation.
Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: default avatarDeepak Rawat <drawat@vmware.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2f9f960a
...@@ -454,11 +454,11 @@ static int vmw_ttm_map_dma(struct vmw_ttm_tt *vmw_tt) ...@@ -454,11 +454,11 @@ static int vmw_ttm_map_dma(struct vmw_ttm_tt *vmw_tt)
if (unlikely(ret != 0)) if (unlikely(ret != 0))
return ret; return ret;
ret = sg_alloc_table_from_pages(&vmw_tt->sgt, vsgt->pages, ret = __sg_alloc_table_from_pages
vsgt->num_pages, 0, (&vmw_tt->sgt, vsgt->pages, vsgt->num_pages, 0,
(unsigned long) (unsigned long) vsgt->num_pages << PAGE_SHIFT,
vsgt->num_pages << PAGE_SHIFT, dma_get_max_seg_size(dev_priv->dev->dev),
GFP_KERNEL); GFP_KERNEL);
if (unlikely(ret != 0)) if (unlikely(ret != 0))
goto out_sg_alloc_fail; goto out_sg_alloc_fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment