• Dario Binacchi's avatar
    fbdev: imxfb: fix left margin setting · 57588441
    Dario Binacchi authored
    The previous setting did not take into account the CSTN mode.
    For the H_WAIT_2 bitfield (bits 0-7) of the LCDC Horizontal Configuration
    Register (LCDCR), the IMX25RM manual states that:
    
    In TFT mode, it specifies the number of SCLK periods between the end of
    HSYNC and the beginning of OE signal, and the total delay time equals
    (H_WAIT_2 + 3) of SCLK periods.
    In CSTN mode, it specifies the number of SCLK periods between the end of
    HSYNC and the first display data in each line, and the total delay time
    equals (H_WAIT_2 + 2) of SCLK periods.
    
    The patch handles both cases.
    
    Fixes: 4e47382f ("fbdev: imxfb: warn about invalid left/right margin")
    Fixes: 7e8549bc ("imxfb: Fix margin settings")
    Signed-off-by: default avatarDario Binacchi <dario.binacchi@amarulasolutions.com>
    Signed-off-by: default avatarHelge Deller <deller@gmx.de>
    57588441
imxfb.c 25.4 KB