• Guoqing Li's avatar
    video: mmp: rb swap setting update for mmp display · 9a27d591
    Guoqing Li authored
    We could set rb swap in two modules: DMA controler input part and
    dsi interface output part.
    DMA input part is based on pix_fmt to set rbswap, dsi output interface
    part will set rbswap based on platform dsi_rbswap configuration.
    
    This patch include below change and enhancement:
    
    1) The input format which support rbswap is based on RGB format,
    eg. RGB565 indicates the source data in memory is that Red is [15~11],
    Green is [10~5], Blue is [4:0], Red is MSB, Blue is LSB, but for the
    display dma input default setting(rbswap = 0), it only support Blue
    is [15~11], Green is [10~5], Red is [4:0], Red is LSB, Blue is MSB,
    so for this format(RGB565), display controller need to set rbswap
     = 1 and it can support the MSB/LSB correctly.
    BGR/YUV format will not set it in mmp display driver.
    
    2) The dsi output part of rbswap is depend on dsi_rbswap which is
    defined in specific platfrom. For output dsi interface, it has this
    feature to do rbswap again if it needs specifc byte sequence of RGB
    byte for DSI panel.
    eg. If display content is set RGB565 in memory and DMA input part set
    rbswap in driver to support Red as MSB , Blue LSB, but dsi panel only
    support Red as LSB, Blue as MSB, then it can use this feature.
    If there is no this requirement of panel, this dsi output part is not
    needed.
    Signed-off-by: default avatarGuoqing Li <ligq@marvell.com>
    Signed-off-by: default avatarJett.Zhou <jtzhou@marvell.com>
    Signed-off-by: default avatarZhou Zhu <zzhu3@marvell.com>
    Reviewed-by: default avatarDaniel Drake <dsd@laptop.org>
    Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
    9a27d591
mmp_ctrl.h 52.7 KB