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: AM5728 dispaly subsystem ARGB格式透明度参数问题

Part Number: AM5728

1.问题背景:

     am5728+lt8718+显示屏(MIPI DPI)

     linux版本:4.9.69

     当前三基色,红、绿、蓝测试显示屏颜色正确。

     应用程序使用QT UI调用系统接口,设置颜色是添加了透明度参数,显示屏的颜色与实际的颜色不匹配。

2.问题描述:

      当前做了一下linux驱动修改,但是还是不正确。请教,ARGB透明度参数驱动中怎么修改?

3.修改驱动测试:

1.将drivers/vedio/fbdev/omap2/omapfb/omapfb-main.c中的 fb_mode_to_dss_mode()函数

case 32:

dssmode = OMAP_DSS_COLOR_RGB24U;

break;

改为:

case 32:

dssmode = OMAP_DSS_COLOR_ARGB32;

break;

2.将drivers/vedio/fbdev/omap2/omapfb/omapfb-main.c中的 _setcolreg()函数

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;

改为:

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;

  • Hello.

    Please mention your query in English,

    Regards

    Tarun Mukesh

  • 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;

  • Hello Wang,

    Can you please re submit this as a new question with the English entry? 

    The question has to be in English for this forum, as of now your question is not and the findability is different for questions vs. answers.

    Thank you.

    Best,

    Josue