Merge commit 'origin/master' into drm-gem
authorKeith Packard <keithp@keithp.com>
Wed, 4 Jun 2008 05:56:25 +0000 (22:56 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 4 Jun 2008 05:56:25 +0000 (22:56 -0700)
Conflicts:

src/mesa/drivers/dri/common/dri_bufmgr.h
src/mesa/drivers/dri/intel/intel_bufmgr_ttm.c
src/mesa/drivers/dri/intel/intel_bufmgr_ttm.h
src/mesa/drivers/dri/intel/intel_ioctl.c

1  2 
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/intel/intel_ioctl.c

index 58c81766cdd9e406cae2a65aaa1549ff738e35a5,f4566ba89c4f886658294288da0716eb7722d601..c0a18fa225972262386e551d1208fc2b21664685
@@@ -144,13 -142,13 +144,14 @@@ intel_batch_ioctl(struct intel_context 
     if (drmCommandWrite(intel->driFd, DRM_I915_BATCHBUFFER, &batch,
                         sizeof(batch))) {
        fprintf(stderr, "DRM_I915_BATCHBUFFER: %d\n", -errno);
 -      UNLOCK_HARDWARE(intel);
 -      exit(1);
 +      return -errno;
     }
 +
 +   return 0;
  }
  
 -void
+ #ifdef TTM_API
 +int
  intel_exec_ioctl(struct intel_context *intel,
                 GLuint used,
                 GLboolean ignore_cliprects, GLboolean allow_unlock,
     } while (ret == -EAGAIN);
  
     if (ret != 0) {
 -      fprintf(stderr, "DRM_I915_EXECBUFFER: %d\n", -errno);
 -      UNLOCK_HARDWARE(intel);
 -      exit(1);
 +      fprintf(stderr, "DRM_I915_GEM_EXECBUFFER: %d\n", -errno);
 +      return -errno;
     }
  
 -   if (execbuf.fence_arg.error != 0) {
 -
 -      /*
 -       * Fence creation has failed, but the GPU has been
 -       * idled by the kernel. Safe to continue.
 -       */ 
 -
 -      *fence = NULL;
 -      return;
 -   }
 -
 -   fo = intel_ttm_fence_create_from_arg(intel->bufmgr, "fence buffers",
 -                                      &execbuf.fence_arg);
 -   if (!fo) {
 -      fprintf(stderr, "failed to fence handle: %08x\n", execbuf.fence_arg.handle);
 -      UNLOCK_HARDWARE(intel);
 -      exit(1);
 -   }
 -   *fence = fo;
 +   return 0;
  }
 -void
 -intel_exec_ioctl(struct intel_context *intel,
 -               GLuint used,
 -               GLboolean ignore_cliprects, GLboolean allow_unlock,
 -               void *start, GLuint count, dri_fence **fence)
+ #else
++int
++int intel_exec_ioctl(struct intel_context *intel,
++                   GLuint used,
++                   GLboolean ignore_cliprects, GLboolean allow_unlock,
++                   struct drm_i915_gem_execbuffer *execbuf);
+ {
++    return -EINVAL;
+ }
+ #endif