From 461411c798c263f70daa96f7136614dfefda6adc Mon Sep 17 00:00:00 2001 From: notbabaisyou Date: Sun, 15 Jun 2025 20:15:37 +0200 Subject: [PATCH] modesetting: allow enabling atomic mode. The Linux kernel has long had code preventing Xorg from using atomic modesetting due to various bugs in it's implementation, some of these issues have since been fixed but some issues remain namely with DPMS and other smaller things, we should allow users to opt-in by setting "Option 'Atomic' 'True'" This shouldn't cause any issues as the feature remains disabled by default. Co-authored-by: Daniel Abrecht Signed-off-by: notbabaisyou --- hw/xfree86/drivers/modesetting/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c index 7c8d779dc..d509f4400 100644 --- a/hw/xfree86/drivers/modesetting/driver.c +++ b/hw/xfree86/drivers/modesetting/driver.c @@ -1306,7 +1306,7 @@ PreInit(ScrnInfoPtr pScrn, int flags) ms->atomic_modeset_capable = (ret == 0); if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_ATOMIC, FALSE)) { - ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1); + ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 2); ms->atomic_modeset = (ret == 0); if (!ms->atomic_modeset) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Atomic modesetting not supported\n");