Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 304a4840 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie
Browse files

drm/radeon/kms: fix TRAVIS panel setup

Different versions of the DP to LVDS bridge chip
need different panel mode settings depending on
the chip version used.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=41569



Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent de47a9cd
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -564,9 +564,21 @@ int radeon_dp_get_panel_mode(struct drm_encoder *encoder,
	    ENCODER_OBJECT_ID_NUTMEG)
		panel_mode = DP_PANEL_MODE_INTERNAL_DP1_MODE;
	else if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) ==
		 ENCODER_OBJECT_ID_TRAVIS)
		 ENCODER_OBJECT_ID_TRAVIS) {
		u8 id[6];
		int i;
		for (i = 0; i < 6; i++)
			id[i] = radeon_read_dpcd_reg(radeon_connector, 0x503 + i);
		if (id[0] == 0x73 &&
		    id[1] == 0x69 &&
		    id[2] == 0x76 &&
		    id[3] == 0x61 &&
		    id[4] == 0x72 &&
		    id[5] == 0x54)
			panel_mode = DP_PANEL_MODE_INTERNAL_DP1_MODE;
		else
			panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;
	else if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
	} else if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
		u8 tmp = radeon_read_dpcd_reg(radeon_connector, DP_EDP_CONFIGURATION_CAP);
		if (tmp & 1)
			panel_mode = DP_PANEL_MODE_INTERNAL_DP2_MODE;