ldr: add erista rext timings
This commit is contained in:
1 parent
b16337df89
commit
0a9f412c51
5 files changed
+41
-18
No files matched your search
+31
@@ -18,6 +18,36 @@
|
||||
|
||||
namespace ams::ldr::hoc::pcv::erista {
|
||||
|
||||
/* Dumped from bpmp fw mtc table (l4t). */
|
||||
const RextPatch g_rext_table[] = {
|
||||
{1'633'000, 0x17}, {1'728'000, 0x17}, {1'795'200, 0x19},
|
||||
{1'862'400, 0x1A}, {1'894'400, 0x1A}, {1'932'800, 0x1A},
|
||||
{1'958'400, 0x1A}, {1'996'800, 0x1A}, {2'035'200, 0x1A},
|
||||
{2'064'000, 0x19}, {2'099'200, 0x19}, {2'131'200, 0x1A},
|
||||
{2'163'200, 0x1A}, {2'188'800, 0x1A}, {2'227'200, 0x1A},
|
||||
{2'265'600, 0x1B}, {2'291'200, 0x1B}, {2'329'600, 0x1A},
|
||||
{2'361'600, 0x1A},
|
||||
};
|
||||
|
||||
const RextPatch *LookupRext(u32 freq) {
|
||||
for (u32 i = 0; i < std::size(g_rext_table); i++) {
|
||||
if (g_rext_table[i].freq >= freq) {
|
||||
return &g_rext_table[i];
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void GetRext(u32 freq) {
|
||||
if (auto r = LookupRext(freq)) {
|
||||
rext = r->rext;
|
||||
return;
|
||||
}
|
||||
|
||||
/* > 3200 */
|
||||
rext = 0x1E;
|
||||
}
|
||||
|
||||
void SwitchLatency(volatile u32 &latency, u32 index, u32 latencyStep) {
|
||||
latency += index * latencyStep;
|
||||
}
|
||||
@@ -117,6 +147,7 @@ namespace ams::ldr::hoc::pcv::erista {
|
||||
WL = WL_1331;
|
||||
|
||||
HandleLatency(freq);
|
||||
GetRext(freq);
|
||||
CalculateMrw2();
|
||||
|
||||
tR2P = CEIL((RL * 0.426) - 2.0);
|
||||
|
||||
@@ -66,14 +66,6 @@ namespace ams::ldr::hoc::pcv::erista {
|
||||
refresh_raw = MIN(refresh_raw, static_cast<u32>(0xFFFF));
|
||||
}
|
||||
|
||||
if (table->rate_khz > 3200000) {
|
||||
rext = 30;
|
||||
} else if (table->rate_khz >= 2133001) {
|
||||
rext = 28;
|
||||
} else {
|
||||
rext = 26;
|
||||
}
|
||||
|
||||
u32 trefbw = refresh_raw + 0x40;
|
||||
trefbw = MIN(trefbw, static_cast<u32>(0x3FFF));
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
namespace ams::ldr::hoc::pcv::mariko {
|
||||
|
||||
const ReplacePatch g_rext_table[] = {
|
||||
const RextPatch g_rext_table[] = {
|
||||
{2'133'000, 0x1A}, {2'166'000, 0x19}, {2'200'000, 0x19},
|
||||
{2'233'000, 0x19}, {2'266'000, 0x1A}, {2'300'000, 0x1B},
|
||||
{2'333'000, 0x1B}, {2'366'000, 0x1B}, {2'400'000, 0x1B},
|
||||
@@ -35,7 +35,7 @@ namespace ams::ldr::hoc::pcv::mariko {
|
||||
|
||||
const u32 g_rext_table_size = sizeof(g_rext_table) / sizeof(g_rext_table[0]);
|
||||
|
||||
const ReplacePatch *FindRext(u32 freq) {
|
||||
const RextPatch *FindRext(u32 freq) {
|
||||
for (u32 i = 0; i < g_rext_table_size; i++) {
|
||||
if (g_rext_table[i].freq >= freq) {
|
||||
return &g_rext_table[i];
|
||||
|
||||
@@ -19,13 +19,8 @@
|
||||
|
||||
namespace ams::ldr::hoc::pcv::mariko {
|
||||
|
||||
struct ReplacePatch {
|
||||
u32 freq;
|
||||
u32 rext;
|
||||
};
|
||||
|
||||
extern const ReplacePatch g_rext_table[];
|
||||
extern const u32 g_rext_table_size;
|
||||
const ReplacePatch *FindRext(u32 freq);
|
||||
extern const RextPatch g_rext_table[];
|
||||
extern const u32 g_rext_table_size;
|
||||
const RextPatch *FindRext(u32 freq);
|
||||
|
||||
}
|
||||
@@ -187,6 +187,11 @@ namespace ams::ldr::hoc::pcv {
|
||||
};
|
||||
static_assert(sizeof(SharedClkBus) == 0x58);
|
||||
|
||||
struct RextPatch {
|
||||
u32 freq;
|
||||
u32 rext;
|
||||
};
|
||||
|
||||
constexpr u32 CpuClkOSLimit = 1785'000;
|
||||
constexpr u32 GpuClkOsLimit = 921'600;
|
||||
constexpr u32 EmcClkOSLimit = 1600'000;
|
||||
|
||||
Reference in new issue
Block a user