minigbm: Use dmabuf inode as unique buffer id instead of handle
Handle has some limits and can't be used as unique buffer ID on systems where display controller can scanout from CMA but GPU can work with both CMA and VRAM. Such systems have DRM/KMS and DRM/GPU drivers separated. GBM frontend is always expecting handle for DRM/KMS driver. In such system any attempt of importing the buffer with more than 1 contiguous chunk into DRM/KMS driver will fail. Using dma-buf inode as unique buffer ID is a common practice for a last several years starting from [this kernel patch][1]. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed63bb1d1f8469586006a9ca63c42344401aa2ab Change-Id: Ic3a69010d5da2f866a2252fc7e9eb29d67f8e1ed Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
This commit is contained in:
parent
cce8dc57df
commit
4f7758ffa1
6 changed files with 40 additions and 16 deletions
|
|
@ -55,6 +55,8 @@ void drv_resolve_format_and_use_flags_helper(struct driver *drv, uint32_t format
|
|||
uint64_t use_flags, uint32_t *out_format,
|
||||
uint64_t *out_use_flags);
|
||||
|
||||
uint32_t drv_get_inode(int dmabuf_fd);
|
||||
|
||||
/*
|
||||
* Get an option. Should return NULL if specified option is not set.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue