diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_atombios.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atombios.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index c3198453528f..4f7dbce9883a 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -159,8 +159,15 @@ static struct radeon_hpd radeon_atom_get_hpd_info_from_gpio(struct radeon_device | |||
159 | struct radeon_gpio_rec *gpio) | 159 | struct radeon_gpio_rec *gpio) |
160 | { | 160 | { |
161 | struct radeon_hpd hpd; | 161 | struct radeon_hpd hpd; |
162 | u32 reg; | ||
163 | |||
164 | if (ASIC_IS_DCE4(rdev)) | ||
165 | reg = EVERGREEN_DC_GPIO_HPD_A; | ||
166 | else | ||
167 | reg = AVIVO_DC_GPIO_HPD_A; | ||
168 | |||
162 | hpd.gpio = *gpio; | 169 | hpd.gpio = *gpio; |
163 | if (gpio->reg == AVIVO_DC_GPIO_HPD_A) { | 170 | if (gpio->reg == reg) { |
164 | switch(gpio->mask) { | 171 | switch(gpio->mask) { |
165 | case (1 << 0): | 172 | case (1 << 0): |
166 | hpd.hpd = RADEON_HPD_1; | 173 | hpd.hpd = RADEON_HPD_1; |
@@ -556,6 +563,9 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev) | |||
556 | ddc_bus.valid = false; | 563 | ddc_bus.valid = false; |
557 | } | 564 | } |
558 | 565 | ||
566 | /* needed for aux chan transactions */ | ||
567 | ddc_bus.hpd_id = hpd.hpd ? (hpd.hpd - 1) : 0; | ||
568 | |||
559 | conn_id = le16_to_cpu(path->usConnObjectId); | 569 | conn_id = le16_to_cpu(path->usConnObjectId); |
560 | 570 | ||
561 | if (!radeon_atom_apply_quirks | 571 | if (!radeon_atom_apply_quirks |
@@ -820,6 +830,7 @@ union firmware_info { | |||
820 | ATOM_FIRMWARE_INFO_V1_2 info_12; | 830 | ATOM_FIRMWARE_INFO_V1_2 info_12; |
821 | ATOM_FIRMWARE_INFO_V1_3 info_13; | 831 | ATOM_FIRMWARE_INFO_V1_3 info_13; |
822 | ATOM_FIRMWARE_INFO_V1_4 info_14; | 832 | ATOM_FIRMWARE_INFO_V1_4 info_14; |
833 | ATOM_FIRMWARE_INFO_V2_1 info_21; | ||
823 | }; | 834 | }; |
824 | 835 | ||
825 | bool radeon_atom_get_clock_info(struct drm_device *dev) | 836 | bool radeon_atom_get_clock_info(struct drm_device *dev) |
@@ -831,6 +842,7 @@ bool radeon_atom_get_clock_info(struct drm_device *dev) | |||
831 | uint8_t frev, crev; | 842 | uint8_t frev, crev; |
832 | struct radeon_pll *p1pll = &rdev->clock.p1pll; | 843 | struct radeon_pll *p1pll = &rdev->clock.p1pll; |
833 | struct radeon_pll *p2pll = &rdev->clock.p2pll; | 844 | struct radeon_pll *p2pll = &rdev->clock.p2pll; |
845 | struct radeon_pll *dcpll = &rdev->clock.dcpll; | ||
834 | struct radeon_pll *spll = &rdev->clock.spll; | 846 | struct radeon_pll *spll = &rdev->clock.spll; |
835 | struct radeon_pll *mpll = &rdev->clock.mpll; | 847 | struct radeon_pll *mpll = &rdev->clock.mpll; |
836 | uint16_t data_offset; | 848 | uint16_t data_offset; |
@@ -933,8 +945,19 @@ bool radeon_atom_get_clock_info(struct drm_device *dev) | |||
933 | rdev->clock.default_mclk = | 945 | rdev->clock.default_mclk = |
934 | le32_to_cpu(firmware_info->info.ulDefaultMemoryClock); | 946 | le32_to_cpu(firmware_info->info.ulDefaultMemoryClock); |
935 | 947 | ||
948 | if (ASIC_IS_DCE4(rdev)) { | ||
949 | rdev->clock.default_dispclk = | ||
950 | le32_to_cpu(firmware_info->info_21.ulDefaultDispEngineClkFreq); | ||
951 | if (rdev->clock.default_dispclk == 0) | ||
952 | rdev->clock.default_dispclk = 60000; /* 600 Mhz */ | ||
953 | rdev->clock.dp_extclk = | ||
954 | le16_to_cpu(firmware_info->info_21.usUniphyDPModeExtClkFreq); | ||
955 | } | ||
956 | *dcpll = *p1pll; | ||
957 | |||
936 | return true; | 958 | return true; |
937 | } | 959 | } |
960 | |||
938 | return false; | 961 | return false; |
939 | } | 962 | } |
940 | 963 | ||