diff options
| author | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2008-01-22 09:42:37 -0800 | 
|---|---|---|
| committer | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2008-01-22 09:42:37 -0800 | 
| commit | 0cd4cbc9a6330bd619608f274592082de7c05bcf (patch) | |
| tree | 4e0b682a24e448d17abf8b2fadc75ccee2cd5b57 /tests/ttmtest/src | |
| parent | 128a8f7ea20af2549e448157b431d5c1f90f37c3 (diff) | |
| parent | 5231a524f53babd127a576d7567671dafb29651b (diff) | |
Merge branch 'master' into vblank-rework, including mach64 support
Conflicts:
	linux-core/drmP.h
	linux-core/drm_drv.c
	shared-core/i915_drv.h
	shared-core/i915_irq.c
	shared-core/mga_irq.c
	shared-core/radeon_irq.c
	shared-core/via_irq.c
Mostly trivial conflicts.
mach64 support from Mathieu Bérard.
Diffstat (limited to 'tests/ttmtest/src')
| -rw-r--r-- | tests/ttmtest/src/ttmtest.c | 39 | ||||
| -rw-r--r-- | tests/ttmtest/src/xf86dri.c | 1 | 
2 files changed, 21 insertions, 19 deletions
diff --git a/tests/ttmtest/src/ttmtest.c b/tests/ttmtest/src/ttmtest.c index 606fb0cb..36df2428 100644 --- a/tests/ttmtest/src/ttmtest.c +++ b/tests/ttmtest/src/ttmtest.c @@ -35,6 +35,7 @@  #include <X11/Xlib.h>  #include <X11/Xutil.h> +#include <stdint.h>  #include <drm/drm.h>  #include "xf86dri.h"  #include "xf86drm.h" @@ -176,13 +177,11 @@ benchmarkBuffer(TinyDRIContext * ctx, unsigned long size,      /*       * Test system memory objects.       */ -      oldTime = fastrdtsc(); -    BM_CKFATAL(drmBOCreate(ctx->drmFD, 0, size, 0, NULL, -	    drm_bo_type_dc, -	    DRM_BO_FLAG_READ | -	    DRM_BO_FLAG_WRITE | -			   DRM_BO_FLAG_MEM_LOCAL /*| DRM_BO_FLAG_NO_MOVE*/, 0, &buf)); +    BM_CKFATAL(drmBOCreate(ctx->drmFD, size, 0, NULL, +			   DRM_BO_FLAG_READ | +			   DRM_BO_FLAG_WRITE | +			   DRM_BO_FLAG_MEM_LOCAL, 0, &buf));      curTime = fastrdtsc();      *ticks++ = time_diff(oldTime, curTime); @@ -216,12 +215,12 @@ benchmarkBuffer(TinyDRIContext * ctx, unsigned long size,       * Test TT bound buffer objects.       */ -    BM_CKFATAL(drmGetLock(ctx->drmFD, ctx->hwContext, 0));      oldTime = fastrdtsc(); -    BM_CKFATAL(drmBOValidate(ctx->drmFD, &buf, -	    DRM_BO_FLAG_MEM_TT, DRM_BO_MASK_MEM, DRM_BO_HINT_DONT_FENCE)); +    BM_CKFATAL(drmBOSetStatus(ctx->drmFD, &buf, +			     DRM_BO_FLAG_MEM_TT,  +			     DRM_BO_MASK_MEM,  +			      0,0,0));      curTime = fastrdtsc(); -    BM_CKFATAL(drmUnlock(ctx->drmFD, ctx->hwContext));      *ticks++ = time_diff(oldTime, curTime);      oldTime = fastrdtsc(); @@ -247,10 +246,9 @@ benchmarkBuffer(TinyDRIContext * ctx, unsigned long size,      BM_CKFATAL(drmBOUnmap(ctx->drmFD, &buf)); -    BM_CKFATAL(drmGetLock(ctx->drmFD, ctx->hwContext, 0));      oldTime = fastrdtsc(); -    BM_CKFATAL(drmBOValidate(ctx->drmFD, &buf, -	    DRM_BO_FLAG_MEM_LOCAL, DRM_BO_MASK_MEM, DRM_BO_HINT_DONT_FENCE)); +    BM_CKFATAL(drmBOSetStatus(ctx->drmFD, &buf, +			     DRM_BO_FLAG_MEM_LOCAL, DRM_BO_MASK_MEM, 0, 0,0));      curTime = fastrdtsc();      *ticks++ = time_diff(oldTime, curTime); @@ -259,15 +257,18 @@ benchmarkBuffer(TinyDRIContext * ctx, unsigned long size,       */      oldTime = fastrdtsc(); -    ret = drmBOValidate(ctx->drmFD, &buf, -	DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_CACHED | DRM_BO_FLAG_FORCE_CACHING, -	DRM_BO_MASK_MEMTYPE | DRM_BO_FLAG_FORCE_CACHING, DRM_BO_HINT_DONT_FENCE); +    ret = drmBOSetStatus(ctx->drmFD, &buf, +			 DRM_BO_FLAG_MEM_TT |  +			 DRM_BO_FLAG_CACHED |  +			 DRM_BO_FLAG_FORCE_CACHING, +			 DRM_BO_MASK_MEMTYPE |  +			 DRM_BO_FLAG_FORCE_CACHING, +			 0, 0, 0);      curTime = fastrdtsc(); -    drmUnlock(ctx->drmFD, ctx->hwContext);      if (ret) {  	printf("Couldn't bind cached. Probably no support\n"); -	BM_CKFATAL(drmBODestroy(ctx->drmFD, &buf)); +	BM_CKFATAL(drmBOUnreference(ctx->drmFD, &buf));  	return 1;      }      *ticks++ = time_diff(oldTime, curTime); @@ -295,7 +296,7 @@ benchmarkBuffer(TinyDRIContext * ctx, unsigned long size,      *ticks++ = time_diff(oldTime, curTime);      BM_CKFATAL(drmBOUnmap(ctx->drmFD, &buf)); -    BM_CKFATAL(drmBODestroy(ctx->drmFD, &buf)); +    BM_CKFATAL(drmBOUnreference(ctx->drmFD, &buf));      return 0;  } diff --git a/tests/ttmtest/src/xf86dri.c b/tests/ttmtest/src/xf86dri.c index ad92504e..5491473c 100644 --- a/tests/ttmtest/src/xf86dri.c +++ b/tests/ttmtest/src/xf86dri.c @@ -45,6 +45,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  #include <X11/Xlibint.h>  #include <X11/extensions/Xext.h>  #include <X11/extensions/extutil.h> +#include <stdint.h>  #include "xf86dristr.h"  static XExtensionInfo _xf86dri_info_data;  | 
