From: Keith Packard Date: Wed, 4 Jun 2008 05:56:25 +0000 (-0700) Subject: Merge commit 'origin/master' into drm-gem X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dbf3c5247c90bd35c0b2002e3b972a2dd4c8b130;p=mesa.git Merge commit 'origin/master' into drm-gem 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 --- dbf3c5247c90bd35c0b2002e3b972a2dd4c8b130 diff --cc src/mesa/drivers/dri/intel/intel_ioctl.c index 58c81766cdd,f4566ba89c4..c0a18fa2259 --- a/src/mesa/drivers/dri/intel/intel_ioctl.c +++ b/src/mesa/drivers/dri/intel/intel_ioctl.c @@@ -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; } + #ifdef TTM_API -void +int intel_exec_ioctl(struct intel_context *intel, GLuint used, GLboolean ignore_cliprects, GLboolean allow_unlock, @@@ -177,9 -187,37 +178,19 @@@ } 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; } + #else -void -intel_exec_ioctl(struct intel_context *intel, - GLuint used, - GLboolean ignore_cliprects, GLboolean allow_unlock, - void *start, GLuint count, dri_fence **fence) ++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