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 <[email protected]>

---
V2:
* Check against info.family, not info.chipset

 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 ae489dc1b1943..33f60f5d4d9f3 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 device *parent, struct 
nvkm_device *device)
                goto done;
        }
 
-       if (nouveau_atomic)
-               drm_driver->driver_features |= DRIVER_ATOMIC;
+       if (nouveau_atomic) {
+               if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA)
+                       drm_driver->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

Reply via email to