kms: Add way to run without mode setting
Currently our only entry point for DRM devices is MetaKms*, but in order to run without being DRM master, we cannot use /dev/dri/card*, nor can we be either of the existing MetaKmsImplDevice implementation (legacy KMS, and atomic KMS), as they both depend on being DRM master. Thus to handle running without being DRM master (i.e. headless), add a "dummy" MetaKmsImplDevice implementation, that doesn't do any mode setting at all, and that switches to operate on the render node, instead of the card node itself. This means we still use the same GBM code paths as the regular native backend paths, except we never make use of any CRTC backed onscreen framebuffers. Eventually, this "dummy" MetaKmsImplDevice will be replaced separating "KMS" device objects from "render" device objects, but that will require more significant changes. It will, however, be necessary for e.g. going from being headless, only having access to a render node, to turning into a real session, with a seat, being DRM master, and having access to a card node. This is currently not hooked up, but will be in a later commit. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
This commit is contained in:
@ -531,7 +531,9 @@ meta_backend_native_initable_init (GInitable *initable,
|
||||
|
||||
native->udev = meta_udev_new (native);
|
||||
|
||||
native->kms = meta_kms_new (META_BACKEND (native), error);
|
||||
native->kms = meta_kms_new (META_BACKEND (native),
|
||||
META_KMS_FLAG_NONE,
|
||||
error);
|
||||
if (!native->kms)
|
||||
return FALSE;
|
||||
|
||||
|
Reference in New Issue
Block a user