display: basic implementation of displa refresh changing
This commit is contained in:
@@ -120,10 +120,35 @@
|
||||
"svcGetSystemInfo": "0x6f",
|
||||
"svcCallSecureMonitor": "0x7f"
|
||||
}
|
||||
},
|
||||
{
|
||||
}, {
|
||||
"type": "min_kernel_version",
|
||||
"value": "0x0060"
|
||||
}, {
|
||||
"type": "handle_table_size",
|
||||
"value": 1023
|
||||
}, {
|
||||
"type": "debug_flags",
|
||||
"value": {
|
||||
"allow_debug": true,
|
||||
"force_debug_prod": false,
|
||||
"force_debug": false
|
||||
}
|
||||
}, {
|
||||
"type": "map",
|
||||
"value": {
|
||||
"address": "0x60006000",
|
||||
"size": "0x1000",
|
||||
"is_ro": false,
|
||||
"is_io": true
|
||||
}
|
||||
}, {
|
||||
"type": "map",
|
||||
"value": {
|
||||
"address": "0x54300000",
|
||||
"size": "0x40000",
|
||||
"is_ro": false,
|
||||
"is_io": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <numeric>
|
||||
#include <battery.h>
|
||||
#include <pwm.h>
|
||||
#include <display_refresh_rate.h>
|
||||
|
||||
#define HOSSVC_HAS_CLKRST (hosversionAtLeast(8,0,0))
|
||||
#define HOSSVC_HAS_TC (hosversionAtLeast(5,0,0))
|
||||
@@ -227,6 +228,16 @@ void Board::Initialize()
|
||||
pwmCheck = pwmOpenSession2(&g_ICon, 0x3D000001);
|
||||
}
|
||||
|
||||
u64 clkVirtAddr, dsiVirtAddr, outsize;
|
||||
Result rc = svcQueryMemoryMapping(&clkVirtAddr, &outsize, 0x60006000, 0x1000);
|
||||
ASSERT_RESULT_OK(rc, "svcQueryMemoryMapping (clk)");
|
||||
Result rc = svcQueryMemoryMapping(&dsiVirtAddr, &outsize, 0x54300000, 0x40000);
|
||||
ASSERT_RESULT_OK(rc, "svcQueryMemoryMapping (dsi)");
|
||||
|
||||
DisplayRefreshConfig cfg = {.clkVirtAddr = clkVirtAddr, .dsiVirtAddr = dsiVirtAddr};
|
||||
|
||||
DisplayRefresh_Initialize(&cfg);
|
||||
|
||||
FetchHardwareInfos();
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "kip.h"
|
||||
#include <i2c.h>
|
||||
#include "notification.h"
|
||||
#include <display_refresh_rate.h>
|
||||
|
||||
#define HOSPPC_HAS_BOOST (hosversionAtLeast(7,0,0))
|
||||
bool isGovernorEnabled = false; // to avoid thread messes
|
||||
@@ -96,7 +97,9 @@ ClockManager::ClockManager()
|
||||
0x3F,
|
||||
-2
|
||||
);
|
||||
|
||||
|
||||
|
||||
threadStart(&governorTHREAD);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user