mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-03-24 01:24:31 +00:00
Use gbm_bo_get_fd to get DMA_BUF fd
When GBM is used for buffer allocation, gbm_bo_get_fd should be used to get the DMA_BUF fd. Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
committed by
Michel Dänzer
parent
b69c5b3cc2
commit
4840f918ab
@@ -296,7 +296,11 @@ Bool amdgpu_share_pixmap_backing(struct amdgpu_buffer *bo, void **handle_p)
|
||||
{
|
||||
int handle;
|
||||
|
||||
amdgpu_bo_export(bo->bo.amdgpu, amdgpu_bo_handle_type_dma_buf_fd,
|
||||
if (bo->flags & AMDGPU_BO_FLAGS_GBM)
|
||||
handle = gbm_bo_get_fd(bo->bo.gbm);
|
||||
else
|
||||
amdgpu_bo_export(bo->bo.amdgpu,
|
||||
amdgpu_bo_handle_type_dma_buf_fd,
|
||||
(uint32_t *)&handle);
|
||||
|
||||
*handle_p = (void *)(long)handle;
|
||||
|
||||
Reference in New Issue
Block a user