diff options
author | Pauli Nieminen <suokkos@gmail.com> | 2009-08-22 13:16:18 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-08-22 13:16:18 +1000 |
commit | caad8d85559709301c00760b9e8707d57f8c6c67 (patch) | |
tree | 13a2326eb17d90a2c3134a8007fce3e616bdd849 /libdrm/radeon/radeon_bo_gem.c | |
parent | cbb3ae3dab9dc82d95524726135b8d6ef86bcf27 (diff) |
radeon: add support for busy/domain check interface.
airlied: modified the interface to drop busy return value, just return
it normally, also fixed int->uint32_t for domain
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Diffstat (limited to 'libdrm/radeon/radeon_bo_gem.c')
-rw-r--r-- | libdrm/radeon/radeon_bo_gem.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libdrm/radeon/radeon_bo_gem.c b/libdrm/radeon/radeon_bo_gem.c index cf59a359..76d80e7e 100644 --- a/libdrm/radeon/radeon_bo_gem.c +++ b/libdrm/radeon/radeon_bo_gem.c @@ -209,6 +209,21 @@ static int bo_wait(struct radeon_bo *bo) return ret; } +static int bo_is_busy(struct radeon_bo *bo, uint32_t *domain) +{ + struct drm_radeon_gem_busy args; + int ret; + + args.handle = bo->handle; + args.domain = 0; + + ret = drmCommandWriteRead(bo->bom->fd, DRM_RADEON_GEM_BUSY, + &args, sizeof(args)); + + *domain = args.domain; + return ret; +} + static int bo_set_tiling(struct radeon_bo *bo, uint32_t tiling_flags, uint32_t pitch) { @@ -257,6 +272,7 @@ static struct radeon_bo_funcs bo_gem_funcs = { NULL, bo_set_tiling, bo_get_tiling, + bo_is_busy, }; struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd) |