Direct access to GPU memory from within sandbox
Winnie Poon
winniepoon_home at hotmail.com
Wed Oct 2 00:16:40 UTC 2019
Thanks Alex. Apologies for my confusing statement. :) What i meant was in what use case do we install Nvidia driver inside flatpak? And with Nvidia installed inside the sandbox, do i still need to explicitly provide the devices=dri? (that was what i meant by without punching hole, very confusing and incorrect i admit 🙂 )
________________________________
From: Alexander Larsson <alexl at redhat.com>
Sent: October 1, 2019 12:06 AM
To: Winnie Poon <winniepoon_home at hotmail.com>
Cc: Michael Gratton <mike at vee.net>; flatpak <flatpak at lists.freedesktop.org>
Subject: Re: Direct access to GPU memory from within sandbox
On Mon, Sep 30, 2019 at 7:46 PM Winnie Poon <winniepoon_home at hotmail.com<mailto:winniepoon_home at hotmail.com>> wrote:
thanks for your reply Michael. I've also read discussion about installing Nvidia driver inside flatpak. Is this another way to access the GPU memory without punching hole?
It actually depends a bit on the exact driver and how the app accesses it. For instance, with some DRI3 drivers the X server hands the application a file descriptor with the GPU device that the GL driver can directly use, in other drivers the GL driver has to open the device itself. We really only need the hole in the later case, but, to ensure it works on all drivers its best to always punch the hole if you expect the app to have GPU access.
As for allowing it without punching a hole, I don't even know what that means. "punch a hole" is slang for "allow access to", how would you allow access to something without allowing access to it?
Of course, having device access doesn't mean you can arbitrarily access the GPU memory however you please, its protected against other processes via the kernel device driver interface.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl at redhat.com<mailto:alexl at redhat.com> alexander.larsson at gmail.com<mailto:alexander.larsson at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20191002/5eb683f1/attachment.html>
More information about the Flatpak
mailing list