[beignet] 01/02: Fix "Exec...-5" error on older hardware. (Closes: #860805)

Rebecca Palmer rnpalmer-guest at moszumanska.debian.org
Sat Apr 29 11:14:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

rnpalmer-guest pushed a commit to branch master
in repository beignet.

commit f96f3f964d24b9aaca070739283e76564059a091
Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
Date:   Sat Apr 29 09:22:47 2017 +0100

    Fix "Exec...-5" error on older hardware.  (Closes: #860805)
---
 debian/changelog                |  6 ++++
 debian/patches/series           |  1 +
 debian/patches/zerooffset.patch | 61 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e03f2f5..c84d542 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+beignet (1.3.0-3) UNRELEASED; urgency=medium
+
+  * Fix "Exec...-5" error on older hardware.  (Closes: #860805)
+
+ -- Rebecca N. Palmer <rebecca_palmer at zoho.com>  Sat, 29 Apr 2017 09:18:39 +0100
+
 beignet (1.3.0-2) unstable; urgency=medium
 
   * Statically link to LLVM to allow installation together with
diff --git a/debian/patches/series b/debian/patches/series
index ee4a597..13ea02b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ add-appstream-metadata.patch
 spelling.patch
 opencl2-runtime-detection.patch
 static-llvm.patch
+zerooffset.patch
diff --git a/debian/patches/zerooffset.patch b/debian/patches/zerooffset.patch
new file mode 100644
index 0000000..c63b47e
--- /dev/null
+++ b/debian/patches/zerooffset.patch
@@ -0,0 +1,61 @@
+Description: Check that we can reserve the zero-offset
+
+commit ff57cee0519d ("ocl20/runtime: take the first 64KB page table
+entries") tries to allocate a bo at 0 offset, but failed to take into
+account that something may already be allocated there that it is not
+allowed to evict (particularly when not using full-ppgtt separation).
+Failure to do so causes all execution to subsequentally fail with
+"drm_intel_gem_bo_context_exec() failed: Device or resource busy"
+
+This is needed when using older (Ivy Bridge/Haswell) hardware with
+current Linux/libdrm
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98647
+Bug-Debian: https://bugs.debian.org/860805
+Origin: upstream 8b04f0be372da8eabdc93d6ae1b81a3c83cba284
+Author: Yang Rong, Chris Wilson
+
+diff --git a/src/intel/intel_driver.c b/src/intel/intel_driver.c
+index b8a1b52..3caf737 100644
+--- a/src/intel/intel_driver.c
++++ b/src/intel/intel_driver.c
+@@ -137,19 +137,28 @@ return 1;
+ static int
+ intel_driver_context_init(intel_driver_t *driver)
+ {
+-driver->ctx = drm_intel_gem_context_create(driver->bufmgr);
+-if (!driver->ctx)
+-  return 0;
+-driver->null_bo = NULL;
++  driver->ctx = drm_intel_gem_context_create(driver->bufmgr);
++  if (!driver->ctx)
++    return 0;
++  driver->null_bo = NULL;
+ #ifdef HAS_BO_SET_SOFTPIN
+-drm_intel_bo *bo = dri_bo_alloc(driver->bufmgr, "null_bo", 64*1024, 4096);
+-drm_intel_bo_set_softpin_offset(bo, 0);
+-// don't reuse it, that would make two bo trying to bind to same address,
+-// which is un-reasonable.
+-drm_intel_bo_disable_reuse(bo);
+-driver->null_bo = bo;
++  drm_intel_bo *bo = dri_bo_alloc(driver->bufmgr, "null_bo", 64*1024, 4096);
++  drm_intel_bo_set_softpin_offset(bo, 0);
++  // don't reuse it, that would make two bo trying to bind to same address,
++  // which is un-reasonable.
++  drm_intel_bo_disable_reuse(bo);
++
++  drm_intel_bo_map(bo, 1);
++  *(uint32_t *)bo->virtual = MI_BATCH_BUFFER_END;
++  drm_intel_bo_unmap(bo);
++
++  if (drm_intel_gem_bo_context_exec(bo, driver->ctx, 0, 0) == 0) {
++    driver->null_bo = bo;
++  } else {
++    drm_intel_bo_unreference(bo);
++  }
+ #endif
+-return 1;
++    return 1;
+ }
+ 
+ static void

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/beignet.git



More information about the Pkg-opencl-commits mailing list