Does gbm_bo_map() implicitly synchronise?

Marek Olšák maraeo at gmail.com
Sat Jun 15 05:54:41 UTC 2024


gbm_bo_map synchronizes if it needs to move memory to make the buffer
readable by the CPU or if the buffer is being used/written by the GPU.

Marek

On Sat, Jun 15, 2024 at 1:12 AM Pierre Ossman <ossman at cendio.se> wrote:
>
> I'm experimenting with DRI3 and its use of GBM to share buffers. It
> mostly works fine, but I'm seeing some issues that have me concerned
> there might be a synchronisation issue.
>
> The documentation isn't entirely clear, so my question is if
> gbm_bo_map() handles all the implicit synchronisation for me, or if
> there is something more I can do?
>
> I tried doing gbm_bo_get_fd() followed by a select() and
> ioctl(DMA_BUF_IOCTL_SYNC), but my issue did not go away. Now I'm unsure
> if I'm doing it wrong, or if I'm chasing the wrong theory.
>
> Anyone with insight on what's needed for stable synchronisation?
>
> Regards,
> --
> Pierre Ossman           Software Development
> Cendio AB               https://cendio.com
> Teknikringen 8          https://twitter.com/ThinLinc
> 583 30 Linköping        https://facebook.com/ThinLinc
> Phone: +46-13-214600
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?


More information about the mesa-dev mailing list