This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: AM5728 dispaly subsystem ARGB format transparency parameter problem

Part Number: AM5728

1. Background of the problem:

    am5728+lt8718+ Display (MIPI DPI)

    linux version: 4.9.69

    The current three primary colors, red, green, blue test display color is correct.

    The application uses the QT UI to call the system interface, setting the color is added to the transparency parameter, the color of the display does not match the actual color.

2. Problem Description:

    A linux driver change has been made, but it is still not correct. Ask, ARGB transparency parameter driver how to modify?

3. Modify the driver test:

3.1. The drivers/vedio/fbdev omap2 omapfb/omapfb - main.c file fb_mode_to_dss_mode () function

    case 32:

    dssmode = OMAP_DSS_COLOR_RGB24U;

    break;

Changed to:

    case 32:

    dssmode = OMAP_DSS_COLOR_ARGB32;

    break;

3.2 the drivers/vedio/fbdev/omap2/omapfb/omapfb-main.c file _setcolreg()function

case OMAPFB_COLOR_RGB24U:

      if (r != 0)

        break;

    printk("%s regno:%d\n", __func__, regno);

    if (regno < 16) {

        u32 pal;

        pal = ((red >> (16 - var->red.length)) <<

                var->red.offset) |

            ((green >> (16 - var->green.length)) <<

             var->green.offset) |

            (blue >> (16 - var->blue.length));

        ((u32 *)(fbi->pseudo_palette))[regno] = pal;

    }

    break;

Changed to:

case OMAPFB_COLOR_RGB24U:

case OMAPFB_COLOR_ARGB32:

    if (r != 0)

        break;

    printk("%s regno:%d\n", __func__, regno);

    if (regno < 16) {

        u32 pal;

        pal = ((transp >> (16 - var->transp.length)) <<

                var->transp.offset) |

            ((red >> (16 - var->red.length)) <<

                var->red.offset) |

            ((green >> (16 - var->green.length)) <<

             var->green.offset) |

            (blue >> (16 - var->blue.length));

        ((u32 *)(fbi->pseudo_palette))[regno] = pal;

    }

    break;