kms: Only force legacy mode setting when using EGLStream
EGLStream is incompatible with atomic mode setting, but nvidia-drm when using libgbm is not, so lets only deny using atomic mode setting when the render device is an EGLStream based one. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2578>
This commit is contained in:
parent
58c3734d78
commit
44dae3e160
@ -604,6 +604,11 @@ add_drm_device (MetaBackendNative *backend_native,
|
|||||||
if (!render_device)
|
if (!render_device)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
#ifdef HAVE_EGL_DEVICE
|
||||||
|
if (META_IS_RENDER_DEVICE_EGL_STREAM (render_device))
|
||||||
|
flags |= META_KMS_DEVICE_FLAG_FORCE_LEGACY;
|
||||||
|
#endif
|
||||||
|
|
||||||
kms_device = meta_kms_create_device (backend_native->kms, device_path, flags,
|
kms_device = meta_kms_create_device (backend_native->kms, device_path, flags,
|
||||||
error);
|
error);
|
||||||
if (!kms_device)
|
if (!kms_device)
|
||||||
|
@ -411,6 +411,8 @@ meta_create_kms_impl_device (MetaKmsDevice *device,
|
|||||||
{
|
{
|
||||||
if (flags & META_KMS_DEVICE_FLAG_NO_MODE_SETTING)
|
if (flags & META_KMS_DEVICE_FLAG_NO_MODE_SETTING)
|
||||||
kms_mode = KMS_MODE_HEADLESS;
|
kms_mode = KMS_MODE_HEADLESS;
|
||||||
|
else if (flags & META_KMS_DEVICE_FLAG_FORCE_LEGACY)
|
||||||
|
kms_mode = KMS_MODE_SIMPLE;
|
||||||
else
|
else
|
||||||
kms_mode = KMS_MODE_AUTO;
|
kms_mode = KMS_MODE_AUTO;
|
||||||
}
|
}
|
||||||
|
@ -1214,7 +1214,6 @@ is_atomic_allowed (const char *driver_name)
|
|||||||
"qxl",
|
"qxl",
|
||||||
"vmwgfx",
|
"vmwgfx",
|
||||||
"vboxvideo",
|
"vboxvideo",
|
||||||
"nvidia-drm",
|
|
||||||
"virtio_gpu",
|
"virtio_gpu",
|
||||||
"xlnx",
|
"xlnx",
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -63,6 +63,7 @@ typedef enum _MetaKmsDeviceFlag
|
|||||||
META_KMS_DEVICE_FLAG_PREFERRED_PRIMARY = 1 << 3,
|
META_KMS_DEVICE_FLAG_PREFERRED_PRIMARY = 1 << 3,
|
||||||
META_KMS_DEVICE_FLAG_NO_MODE_SETTING = 1 << 4,
|
META_KMS_DEVICE_FLAG_NO_MODE_SETTING = 1 << 4,
|
||||||
META_KMS_DEVICE_FLAG_HAS_ADDFB2 = 1 << 5,
|
META_KMS_DEVICE_FLAG_HAS_ADDFB2 = 1 << 5,
|
||||||
|
META_KMS_DEVICE_FLAG_FORCE_LEGACY = 1 << 6,
|
||||||
} MetaKmsDeviceFlag;
|
} MetaKmsDeviceFlag;
|
||||||
|
|
||||||
typedef enum _MetaKmsResourceChanges
|
typedef enum _MetaKmsResourceChanges
|
||||||
|
Loading…
x
Reference in New Issue
Block a user