Re: Does gbm_bo_map() implicitly synchronise?

Marek Olšák <[email protected]>
Newsgroups gmane.comp.video.mesa3d.devel
Message-ID <CAAxE2A72-ORZ6UNDeUB9R7XDP331z7nE+B-gBqiYakFEwrJY5g@mail.gmail.com>
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 <[email protected]> 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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.