Browse Source

drm/nouveau/kms: avoid adding scaler-only modes the same as the panel's native mode

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs 10 years ago
parent
commit
f0d15402a3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      drivers/gpu/drm/nouveau/nouveau_connector.c

+ 3 - 1
drivers/gpu/drm/nouveau/nouveau_connector.c

@@ -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);