[Beignet] [PATCH] Driver: Fix GPGPU delete bug

Pan Xiuli xiuli.pan at intel.com
Mon Dec 21 23:26:56 PST 2015


The first patch 192feb51 has something wrong in rebase and takes new
bug in. Now fix both the original bug and revert the wrong
patch.

Signed-off-by: Pan Xiuli <xiuli.pan at intel.com>
---
 src/intel/intel_gpgpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/intel_gpgpu.c b/src/intel/intel_gpgpu.c
index 53a6dfc..c3b4fc2 100644
--- a/src/intel/intel_gpgpu.c
+++ b/src/intel/intel_gpgpu.c
@@ -190,7 +190,7 @@ intel_gpgpu_delete(intel_gpgpu_t *gpgpu)
     node = p->next;
     while(node) {
       if(node->gpgpu->batch && node->gpgpu->batch->buffer &&
-         drm_intel_bo_busy(node->gpgpu->batch->buffer)) {
+         !drm_intel_bo_busy(node->gpgpu->batch->buffer)) {
         p->next = node->next;
         intel_gpgpu_delete_finished(node->gpgpu);
         cl_free(node);
@@ -213,7 +213,7 @@ intel_gpgpu_delete(intel_gpgpu_t *gpgpu)
     return;
 
   if(gpgpu->batch && gpgpu->batch->buffer &&
-     !drm_intel_bo_busy(gpgpu->batch->buffer)) {
+     drm_intel_bo_busy(gpgpu->batch->buffer)) {
     TRY_ALLOC_NO_ERR (node, CALLOC(struct intel_gpgpu_node));
     node->gpgpu = gpgpu;
     node->next = NULL;
-- 
2.1.4



More information about the Beignet mailing list