intel_extreme: also set hw_cdclk on Broadwell

this needed for dp aux before skylake, only for DP A (eDP).
should help with #17771

Change-Id: I4bdcca1fdc05294fb5b56c5c96164b6936a5881e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5355
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Jérôme Duval 2022-06-04 21:31:36 +02:00
parent e9e00b80c0
commit 85344c112c
2 changed files with 15 additions and 1 deletions

View File

@ -923,6 +923,8 @@ struct intel_brightness_legacy {
#define LCPLL_CTL 0x130040
#define LCPLL_CLK_FREQ_MASK (3 << 26)
#define LCPLL_CLK_FREQ_450 (0 << 26)
#define LCPLL_CLK_FREQ_54O_BDW (1 << 26)
#define LCPLL_CLK_FREQ_337_5_BDW (2 << 26)
#define LCPLL_CD_SOURCE_FCLK (1 << 21)
// display

View File

@ -879,7 +879,19 @@ intel_extreme_init(intel_info &info)
info.shared_info->fdi_link_frequency = 0;
}
if (info.device_type.InGroup(INTEL_GROUP_HAS)) {
if (info.device_type.InGroup(INTEL_GROUP_BDW)) {
uint32 lcpll = read32(info, LCPLL_CTL);
if ((lcpll & LCPLL_CD_SOURCE_FCLK) != 0)
info.shared_info->hw_cdclk = 800000;
else if ((lcpll & LCPLL_CLK_FREQ_MASK) == LCPLL_CLK_FREQ_450)
info.shared_info->hw_cdclk = 450000;
else if ((lcpll & LCPLL_CLK_FREQ_MASK) == LCPLL_CLK_FREQ_54O_BDW)
info.shared_info->hw_cdclk = 540000;
else if ((lcpll & LCPLL_CLK_FREQ_MASK) == LCPLL_CLK_FREQ_337_5_BDW)
info.shared_info->hw_cdclk = 337500;
else
info.shared_info->hw_cdclk = 675000;
} else if (info.device_type.InGroup(INTEL_GROUP_HAS)) {
uint32 lcpll = read32(info, LCPLL_CTL);
if ((lcpll & LCPLL_CD_SOURCE_FCLK) != 0)
info.shared_info->hw_cdclk = 800000;