mirror of
https://github.com/brl/mutter.git
synced 2024-11-30 20:01:00 -05:00
ee4e78b100
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>
31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
/*
|
|
* Copyright (C) 2021 Red Hat
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
* 02111-1307, USA.
|
|
*/
|
|
|
|
#ifndef META_KMS_IMPL_DEVICE_DUMMY_H
|
|
#define META_KMS_IMPL_DEVICE_DUMMY_H
|
|
|
|
#include "backends/native/meta-kms-impl-device.h"
|
|
|
|
#define META_TYPE_KMS_IMPL_DEVICE_DUMMY (meta_kms_impl_device_dummy_get_type ())
|
|
G_DECLARE_FINAL_TYPE (MetaKmsImplDeviceDummy, meta_kms_impl_device_dummy,
|
|
META, KMS_IMPL_DEVICE_DUMMY,
|
|
MetaKmsImplDevice)
|
|
|
|
#endif /* META_KMS_IMPL_DEVICE_DUMMY_H */
|