diff options
author | Dave Airlie <airlied@redhat.com> | 2009-07-02 15:42:01 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-07-02 15:42:01 +1000 |
commit | fbac5891b91c795de61f4d7cbc1a6799474364ad (patch) | |
tree | 784e701b00f34f10c248b2dc552257999dc66b73 | |
parent | de1ed01214874dcdd6116ff2587c8710d6ed4d2d (diff) |
radeon: add buffer naming function
-rw-r--r-- | libdrm/radeon/radeon_bo_gem.c | 15 | ||||
-rw-r--r-- | libdrm/radeon/radeon_bo_gem.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/libdrm/radeon/radeon_bo_gem.c b/libdrm/radeon/radeon_bo_gem.c index 78439b29..05d4409a 100644 --- a/libdrm/radeon/radeon_bo_gem.c +++ b/libdrm/radeon/radeon_bo_gem.c @@ -236,6 +236,21 @@ uint32_t radeon_gem_name_bo(struct radeon_bo *bo) return bo_gem->name; } +int radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name) +{ + struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; + struct drm_gem_flink flink; + int r; + + flink.handle = bo->handle; + r = ioctl(bo->bom->fd, DRM_IOCTL_GEM_FLINK, &flink); + if (r) { + return r; + } + *name = flink.name; + return 0; +} + int radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain) { struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; diff --git a/libdrm/radeon/radeon_bo_gem.h b/libdrm/radeon/radeon_bo_gem.h index 9d9ce02c..4a8df9ad 100644 --- a/libdrm/radeon/radeon_bo_gem.h +++ b/libdrm/radeon/radeon_bo_gem.h @@ -39,4 +39,5 @@ void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom); uint32_t radeon_gem_name_bo(struct radeon_bo *bo); int radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain); +int radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name); #endif |