[coreboot-gerrit] Change in coreboot[master]: nb/intel/x4x: Select stacked mode under some circumstances
Arthur Heymans (Code Review)
gerrit at coreboot.org
Sat May 26 15:09:43 CEST 2018
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/26564
Change subject: nb/intel/x4x: Select stacked mode under some circumstances
......................................................................
nb/intel/x4x: Select stacked mode under some circumstances
It looks like this hardware has a bug where the display controller
does not work properly when dram is clocked 533MHz and the channels
are configured in non-stacked mode.
Change-Id: I6f37ce15a4e98a4cdbd6d893f22846a65c8be021
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M src/northbridge/intel/x4x/raminit.c
1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/26564/1
diff --git a/src/northbridge/intel/x4x/raminit.c b/src/northbridge/intel/x4x/raminit.c
index 9e649b0..016fbd9 100644
--- a/src/northbridge/intel/x4x/raminit.c
+++ b/src/northbridge/intel/x4x/raminit.c
@@ -352,6 +352,26 @@
}
}
+/* With DDR3 and 533MHz mem clock and a gfx device enabled the display
+ * is not usable in stacked mode, so select stacked mode accordingly */
+static void select_stacked_mode(struct sysinfo *s)
+{
+ u32 deven;
+ /* Only a problem on DDR3 */
+ if (s->spd_type == DDR2)
+ return;
+ /* Does not matter if only one channel is populated */
+ if (!CHANNEL_IS_POPULATED(s->dimms, 0)
+ || !CHANNEL_IS_POPULATED(s->dimms, 1))
+ return;
+ if (s->selected_timings.mem_clk != MEM_CLOCK_533MHz)
+ return;
+ /* IGD0EN gets disabled if not present before this code runs */
+ deven = pci_read_config32(PCI_DEV(0, 0, 0), D0F0_DEVEN);
+ if (deven & IGD0EN)
+ s->stacked_mode = 1;
+}
+
static int ddr3_save_dimminfo(u8 dimm_idx, u8 *raw_spd,
struct abs_timings *saved_timings, struct sysinfo *s)
{
@@ -544,6 +564,7 @@
else
select_cas_dramfreq_ddr3(s, &saved_timings);
select_discrete_timings(s, &saved_timings);
+ select_stacked_mode(s);
}
static void find_dimm_config(struct sysinfo *s)
--
To view, visit https://review.coreboot.org/26564
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f37ce15a4e98a4cdbd6d893f22846a65c8be021
Gerrit-Change-Number: 26564
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180526/453fd854/attachment.html>
More information about the coreboot-gerrit
mailing list