We don't need to share the same VMID between ROCm and Mesa. We don't
need to share the same driver FD between ROCm and Mesa either. It will
be like having 2 different processes, and that should always work.

Alex told me in person 2 weeks ago that we can put libdrm_amdgpu into Mesa.

Marek

On Thu, Oct 24, 2024 at 10:46 AM Christian König

<ckoenig.leichtzumer...@gmail.com> wrote:
>
> Yeah that would really not work.
>
> We at least need the code to unify the render node file descriptor stay
> inside libdrm and be used by Mesa.
>
> Otherwise Mesa would start using a separate render node file descriptor.
>
> Regards,
> Christian.
>
> Am 24.10.24 um 16:19 schrieb Felix Kuehling:
> > I'm not sure what this means. ROCm allocates all its virtual address
> > space with mmap. That includes address space for BOs imported with the
> > interop APIs.
> >
> > We are sharing the GPU virtual address space with Mesa since we're
> > using the same render nodes. So if Mesa's GPU virtual address space
> > management conflicts with the CPU virtual address space that ROCm
> > shares between CPU and GPU, that would be a problem.
> >
> > Regards,
> >   Felix
> >
> >
> > On 2024-10-24 09:24, Alex Deucher wrote:
> >> On Thu, Oct 24, 2024 at 8:38 AM Christian König
> >> <ckoenig.leichtzumer...@gmail.com> wrote:
> >>> Completely agree, but that's a platform decision which Alex needs to
> >>> make.
> >> + Felix
> >>
> >> Does buffer sharing with ROCm depend on the shared VA space?
> >>
> >> Alex
> >>
> >>> Christian.
> >>>
> >>> Am 24.10.24 um 14:16 schrieb Marek Olšák:
> >>>
> >>> I don't think we need to share VA space. APIs usually share one or
> >>> two buffers. That's almost nothing compared to the size of the
> >>> occupied VA space. They also likely map them again for themselves -
> >>> APIs don't share any virtual addresses as far as I know.
> >>>
> >>> Marek
> >>>
> >>> On Thu, Oct 24, 2024, 08:12 Christian König
> >>> <ckoenig.leichtzumer...@gmail.com> wrote:
> >>>> Am 22.10.24 um 06:06 schrieb Marek Olšák:
> >>>>> Hi,
> >>>>>
> >>>>> The MR is up:
> >>>>> https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31756
> >>>>>
> >>>>> It's good to go as long as there is no functional issue.
> >>>> Finally getting rid of all the mid-layering? What about shared
> >>>> VA-space?
> >>>>
> >>>> Regards,
> >>>> Christian.
> >>>>
> >>>>> libdrm_amdgpu will still be relevant for PAL, ROCm, and
> >>>>> xf86-video-amdgpu.
> >>>>>
> >>>>> Marek
>

Reply via email to