Fix autoswitch not working with 4K monitor @25/30Hz

pull/360/head
IanSB 2023-07-23 00:05:33 +01:00
rodzic d563d9c106
commit 15388a4059
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -106,7 +106,7 @@
#define BIT_NO_SKIP_HSYNC 0x08000000 // bit 27, clear if hsync is ignored (used by cache preload)
#define BIT_HSYNC_EDGE 0x10000000 // bit 28, clear if trailing edge
#define BIT_RPI234 0x20000000 // bit 29, set if Pi 2, 3 or 4 detected
//#define BIT_ 0x40000000 // bit 30,
#define BIT_SKIP_ALT_FRAME 0x40000000 // bit 30, set to skip capture of alternate frames used in 4K@25/30Hz
//#define BIT_ 0x80000000 // bit 31, may get corrupted - check
// R0 return value bits

Wyświetl plik

@ -1271,7 +1271,7 @@ noInBandData:
ldr r0, param_video_type
cmp r0, #VIDEO_TELETEXT
beq skip_osd_update
tst r3, #BIT_OSD
tst r3, #BIT_OSD | BIT_SKIP_ALT_FRAME
beq skip_osd_update
push {r1-r5, r11}

Wyświetl plik

@ -3480,10 +3480,10 @@ void rgb_to_hdmi_main() {
int old_flags = flags;
if (half_frame_rate) { //half frame rate display detected (4K @ 25Hz / 30Hz)
if (capinfo->vsync_type != VSYNC_NONINTERLACED_DEJITTER) { //inhibit alternate frame dropping when using the vertical dejitter mode as that stops it working
if ((flags & BIT_OSD) == 0) {
capinfo->palette_control |= INHIBIT_PALETTE_DIMMING_16_BIT; //if OSD not enabled then stop screen dimming when blank OSD turned on below
flags |= BIT_OSD; //turn on OSD even though it is blank to force dropping of alternate frames to eliminate tear
}
//if ((flags & BIT_OSD) == 0) {
// capinfo->palette_control |= INHIBIT_PALETTE_DIMMING_16_BIT; //if OSD not enabled then stop screen dimming when blank OSD turned on below
flags |= BIT_SKIP_ALT_FRAME; //force dropping of alternate frames to eliminate tear
//}
}
wait_for_pi_fieldsync(); //ensure that the source and Pi frames are in a repeatable phase relationship