diff options
author | Marek Olšák <[email protected]> | 2011-08-04 03:07:42 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-08-16 09:15:11 +0200 |
commit | ecfcf25387284f01131eeaf9ec3f72bc481f3cfe (patch) | |
tree | 87b0fd215a7636d8220b95c11908146921fc0a46 | |
parent | 1b542aca6e998e544a90ccff310f74b2811b8db0 (diff) |
r600g: get winsys_handle using radeon_winsys
Reviewed-by: Alex Deucher <[email protected]>
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_bo.c | 15 | ||||
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_priv.h | 3 | ||||
-rw-r--r-- | src/gallium/winsys/r600/drm/radeon_bo.c | 16 |
3 files changed, 1 insertions, 33 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_bo.c b/src/gallium/winsys/r600/drm/r600_bo.c index 0e41a1709ee..9e2c08ab56f 100644 --- a/src/gallium/winsys/r600/drm/r600_bo.c +++ b/src/gallium/winsys/r600/drm/r600_bo.c @@ -160,18 +160,5 @@ void r600_bo_destroy(struct radeon *radeon, struct r600_bo *bo) boolean r600_bo_get_winsys_handle(struct radeon *radeon, struct r600_bo *bo, unsigned stride, struct winsys_handle *whandle) { - whandle->stride = stride; - switch(whandle->type) { - case DRM_API_HANDLE_TYPE_KMS: - whandle->handle = bo->bo->handle; - break; - case DRM_API_HANDLE_TYPE_SHARED: - if (radeon_bo_get_name(radeon, bo->bo, &whandle->handle)) - return FALSE; - break; - default: - return FALSE; - } - - return TRUE; + return radeon->ws->buffer_get_handle(bo->bo->buf, stride, whandle); } diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h index 036468e3a31..0efb02aadae 100644 --- a/src/gallium/winsys/r600/drm/r600_priv.h +++ b/src/gallium/winsys/r600/drm/r600_priv.h @@ -98,9 +98,6 @@ int radeon_bo_fencelist(struct radeon *radeon, struct radeon_bo **bolist, uint32 int radeon_bo_get_tiling_flags(struct radeon *radeon, struct radeon_bo *bo, uint32_t *tiling_flags); -int radeon_bo_get_name(struct radeon *radeon, - struct radeon_bo *bo, - uint32_t *name); int radeon_bo_fixed_map(struct radeon *radeon, struct radeon_bo *bo); /* diff --git a/src/gallium/winsys/r600/drm/radeon_bo.c b/src/gallium/winsys/r600/drm/radeon_bo.c index 536bbe45bff..9d351480d59 100644 --- a/src/gallium/winsys/r600/drm/radeon_bo.c +++ b/src/gallium/winsys/r600/drm/radeon_bo.c @@ -165,19 +165,3 @@ int radeon_bo_get_tiling_flags(struct radeon *radeon, *tiling_flags = args.tiling_flags; return ret; } - -int radeon_bo_get_name(struct radeon *radeon, - struct radeon_bo *bo, - uint32_t *name) -{ - struct drm_gem_flink flink; - int ret; - - flink.handle = bo->handle; - ret = drmIoctl(radeon->info.fd, DRM_IOCTL_GEM_FLINK, &flink); - if (ret) - return ret; - - *name = flink.name; - return ret; -} |