From 67ebcb4711d7c6d35df03298f065806613a62798 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 13 Jan 2014 14:32:56 -0800 Subject: i965: Use the new drm_intel_bo offset64 field. libdrm 2.4.52 introduces a new 'uint64_t offset64' field, intended to replace the old 'unsigned long offset' field. To preserve ABI, libdrm continues to store the presumed offset in both locations. On Broadwell, a 64-bit kernel may place BOs at "high" (> 4G) addresses. However, with a 32-bit userspace, the 'unsigned long offset' field will only be 32-bit, which is not large enough to hold this value. We need to use a proper uint64_t (like the kernel does). Technically, a lot of this code doesn't affect Broadwell, so we could leave it using the old field. But it makes sense to just switch to the new, properly typed field. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt Reviewed-by: Ian Romanick --- src/mesa/drivers/dri/i965/intel_batchbuffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri/i965/intel_batchbuffer.c') diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 36b8a6f..c420ab9 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -155,7 +155,7 @@ do_batch_dump(struct brw_context *brw) if (ret == 0) { drm_intel_decode_set_batch_pointer(decode, batch->bo->virtual, - batch->bo->offset, + batch->bo->offset64, batch->used); } else { fprintf(stderr, @@ -164,7 +164,7 @@ do_batch_dump(struct brw_context *brw) drm_intel_decode_set_batch_pointer(decode, batch->map, - batch->bo->offset, + batch->bo->offset64, batch->used); } @@ -392,7 +392,7 @@ intel_batchbuffer_emit_reloc(struct brw_context *brw, * the buffer doesn't move and we can short-circuit the relocation processing * in the kernel */ - intel_batchbuffer_emit_dword(brw, buffer->offset + delta); + intel_batchbuffer_emit_dword(brw, buffer->offset64 + delta); return true; } -- cgit v1.1