]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
drm/nouveau/kms: disallow dual-link harder if hdmi connection detected
authorBen Skeggs <bskeggs@redhat.com>
Tue, 28 May 2019 23:58:18 +0000 (09:58 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 19 Jul 2019 06:26:50 +0000 (16:26 +1000)
The fallthrough cases (pre-Fermi) would accidentally allow dual-link pixel
clocks even where they shouldn't be.  This leads to a high resolution HDMI
displays, connected via a DVI->HDMI adapter, to fail on the original NV50.

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

index 4116ee62adafea9762cc99121adad315c02b726f..caa8c7595889977240d154c8271d78f739ea92db 100644 (file)
@@ -978,11 +978,13 @@ get_tmds_link_bandwidth(struct drm_connector *connector)
        struct nouveau_drm *drm = nouveau_drm(connector->dev);
        struct dcb_output *dcb = nv_connector->detected_encoder->dcb;
        struct drm_display_info *info = NULL;
-       const unsigned duallink_scale =
+       unsigned duallink_scale =
                nouveau_duallink && nv_encoder->dcb->duallink_possible ? 2 : 1;
 
-       if (drm_detect_hdmi_monitor(nv_connector->edid))
+       if (drm_detect_hdmi_monitor(nv_connector->edid)) {
                info = &nv_connector->base.display_info;
+               duallink_scale = 1;
+       }
 
        if (info) {
                if (nouveau_hdmimhz > 0)
@@ -1003,6 +1005,7 @@ get_tmds_link_bandwidth(struct drm_connector *connector)
                if (drm->client.device.info.family >= NV_DEVICE_INFO_V0_FERMI)
                        return 225000;
        }
+
        if (dcb->location != DCB_LOC_ON_CHIP ||
            drm->client.device.info.chipset >= 0x46)
                return 165000 * duallink_scale;