Skip to content

Commit b7e8352

Browse files
cyringCyrIng
authored andcommitted
[Intel] from SKL to ADL: aggregate tRCD_WR DRAM timing
1 parent 5ec0498 commit b7e8352

File tree

1 file changed

+30
-6
lines changed

1 file changed

+30
-6
lines changed

corefreqd.c

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4401,12 +4401,21 @@ void SKL_IMC(RO(SHM_STRUCT) *RO(Shm), RO(PROC) *RO(Proc))
44014401

44024402
for (cha = 0; cha < RO(Shm)->Uncore.MC[mc].ChannelCount; cha++)
44034403
{
4404-
TIMING(mc, cha).tCL = \
4404+
TIMING(mc, cha).tCL = \
44054405
RO(Proc)->Uncore.MC[mc].Channel[cha].SKL.ODT.tCL;
44064406

4407-
TIMING(mc, cha).tRCD = \
4407+
TIMING(mc, cha).tRCD_RD = \
44084408
RO(Proc)->Uncore.MC[mc].Channel[cha].SKL.Timing.tRP;
44094409

4410+
TIMING(mc, cha).tRCD_WR = \
4411+
RO(Proc)->Uncore.MC[mc].Channel[cha].SKL.ACT.tRCD_WR;
4412+
4413+
if (TIMING(mc, cha).tRCD_WR == 0) {
4414+
/* ACT to CAS (RD or WR) same bank minimum delay in DCLK cycles */
4415+
TIMING(mc, cha).tRCD_WR = \
4416+
RO(Proc)->Uncore.MC[mc].Channel[cha].SKL.Timing.tRP;
4417+
}
4418+
44104419
TIMING(mc, cha).tRP = \
44114420
RO(Proc)->Uncore.MC[mc].Channel[cha].SKL.Timing.tRP;
44124421

@@ -4687,8 +4696,16 @@ void RKL_IMC(RO(SHM_STRUCT) *RO(Shm), RO(PROC) *RO(Proc))
46874696
TIMING(mc, cha).tCL = \
46884697
RO(Proc)->Uncore.MC[mc].Channel[cha].RKL.ODT.tCL;
46894698

4690-
TIMING(mc, cha).tRCD = \
4699+
TIMING(mc, cha).tRCD_RD = \
4700+
RO(Proc)->Uncore.MC[mc].Channel[cha].RKL.Timing.tRP;
4701+
4702+
TIMING(mc, cha).tRCD_WR = \
4703+
RO(Proc)->Uncore.MC[mc].Channel[cha].RKL.ACT.tRCD_WR;
4704+
4705+
if (TIMING(mc, cha).tRCD_WR == 0) {
4706+
TIMING(mc, cha).tRCD_WR = \
46914707
RO(Proc)->Uncore.MC[mc].Channel[cha].RKL.Timing.tRP;
4708+
}
46924709

46934710
TIMING(mc, cha).tRP = \
46944711
RO(Proc)->Uncore.MC[mc].Channel[cha].RKL.Timing.tRP;
@@ -4995,8 +5012,10 @@ void TGL_IMC(RO(SHM_STRUCT) *RO(Shm), RO(PROC) *RO(Proc))
49955012
TIMING(mc, cha).tCL = \
49965013
RO(Proc)->Uncore.MC[mc].Channel[cha].TGL.ODT.tCL;
49975014

4998-
TIMING(mc, cha).tRCD = \
4999-
RO(Proc)->Uncore.MC[mc].Channel[cha].TGL.Timing.tRP;
5015+
/* ACT to CAS (RD or WR) same bank minimum delay in tCK */
5016+
TIMING(mc, cha).tRCD_RD = \
5017+
TIMING(mc, cha).tRCD_WR = \
5018+
RO(Proc)->Uncore.MC[mc].Channel[cha].TGL.Timing.tRCD;
50005019

50015020
TIMING(mc, cha).tRP = \
50025021
RO(Proc)->Uncore.MC[mc].Channel[cha].TGL.Timing.tRP;
@@ -5197,12 +5216,17 @@ void ADL_IMC(RO(SHM_STRUCT) *RO(Shm), RO(PROC) *RO(Proc))
51975216
TIMING(mc, cha).tCL = \
51985217
RO(Proc)->Uncore.MC[mc].Channel[cha].ADL.ODT.tCL;
51995218

5200-
TIMING(mc, cha).tRCD = \
5219+
TIMING(mc, cha).tRCD_RD = \
52015220
RO(Proc)->Uncore.MC[mc].Channel[cha].ADL.Timing.tRCD;
52025221

52035222
TIMING(mc, cha).tRCD_WR = \
52045223
RO(Proc)->Uncore.MC[mc].Channel[cha].ADL.Timing.tRCDW;
52055224

5225+
if (TIMING(mc, cha).tRCD_WR == 0) {
5226+
TIMING(mc, cha).tRCD_WR = \
5227+
RO(Proc)->Uncore.MC[mc].Channel[cha].ADL.Timing.tRCD;
5228+
}
5229+
52065230
TIMING(mc, cha).tRP = \
52075231
RO(Proc)->Uncore.MC[mc].Channel[cha].ADL.Timing.tRP;
52085232

0 commit comments

Comments
 (0)