Bug 314190

Summary: [WPEPlatform] Apply fallback to 60Hz when wpe_screen_get_refresh_rate() returns -1
Product: WebKit Reporter: Adrian Perez <aperez>
Component: WPE WebKitAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bugs-noreply
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 265636    

Adrian Perez
Reported 2026-05-06 04:43:14 PDT
Currently there are some locations in the code that do NOT check whether wpe_screen_get_refresh_rate() returns -1, which is a sentinel value used to indicate that the platform implementation has not provided a refresh rate value. I could find two call sites without checks, for example in DisplayVBlankMonitorWPE.cpp: return makeUnique<DisplayVBlankMonitorWPE>(wpe_screen_get_refresh_rate(screen) / 1000, WTF::move(observer)); and in WPEViewDRM.cpp we can end up with a negative value for priv->refreshDuration: priv->refreshDuration = Seconds(1 / (wpe_screen_get_refresh_rate(wpeDisplayDRMGetScreen(display)) / 1000.));
Attachments
Shubham Kapoor
Comment 1 2026-10-27 11:02:39 PDT
Hi Adrian, I'd like to take this. My plan is to fall back to 60 Hz in DisplayVBlankMonitorWPE::create() and in WPEViewDRM when the rate is unknown (-1) or under 1 Hz. Or would you rather have the guard in DisplayLink::platformInitialize() in DisplayLinkGLib.cpp, so GTK's DRM monitor is covered too?
Shubham Kapoor
Comment 2 2026-10-28 10:32:05 PDT
Note You need to log in before you can comment on or make changes to this bug.