How exactly are DRM modes (or modelines) interpreted when interlaced?

44 views Asked by At

I'm interested in representing SDTV modes (including some obsolete ones) as DRM modes, as faithfully as possible (within the limitations of DRM modes which obviously can't describe equalizing pulses, colour bursts etc).

Is there a definitive interpretation of vertical timings in DRM modes (or, assuming they're equivalent, XFree86-style mode-lines) when the interlaced flag is set?

One obvious interpretation is to measure all vertical timings in half-lines-per-field. But the numbers don't add up, because framebuffers are rectangular, whereas interlaced displays can start or end half way through a line. For example in the 625i50 standard, the number of lines in the framebuffer is 576, but for timing purposes the number of half-lines-per-field ought to be 575 (575 580 585 625).

My proposed workaround is to have the driver subtract 1 from all of VDISPLAY, VSYNC_START, VSYNC_END and then treat all vertical timings as half-lines per field (assuming both fields have a partial line).

So "576 581 586 625" would get interpreted as having 287.5 visible lines, 2.5 lines front porch (pre-equalization), 2.5 lines sync (broad pulses) and 20 lines back porch (including an inferred 2.5 lines of post-equalization and 17.5 blank lines).

I think this is workable, but can the same rule of thumb apply to other TV standards? Is there a better or more widely-recognized convention for describing interlaced modes?

0

There are 0 answers