Commit bde15555 authored by Thomas Hellstrom's avatar Thomas Hellstrom

drm/vmwgfx: Honor the sg list segment size limitation

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>
parent cc0ba0d8
...@@ -441,10 +441,10 @@ static int vmw_ttm_map_dma(struct vmw_ttm_tt *vmw_tt) ...@@ -441,10 +441,10 @@ 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