diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios_crtc.c')
-rw-r--r-- | drivers/gpu/drm/radeon/atombios_crtc.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index ec848787d7d9..9541995e4b21 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c | |||
@@ -671,6 +671,13 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc, | |||
671 | DISPPLL_CONFIG_DUAL_LINK; | 671 | DISPPLL_CONFIG_DUAL_LINK; |
672 | } | 672 | } |
673 | } | 673 | } |
674 | if (radeon_encoder_is_dp_bridge(encoder)) { | ||
675 | struct drm_encoder *ext_encoder = radeon_atom_get_external_encoder(encoder); | ||
676 | struct radeon_encoder *ext_radeon_encoder = to_radeon_encoder(ext_encoder); | ||
677 | args.v3.sInput.ucExtTransmitterID = ext_radeon_encoder->encoder_id; | ||
678 | } else | ||
679 | args.v3.sInput.ucExtTransmitterID = 0; | ||
680 | |||
674 | atom_execute_table(rdev->mode_info.atom_context, | 681 | atom_execute_table(rdev->mode_info.atom_context, |
675 | index, (uint32_t *)&args); | 682 | index, (uint32_t *)&args); |
676 | adjusted_clock = le32_to_cpu(args.v3.sOutput.ulDispPllFreq) * 10; | 683 | adjusted_clock = le32_to_cpu(args.v3.sOutput.ulDispPllFreq) * 10; |
@@ -1045,7 +1052,7 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, | |||
1045 | uint64_t fb_location; | 1052 | uint64_t fb_location; |
1046 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; | 1053 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; |
1047 | u32 fb_swap = EVERGREEN_GRPH_ENDIAN_SWAP(EVERGREEN_GRPH_ENDIAN_NONE); | 1054 | u32 fb_swap = EVERGREEN_GRPH_ENDIAN_SWAP(EVERGREEN_GRPH_ENDIAN_NONE); |
1048 | u32 tmp; | 1055 | u32 tmp, viewport_w, viewport_h; |
1049 | int r; | 1056 | int r; |
1050 | 1057 | ||
1051 | /* no fb bound */ | 1058 | /* no fb bound */ |
@@ -1171,8 +1178,10 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc, | |||
1171 | y &= ~1; | 1178 | y &= ~1; |
1172 | WREG32(EVERGREEN_VIEWPORT_START + radeon_crtc->crtc_offset, | 1179 | WREG32(EVERGREEN_VIEWPORT_START + radeon_crtc->crtc_offset, |
1173 | (x << 16) | y); | 1180 | (x << 16) | y); |
1181 | viewport_w = crtc->mode.hdisplay; | ||
1182 | viewport_h = (crtc->mode.vdisplay + 1) & ~1; | ||
1174 | WREG32(EVERGREEN_VIEWPORT_SIZE + radeon_crtc->crtc_offset, | 1183 | WREG32(EVERGREEN_VIEWPORT_SIZE + radeon_crtc->crtc_offset, |
1175 | (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay); | 1184 | (viewport_w << 16) | viewport_h); |
1176 | 1185 | ||
1177 | /* pageflip setup */ | 1186 | /* pageflip setup */ |
1178 | /* make sure flip is at vb rather than hb */ | 1187 | /* make sure flip is at vb rather than hb */ |
@@ -1213,7 +1222,7 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc, | |||
1213 | uint64_t fb_location; | 1222 | uint64_t fb_location; |
1214 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; | 1223 | uint32_t fb_format, fb_pitch_pixels, tiling_flags; |
1215 | u32 fb_swap = R600_D1GRPH_SWAP_ENDIAN_NONE; | 1224 | u32 fb_swap = R600_D1GRPH_SWAP_ENDIAN_NONE; |
1216 | u32 tmp; | 1225 | u32 tmp, viewport_w, viewport_h; |
1217 | int r; | 1226 | int r; |
1218 | 1227 | ||
1219 | /* no fb bound */ | 1228 | /* no fb bound */ |
@@ -1338,8 +1347,10 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc, | |||
1338 | y &= ~1; | 1347 | y &= ~1; |
1339 | WREG32(AVIVO_D1MODE_VIEWPORT_START + radeon_crtc->crtc_offset, | 1348 | WREG32(AVIVO_D1MODE_VIEWPORT_START + radeon_crtc->crtc_offset, |
1340 | (x << 16) | y); | 1349 | (x << 16) | y); |
1350 | viewport_w = crtc->mode.hdisplay; | ||
1351 | viewport_h = (crtc->mode.vdisplay + 1) & ~1; | ||
1341 | WREG32(AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset, | 1352 | WREG32(AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset, |
1342 | (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay); | 1353 | (viewport_w << 16) | viewport_h); |
1343 | 1354 | ||
1344 | /* pageflip setup */ | 1355 | /* pageflip setup */ |
1345 | /* make sure flip is at vb rather than hb */ | 1356 | /* make sure flip is at vb rather than hb */ |