On Tue, Jul 04, 2017 at 11:00:51AM -0400, Trevor Childs wrote: > I've run into a problem setting display modes. I'm attempting to output > 3840x2160 @ 60Hz to a hardware recorder but the standard modes for 60Hz > and 59.94Hz actually come out to 60.02Hz and 59.98Hz. EDID data has > 1080p@60 as it's preferred mode, and scaling the numbers up leads to the > same rounding error (60.02Hz) as the predefined modes have. > Here's the modeline that has the incorrect refresh rate: > "3840x2160" 594.18 3840 4016 4104 4400 2160 2168 2178 2250 > Here's how it's defined in kernel_source/drivers/video/modedb.c:
And what is the hardware you are trying to setup? How pixel clock is defined there? With ~300 kHz steps? What modelines got you 60.02 and 59.98 Hz? Btw, if they are really close to 60.02 and 59.98, than one step down should be around 59.94. > {.refresh = 60, .xres = 3840, .yres = 2160, .pixclock = 1683, > .left_margin = 296, .right_margin = 176, > .upper_margin = 72, .lower_margin = 8, > .hsync_len = 88, .vsync_len = 10, > .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, > .flag = FB_FLAG_RATIO_16_9, > .vmode = FB_VMODE_NONINTERLACED}, > The recorders are expecting SMPTE standard inputs, and reject the current > ones. I can use either 3840x2160 or 4096x2160, and the refresh rate can be > either 60Hz or 59.94Hz. > I have tested the other modes available, and 1080p works fine at 60Hz. > Both 4K modes work at 30Hz. It's when trying to set 4K @ 60Hz that the > granularity of the pixclock ends up being a problem (it would need to be > 1683.5 for the math to work out the same as the other modes). > I attempted using cvt, cvt12, and gtf to generate modelines, but none of > them work either. I also used the source code from those programs to > attempt a brute-force method by generating as many modelines as I could > that end up within 0.0001% of the correct refresh rates (same accuracy as > the EDID's 1080p@60 mode, which is actually 60.00006Hz). That generated > 1520 possibilities that followed the math rules for modelines, but none of This suggests that it could be not the uneven refresh rate problem. It would be a bit strange to create recorder that can synchronize to 60 and 59.94, but cannot on other +-0.5% errors. _______________________________________________ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: https://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s