• Stephen Chandler Paul's avatar
    DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd · 15b134ca
    Stephen Chandler Paul authored
    commit 924f92bf upstream.
    
    Most of the time this isn't an issue since hotplugging an adaptor will
    trigger a crtc mode change which in turn, causes the driver to probe
    every DisplayPort for a dpcd. However, in cases where hotplugging
    doesn't cause a mode change (specifically when one unplugs a monitor
    from a DisplayPort connector, then plugs that same monitor back in
    seconds later on the same port without any other monitors connected), we
    never probe for the dpcd before starting the initial link training. What
    happens from there looks like this:
    
    	- GPU has only one monitor connected. It's connected via
    	  DisplayPort, and does not go through an adaptor of any sort.
    
    	- User unplugs DisplayPort connector from GPU.
    
    	- Change in HPD is detected by the driver, we probe every
    	  DisplayPort for a possible connection.
    
    	- Probe the port the user originally had the monitor connected
    	  on for it's dpcd. This fails, and we clear the first (and only
    	  the first) byte of the dpcd to indicate we no longer have a
    	  dpcd for this port.
    
    	- User plugs the previously disconnected monitor back into the
    	  same DisplayPort.
    
    	- radeon_connector_hotplug() is called before everyone else,
    	  and tries to handle the link training. Since only the first
    	  byte of the dpcd is zeroed, the driver is able to complete
    	  link training but does so against the wrong dpcd, causing it
    	  to initialize the link with the wrong settings.
    
    	- Display stays blank (usually), dpcd is probed after the
    	  initial link training, and the driver prints no obvious
    	  messages to the log.
    
    In theory, since only one byte of the dpcd is chopped off (specifically,
    the byte that contains the revision information for DisplayPort), it's
    not entirely impossible that this bug may not show on certain monitors.
    For instance, the only reason this bug was visible on my ASUS PB238
    monitor was due to the fact that this monitor using the enhanced framing
    symbol sequence, the flag for which is ignored if the radeon driver
    thinks that the DisplayPort version is below 1.1.
    Signed-off-by: default avatarStephen Chandler Paul <cpaul@redhat.com>
    Reviewed-by: default avatarJerome Glisse <jglisse@redhat.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
    15b134ca
radeon_connectors.c 73.1 KB