aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/radeon/atombios_encoders.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index 4a7f95e5550d..6e8803a1170c 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -1769,13 +1769,34 @@ static int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder)
1769 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc); 1769 struct radeon_crtc *radeon_crtc = to_radeon_crtc(encoder->crtc);
1770 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); 1770 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
1771 struct drm_encoder *test_encoder; 1771 struct drm_encoder *test_encoder;
1772 struct radeon_encoder_atom_dig *dig; 1772 struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
1773 uint32_t dig_enc_in_use = 0; 1773 uint32_t dig_enc_in_use = 0;
1774 1774
1775 /* DCE4/5 */ 1775 if (ASIC_IS_DCE6(rdev)) {
1776 if (ASIC_IS_DCE4(rdev)) { 1776 /* DCE6 */
1777 dig = radeon_encoder->enc_priv; 1777 switch (radeon_encoder->encoder_id) {
1778 if (ASIC_IS_DCE41(rdev)) { 1778 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY:
1779 if (dig->linkb)
1780 return 1;
1781 else
1782 return 0;
1783 break;
1784 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
1785 if (dig->linkb)
1786 return 3;
1787 else
1788 return 2;
1789 break;
1790 case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
1791 if (dig->linkb)
1792 return 5;
1793 else
1794 return 4;
1795 break;
1796 }
1797 } else if (ASIC_IS_DCE4(rdev)) {
1798 /* DCE4/5 */
1799 if (ASIC_IS_DCE41(rdev) && !ASIC_IS_DCE61(rdev)) {
1779 /* ontario follows DCE4 */ 1800 /* ontario follows DCE4 */
1780 if (rdev->family == CHIP_PALM) { 1801 if (rdev->family == CHIP_PALM) {
1781 if (dig->linkb) 1802 if (dig->linkb)