From 2652aca460dcfdd0d169bbfa358aa15804dc736b Mon Sep 17 00:00:00 2001 From: Lyude Paul Date: Thu, 13 Aug 2026 16:46:51 -0400 Subject: [PATCH] drm/nouveau/kms/nv50-: Enable atomic modesetting by default Nouveau is one of the very few modern hardware drivers in the kernel that doesn't have atomic modesetting enabled by default, in part because when it was originally written by Ben there wasn't much in the way of good atomic modesetting clients to actually test things out with. Nowadays however, atomic modesetting is very much the norm - and support in userspace for non-atomic drivers is starting to bitrot a bit - leading to its own set of issues. At the same time, many of those issues are fixed by just turning on atomic in nouveau. Plus, I've been running nouveau with atomic modesetting on by default for most of the machines I work on, and I've already fixed quite a number of issues to the point where things seem quite stable (excluding a single screen flashing bug on my desktop, which I am not particularly convinced has anything to do with atomic modesetting). Now that we've protected against breaking things for chipsets where atomic isn't supported ( Reviewed-by: Dave Airlie Link: https://patch.msgid.link/20260813204803.2097176-6-lyude@redhat.com --- drivers/gpu/drm/nouveau/nouveau_drm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 82a8061e6d3e..b0f9fb10a74d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -103,8 +103,9 @@ MODULE_PARM_DESC(modeset, "enable driver (default: auto, " int nouveau_modeset = -1; module_param_named(modeset, nouveau_modeset, int, 0400); -MODULE_PARM_DESC(atomic, "Expose atomic ioctl (default: disabled)"); -static int nouveau_atomic = 0; +MODULE_PARM_DESC(atomic, "Expose atomic ioctl (default: auto, " + "0 = disabled, 1 = enabled)"); +static int nouveau_atomic = -1; module_param_named(atomic, nouveau_atomic, int, 0400); MODULE_PARM_DESC(runpm, "disable (0), force enable (1), optimus only default (-1)"); @@ -745,7 +746,7 @@ nouveau_drm_device_new(struct device *parent, struct nvkm_device *device) else driver = &driver_legacy_kms; } else { - if (nouveau_atomic) + if (nouveau_atomic == 1) dev_warn(parent, "Atomic modesetting not supported (needs nv50+)\n"); driver = &driver_legacy_kms;