summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-07-10 16:54:22 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2013-07-12 00:03:17 +0200
commit39f06d086f496840016ab8e204903eefee70afe1 (patch)
tree1fbfb744bf24914350112dde7f376f021a6ed993
parent874207363818257860098b652a6df7f904de4ace (diff)
backports: do not use swiotlb_nr_tbl() in i915
i915 now uses swiotlb_nr_tbl(), but we can not backport it to kernel version <= 3.2. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_i915_i915_gem.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_i915_i915_gem.patch b/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_i915_i915_gem.patch
new file mode 100644
index 00000000..dd9ae0ec
--- /dev/null
+++ b/patches/collateral-evolutions/drm/03-swiotlb/drivers_gpu_drm_i915_i915_gem.patch
@@ -0,0 +1,32 @@
+diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
+index 0022afd..2616dae 100644
+--- a/drivers/gpu/drm/i915/i915_gem.c
++++ b/drivers/gpu/drm/i915/i915_gem.c
+@@ -1808,6 +1808,7 @@ i915_gem_object_get_pages_gtt(struct drm
+ gfp |= __GFP_NORETRY | __GFP_NOWARN | __GFP_NO_KSWAPD;
+ gfp &= ~(__GFP_IO | __GFP_WAIT);
+ }
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+ #ifdef CONFIG_SWIOTLB
+ if (swiotlb_nr_tbl()) {
+ st->nents++;
+@@ -1816,6 +1817,7 @@ i915_gem_object_get_pages_gtt(struct drm
+ continue;
+ }
+ #endif
++#endif
+ if (!i || page_to_pfn(page) != last_pfn + 1) {
+ if (i)
+ sg = sg_next(sg);
+@@ -1826,9 +1828,11 @@ i915_gem_object_get_pages_gtt(struct drm
+ }
+ last_pfn = page_to_pfn(page);
+ }
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+ #ifdef CONFIG_SWIOTLB
+ if (!swiotlb_nr_tbl())
+ #endif
++#endif
+ sg_mark_end(sg);
+ obj->pages = st;
+