drm/nouveau/kms: avoid adding scaler-only modes the same as the panel's native mode
authorBen Skeggs <bskeggs@redhat.com>
Mon, 22 Dec 2014 07:28:35 +0000 (17:28 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 22 Jan 2015 02:14:58 +0000 (12:14 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_connector.c

index d13f50db765d8f4a2c05c841828175c10e1c7ebb..660d0e77ef34f8c3c07de783dd4783a6086d3f1f 100644 (file)
@@ -672,7 +672,9 @@ nouveau_connector_scaler_modes_add(struct drm_connector *connector)
 
        while (mode->hdisplay) {
                if (mode->hdisplay <= native->hdisplay &&
-                   mode->vdisplay <= native->vdisplay) {
+                   mode->vdisplay <= native->vdisplay &&
+                   (mode->hdisplay != native->hdisplay ||
+                    mode->vdisplay != native->vdisplay)) {
                        m = drm_cvt_mode(dev, mode->hdisplay, mode->vdisplay,
                                         drm_mode_vrefresh(native), false,
                                         false, false);