diff options
author | Rahul Sharma | 2013-01-28 14:38:48 +0100 |
---|---|---|
committer | Daniel Vetter | 2013-03-23 12:17:57 +0100 |
commit | dca25cb80065849e71e5c95a7fd74b0d67695bf3 (patch) | |
tree | 63565404835747b88b7b7d09cb0c4d5bc1c7265e /drivers/gpu/drm/ttm | |
parent | drm/i915: use for_each_sg_page for setting up the gtt ptes (diff) | |
download | kernel-qcow2-linux-dca25cb80065849e71e5c95a7fd74b0d67695bf3.tar.gz kernel-qcow2-linux-dca25cb80065849e71e5c95a7fd74b0d67695bf3.tar.xz kernel-qcow2-linux-dca25cb80065849e71e5c95a7fd74b0d67695bf3.zip |
drm: modify pages_to_sg prime helper to create optimized SG table
It fixes the issue arises due to passing 'nr_pages' in place of 'nents' to
sg_alloc_table. When ARM_HAS_SG_CHAIN is disabled, it is causing failure in
creating SG table for the buffers having more than 204 physical pages i.e.
equal to SG_MAX_SINGLE_ALLOC.
When using sg_alloc_table_from_pages interface, in place of sg_alloc_table,
page list will be passes to get each contiguous section which is represented
by a single entry in the table. For a Contiguous Buffer, number of entries
should be equal to 1.
Following check is causing the failure which is not applicable for Non-Contig
buffers:
if (WARN_ON_ONCE(nents > max_ents))
return -EINVAL;
Above patch is well tested for EXYNOS4 and EXYNOS5 for with/wihtout IOMMU
supprot. NOUVEAU and RADEON platforms also depends on drm_prime_pages_to_sg
helper function.
This set is base on "exynos-drm-fixes" branch at
http://git.kernel.org/?p=linux/kernel/git/daeinki/drm-exynos.git
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Acked-by: Dave Airlie <airlied@gmail.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/ttm')
0 files changed, 0 insertions, 0 deletions