Re: Sharing a KMS device
On 19/09/18 02:42, Keith Packard wrote: Troll Berserker writes: Hmm. I see that drmDropMaster became conditional: if (!ms->fd_passed) drmDropMaster(ms->fd); That's actually a fix which is necessary so that the lessee doesn't give away control of the whole device. I've missed that drmSetMaster is also conditional now. I was thinking that lessee has to perform drmSetMaster in order to use the FD. Such an asymmetry between the Owner and Lessees seems unfortunate for me. I was thinking that may be it is possible to implement a CUSE driver to expose leased descriptors as /dev/dri/card* devices so that it would be possible to run X server unmodified. I suppose it could, but I'm not sure why you'd want to? To pretend that there are multiple GPUs in a system to reuse multiseat setup methods for the case of multiple GPUs. Prolly CUSE method wouldn't work even if there was a symmetry, because seats are defined in terms of /sys/devices, not /dev/dri/cards ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: Sharing a KMS device
Troll Berserker writes: > Hmm. I see that drmDropMaster became conditional: > > if (!ms->fd_passed) > drmDropMaster(ms->fd); That's actually a fix which is necessary so that the lessee doesn't give away control of the whole device. > I was thinking that may be it is possible to implement a CUSE driver > to expose leased descriptors as /dev/dri/card* devices so that it > would be possible to run X server unmodified. I suppose it could, but I'm not sure why you'd want to? > But now I see that these leased FDs are somehow special so you can't perform > drmDropMaster on them. > Why? 'drm master' is the overall controller of the whole device; when that is dropped, all of the related lessees and lessor no longer have access to the device. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: Sharing a KMS device
On 19/09/18 01:02, Keith Packard wrote: Troll Berserker writes: Cool. In your talk you even mentions multiseating. AFAIU with this technique one doesn't get multiple /dev/dri/card* for a GPU out of the box, so it is not possible to use unmodified modesetting driver to run multiple X servers. Correct. I have posted X server patches to pass the DRM file descriptor in from an external program, and a sample program which creates a lease for that purpose. Hmm. I see that drmDropMaster became conditional: if (!ms->fd_passed) drmDropMaster(ms->fd); (https://github.com/mirror/xserver/commit/38ff29ec8ead0a293f50ac52146199babe4205ca#diff-4db01e9b0bfda6e79f6b85426b0cdb0aR1780) I was thinking that may be it is possible to implement a CUSE driver to expose leased descriptors as /dev/dri/card* devices so that it would be possible to run X server unmodified. But now I see that these leased FDs are somehow special so you can't perform drmDropMaster on them. Why? ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: Sharing a KMS device
Troll Berserker writes: > Cool. In your talk you even mentions multiseating. > AFAIU with this technique one doesn't get multiple /dev/dri/card* for > a GPU out of the box, so it is not possible to use unmodified > modesetting driver to run multiple X servers. Correct. I have posted X server patches to pass the DRM file descriptor in from an external program, and a sample program which creates a lease for that purpose. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: Sharing a KMS device
On 18/09/18 22:49, Keith Packard wrote: Troll Berserker writes: Is it theoretically possible to implement a driver (let's call it shared-modesetting) which will offload mode setting to a helper daemon (drmMaster) thus allowing to run multiple Xorg servers on one DRM device? (provided that there are enough CRTCs (?) available). We've recently add a new technique in DRM called 'leasing', which allows you to create a new DRM controller for a subset of the available resources. Cool. In your talk you even mentions multiseating. AFAIU with this technique one doesn't get multiple /dev/dri/card* for a GPU out of the box, so it is not possible to use unmodified modesetting driver to run multiple X servers. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: Sharing a KMS device
Troll Berserker writes: > Is it theoretically possible to implement a driver (let's call it > shared-modesetting) which will offload mode setting to a helper daemon > (drmMaster) thus allowing to run multiple Xorg servers on one DRM > device? (provided that there are enough CRTCs (?) available). We've recently add a new technique in DRM called 'leasing', which allows you to create a new DRM controller for a subset of the available resources. -- -keith signature.asc Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Sharing a KMS device
In DRM, only one application can be drmMaster at a time. This is one of the reasons why one can't run a Xorg server per Connector to have multiseat with one GPU. Is it theoretically possible to implement a driver (let's call it shared-modesetting) which will offload mode setting to a helper daemon (drmMaster) thus allowing to run multiple Xorg servers on one DRM device? (provided that there are enough CRTCs (?) available). ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel