drm/nouveau/kms: default to panel scaling, except for fixed panels prior to nv50
authorBen Skeggs <bskeggs@redhat.com>
Mon, 22 Dec 2014 08:19:45 +0000 (18:19 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 22 Jan 2015 02:15:00 +0000 (12:15 +1000)
On NV50 and up, we'll allow fixed panels to use EDID-provided modes
without the GPU scaler, and force scaling (even for NONE) otherwise.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_connector.c

index 938de24da7dd31cd1a496e449fbc62bc71d7cac5..9c871f93cc1e87c9cf3598cffc200bc0ba5e7c4d 100644 (file)
@@ -1199,14 +1199,18 @@ nouveau_connector_create(struct drm_device *dev, int index)
 
        /* default scaling mode */
        switch (nv_connector->type) {
-       case DCB_CONNECTOR_TV_0:
-       case DCB_CONNECTOR_TV_1:
-       case DCB_CONNECTOR_TV_3:
-       case DCB_CONNECTOR_VGA:
+       case DCB_CONNECTOR_LVDS:
+       case DCB_CONNECTOR_LVDS_SPWG:
+       case DCB_CONNECTOR_eDP:
+               /* see note in nouveau_connector_set_property() */
+               if (disp->disp.oclass < NV50_DISP) {
+                       nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN;
+                       break;
+               }
                nv_connector->scaling_mode = DRM_MODE_SCALE_NONE;
                break;
        default:
-               nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN;
+               nv_connector->scaling_mode = DRM_MODE_SCALE_NONE;
                break;
        }