diff options
author | Kenneth Graunke <[email protected]> | 2017-04-10 23:00:24 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-04-11 21:07:45 -0700 |
commit | 14fc188460ae33b8cbbbffdb4f26d470eb393c81 (patch) | |
tree | 0ef1a41f42d7fa1f7d36d297081eafd652856c0a | |
parent | 193601311cb4cb6a7d8f915b09e2b30ff0af0fa7 (diff) |
i965/drm: Fix types for pwrite/pread fields.
The ioctl structs contain __u64 offset and size fields, so make them
uint64_t rather than unsigned long.
Reviewed-by: Chris Wilson <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_bufmgr.c | 20 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_bufmgr.h | 8 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c index 5243078edae..5eb9f57f7b6 100644 --- a/src/mesa/drivers/dri/i965/brw_bufmgr.c +++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c @@ -852,8 +852,8 @@ brw_bo_unmap(struct brw_bo *bo) } int -brw_bo_subdata(struct brw_bo *bo, unsigned long offset, - unsigned long size, const void *data) +brw_bo_subdata(struct brw_bo *bo, uint64_t offset, + uint64_t size, const void *data) { struct brw_bufmgr *bufmgr = bo->bufmgr; struct drm_i915_gem_pwrite pwrite; @@ -867,17 +867,17 @@ brw_bo_subdata(struct brw_bo *bo, unsigned long offset, ret = drmIoctl(bufmgr->fd, DRM_IOCTL_I915_GEM_PWRITE, &pwrite); if (ret != 0) { ret = -errno; - DBG("%s:%d: Error writing data to buffer %d: (%d %d) %s .\n", - __FILE__, __LINE__, bo->gem_handle, (int) offset, - (int) size, strerror(errno)); + DBG("%s:%d: Error writing data to buffer %d: " + "(%"PRIu64" %"PRIu64") %s .\n", + __FILE__, __LINE__, bo->gem_handle, offset, size, strerror(errno)); } return ret; } int -brw_bo_get_subdata(struct brw_bo *bo, unsigned long offset, - unsigned long size, void *data) +brw_bo_get_subdata(struct brw_bo *bo, uint64_t offset, + uint64_t size, void *data) { struct brw_bufmgr *bufmgr = bo->bufmgr; struct drm_i915_gem_pread pread; @@ -891,9 +891,9 @@ brw_bo_get_subdata(struct brw_bo *bo, unsigned long offset, ret = drmIoctl(bufmgr->fd, DRM_IOCTL_I915_GEM_PREAD, &pread); if (ret != 0) { ret = -errno; - DBG("%s:%d: Error reading data from buffer %d: (%d %d) %s .\n", - __FILE__, __LINE__, bo->gem_handle, (int) offset, - (int) size, strerror(errno)); + DBG("%s:%d: Error reading data from buffer %d: " + "(%"PRIu64" %"PRIu64") %s .\n", + __FILE__, __LINE__, bo->gem_handle, offset, size, strerror(errno)); } return ret; diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h index aa3d40bb959..2c221850afc 100644 --- a/src/mesa/drivers/dri/i965/brw_bufmgr.h +++ b/src/mesa/drivers/dri/i965/brw_bufmgr.h @@ -189,11 +189,11 @@ int brw_bo_map(struct brw_context *brw, struct brw_bo *bo, int write_enable); int brw_bo_unmap(struct brw_bo *bo); /** Write data into an object. */ -int brw_bo_subdata(struct brw_bo *bo, unsigned long offset, - unsigned long size, const void *data); +int brw_bo_subdata(struct brw_bo *bo, uint64_t offset, + uint64_t size, const void *data); /** Read data from an object. */ -int brw_bo_get_subdata(struct brw_bo *bo, unsigned long offset, - unsigned long size, void *data); +int brw_bo_get_subdata(struct brw_bo *bo, uint64_t offset, + uint64_t size, void *data); /** * Waits for rendering to an object by the GPU to have completed. * |