Mapping LCD/TFT display timings to Linux Kernel data structures

Most LCD/TFT display datasheets provide the following timing information:

  • Horizontal Back Porch (HBP): Number of pixel clk pulses between HSYNC signal and the first valid pixel data.
  • Horizontal Front Porch (HFP): Number of pixel clk pulses between the last valid pixel data in the line and the next hsync pulse.
  • Vertical Back Porch (VBP): Number of lines (HSYNC pulses) from a VSYNC signal to the first valid line.
  • Vertical Front Porch (VFP): Number of lines (HSYNC pulses) between the last valid line of the frame and the next VSYNC pulse.
  • VSYNC pulse width: Number of HSYNC pulses when a VSYNC signal is active.
  • HSYNC pulse width: Number of pixel clk pulses when a HSYNC signal is active.
  • Active frame width: Horizontal resolution.
  • Active frame height: Vertical resolution.
  • Screen width: Active frame width + HBP + HFP
  • Screen height: Active frame height + VBP + VFP
  • VSYNC polarity: Value of VSYNC to indicate the start of a new frame (active LOW or HIGH)
  • HSYNC polarity: Value of HSYNC to indicate the start of a new line (active LOW or HIGH)

Some datasheets provide horizontal and vertical blanking period instead: