Pi Firmware: maintain exact lock when switching between modes 0..6 and mode 7

Change-Id: I56916876d087bd679ff171c59cc0dbdfea36a4ba
pull/11/head
David Banks 2018-11-19 10:16:54 +00:00
rodzic 67ff0b059a
commit e9a70d7a7d
1 zmienionych plików z 7 dodań i 11 usunięć

Wyświetl plik

@ -24,10 +24,6 @@
// #define INSTRUMENT_CAL
#define NUM_CAL_PASSES 1
#define SHORT_PRESS 0
#define LONG_PRESS 1
typedef void (*func_ptr)();
#define GZ_CLK_BUSY (1 << 7)
@ -367,7 +363,7 @@ static void recalculate_hdmi_clock() {
if (vsync_time_ns == 0) {
return;
}
// Dump the PLLH registers
log_info("PLLH: PDIV=%d NDIV=%d FRAC=%d AUX=%d RCAL=%d PIX=%d STS=%d",
(gpioreg[PLLH_CTRL] >> 12) & 0x7,
@ -1071,12 +1067,6 @@ void rgb_to_hdmi_main() {
capinfo = &default_capinfo;
// Measure the frame time and set the sampling clock
calibrate_sampling_clock();
// Recalculate the HDMI clock (if the pllh property requires this)
recalculate_hdmi_clock();
// Determine initial mode
mode7 = rgb_to_fb(capinfo, BIT_PROBE) & BIT_MODE7 & !m7disable;
@ -1099,6 +1089,12 @@ void rgb_to_hdmi_main() {
init_framebuffer(capinfo);
log_debug("Done setting up frame buffer");
// Measure the frame time and set the sampling clock
calibrate_sampling_clock();
// Recalculate the HDMI clock (if the pllh property requires this)
recalculate_hdmi_clock();
clear = BIT_CLEAR;
osd_refresh();