* [PATCH 1/4] drm/nouveau: Print the nouveau.atomic parameter in nouveau_display_options()
2026-07-30 0:56 [PATCH 0/4] drm/nouveau: Enable atomic modesetting by default Lyude Paul
@ 2026-07-30 0:56 ` Lyude Paul
2026-07-30 0:56 ` [PATCH 2/4] drm/nouveau/kms: Check nouveau.atomic parameter after nvif_device_ctor() Lyude Paul
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Lyude Paul @ 2026-07-30 0:56 UTC (permalink / raw)
To: dri-devel, nouveau, linux-kernel
Cc: Maarten Lankhorst, Simona Vetter, David Airlie,
Thomas Zimmermann, Maxime Ripard, Danilo Krummrich, Lyude Paul
Seems like we never remembered to start printing the value for this, so
let's start to aid in troubleshooting in case we run into any issues with
atomic.
Signed-off-by: Lyude Paul <lyude@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 4d1ad718e09b7..ad693d2849bec 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -1416,6 +1416,7 @@ static void nouveau_display_options(void)
DRM_DEBUG_DRIVER("... debug : %s\n", nouveau_debug);
DRM_DEBUG_DRIVER("... noaccel : %d\n", nouveau_noaccel);
DRM_DEBUG_DRIVER("... modeset : %d\n", nouveau_modeset);
+ DRM_DEBUG_DRIVER("... atomic : %d\n", nouveau_atomic);
DRM_DEBUG_DRIVER("... runpm : %d\n", nouveau_runtime_pm);
DRM_DEBUG_DRIVER("... vram_pushbuf : %d\n", nouveau_vram_pushbuf);
DRM_DEBUG_DRIVER("... hdmimhz : %d\n", nouveau_hdmimhz);
--
2.55.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 2/4] drm/nouveau/kms: Check nouveau.atomic parameter after nvif_device_ctor()
2026-07-30 0:56 [PATCH 0/4] drm/nouveau: Enable atomic modesetting by default Lyude Paul
2026-07-30 0:56 ` [PATCH 1/4] drm/nouveau: Print the nouveau.atomic parameter in nouveau_display_options() Lyude Paul
@ 2026-07-30 0:56 ` Lyude Paul
2026-07-30 0:56 ` [PATCH 3/4] drm/nouveau/kms: Only allow enabling atomic modesetting on nv50+ Lyude Paul
2026-07-30 0:56 ` [PATCH 4/4] drm/nouveau/kms/nv50-: Enable atomic modesetting by default Lyude Paul
3 siblings, 0 replies; 5+ messages in thread
From: Lyude Paul @ 2026-07-30 0:56 UTC (permalink / raw)
To: dri-devel, nouveau, linux-kernel
Cc: Maarten Lankhorst, Simona Vetter, David Airlie,
Thomas Zimmermann, Maxime Ripard, Danilo Krummrich, Lyude Paul
Waiting until the NVIF device is ready is preferable, as this will allow us
to factor in the chipset generation into whether or not we enable atomic by
default.
Signed-off-by: Lyude Paul <lyude@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index ad693d2849bec..8899f009f825e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -727,7 +727,7 @@ nouveau_drm_device_del(struct nouveau_drm *drm)
}
static struct nouveau_drm *
-nouveau_drm_device_new(const struct drm_driver *drm_driver, struct device *parent,
+nouveau_drm_device_new(struct drm_driver *drm_driver, struct device *parent,
struct nvkm_device *device)
{
static const struct nvif_mclass
@@ -770,6 +770,9 @@ nouveau_drm_device_new(const struct drm_driver *drm_driver, struct device *paren
goto done;
}
+ if (nouveau_atomic)
+ driver_pci.driver_features |= DRIVER_ATOMIC;
+
ret = nvif_device_map(&drm->device);
if (ret) {
NV_ERROR(drm, "Failed to map PRI: %d\n", ret);
@@ -879,9 +882,6 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
pci_set_master(pdev);
- if (nouveau_atomic)
- driver_pci.driver_features |= DRIVER_ATOMIC;
-
drm = nouveau_drm_device_new(&driver_pci, &pdev->dev, device);
if (IS_ERR(drm)) {
ret = PTR_ERR(drm);
--
2.55.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 3/4] drm/nouveau/kms: Only allow enabling atomic modesetting on nv50+
2026-07-30 0:56 [PATCH 0/4] drm/nouveau: Enable atomic modesetting by default Lyude Paul
2026-07-30 0:56 ` [PATCH 1/4] drm/nouveau: Print the nouveau.atomic parameter in nouveau_display_options() Lyude Paul
2026-07-30 0:56 ` [PATCH 2/4] drm/nouveau/kms: Check nouveau.atomic parameter after nvif_device_ctor() Lyude Paul
@ 2026-07-30 0:56 ` Lyude Paul
2026-07-30 0:56 ` [PATCH 4/4] drm/nouveau/kms/nv50-: Enable atomic modesetting by default Lyude Paul
3 siblings, 0 replies; 5+ messages in thread
From: Lyude Paul @ 2026-07-30 0:56 UTC (permalink / raw)
To: dri-devel, nouveau, linux-kernel
Cc: Maarten Lankhorst, Simona Vetter, David Airlie,
Thomas Zimmermann, Maxime Ripard, Danilo Krummrich, Lyude Paul
Atomic modesetting support was never added for pre-nv50 chipsets, so make
sure we don't allow it to be forced on. Additionally, print a small warning
when it's not supported.
Signed-off-by: Lyude Paul <lyude@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 8899f009f825e..b959d79f7e1c7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -770,8 +770,12 @@ nouveau_drm_device_new(struct drm_driver *drm_driver, struct device *parent,
goto done;
}
- if (nouveau_atomic)
- driver_pci.driver_features |= DRIVER_ATOMIC;
+ if (nouveau_atomic) {
+ if (drm->device.info.chipset >= NV_DEVICE_INFO_V0_TESLA)
+ driver_pci.driver_features |= DRIVER_ATOMIC;
+ else
+ NV_WARN(drm, "Atomic modesetting not supported (needs nv50+)\n");
+ }
ret = nvif_device_map(&drm->device);
if (ret) {
--
2.55.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 4/4] drm/nouveau/kms/nv50-: Enable atomic modesetting by default
2026-07-30 0:56 [PATCH 0/4] drm/nouveau: Enable atomic modesetting by default Lyude Paul
` (2 preceding siblings ...)
2026-07-30 0:56 ` [PATCH 3/4] drm/nouveau/kms: Only allow enabling atomic modesetting on nv50+ Lyude Paul
@ 2026-07-30 0:56 ` Lyude Paul
3 siblings, 0 replies; 5+ messages in thread
From: Lyude Paul @ 2026-07-30 0:56 UTC (permalink / raw)
To: dri-devel, nouveau, linux-kernel
Cc: Maarten Lankhorst, Simona Vetter, David Airlie,
Thomas Zimmermann, Maxime Ripard, Danilo Krummrich, Lyude Paul
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 (<nv50) - let's enable it by default on generations of
hardware that support it. We'll leave the module parameter around for the
time being, as turning it off may be helpful in the possibility that we hit
regressions.
Signed-off-by: Lyude Paul <lyude@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index b959d79f7e1c7..5580ac9c782ba 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)");
@@ -770,10 +771,10 @@ nouveau_drm_device_new(struct drm_driver *drm_driver, struct device *parent,
goto done;
}
- if (nouveau_atomic) {
+ if (nouveau_atomic != 0) {
if (drm->device.info.chipset >= NV_DEVICE_INFO_V0_TESLA)
driver_pci.driver_features |= DRIVER_ATOMIC;
- else
+ else if (nouveau_atomic == 1)
NV_WARN(drm, "Atomic modesetting not supported (needs nv50+)\n");
}
--
2.55.0
^ permalink raw reply [flat|nested] 5+ messages in thread