From: Michel Dänzer <[email protected]> (inspired by radeon commits dfad91fffb5bd013785223b42d78886df839eacf and ccbda955ebae1d457d35293833f12791e0f9fb0b)
Signed-off-by: Michel Dänzer <[email protected]> --- src/amdgpu_bo_helper.c | 10 ++++++++++ src/amdgpu_bo_helper.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c index 65f1ac6..ad56197 100644 --- a/src/amdgpu_bo_helper.c +++ b/src/amdgpu_bo_helper.c @@ -131,6 +131,16 @@ Bool amdgpu_bo_get_handle(struct amdgpu_buffer *bo, uint32_t *handle) handle) == 0; } +Bool amdgpu_pixmap_get_handle(PixmapPtr pixmap, uint32_t *handle) +{ + struct amdgpu_buffer *bo = amdgpu_get_pixmap_bo(pixmap); + + if (!bo) + return FALSE; + + return amdgpu_bo_get_handle(bo, handle); +} + int amdgpu_bo_map(ScrnInfoPtr pScrn, struct amdgpu_buffer *bo) { int ret = 0; diff --git a/src/amdgpu_bo_helper.h b/src/amdgpu_bo_helper.h index 4dae200..10e2db7 100644 --- a/src/amdgpu_bo_helper.h +++ b/src/amdgpu_bo_helper.h @@ -31,6 +31,8 @@ extern struct amdgpu_buffer *amdgpu_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width extern Bool amdgpu_bo_get_handle(struct amdgpu_buffer *bo, uint32_t *handle); +extern Bool amdgpu_pixmap_get_handle(PixmapPtr pixmap, uint32_t *handle); + extern int amdgpu_bo_map(ScrnInfoPtr pScrn, struct amdgpu_buffer *bo); extern void amdgpu_bo_unmap(struct amdgpu_buffer *bo); -- 2.7.0 _______________________________________________ xorg-driver-ati mailing list [email protected] https://lists.x.org/mailman/listinfo/xorg-driver-ati
