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.

DRA746: Unable display image on screen

Part Number: DRA746

I am using A15 to run QNX. When trying to run sample screen application display_image to display my image on screen --> [ /usr/bin/display_image -file=/usr/images/default.jpg -display=1 -pos=0,0],

i get below error

img_load_file() failed: img_errno: 8

  • Hi Sanil,

    The display_image binary, is dependent on the QNX screen package running.   The display number being specified in the command line options must match the graphics.conf that is in use by the screen process.  The filename being specified must present in the filesystem

    Please check the following:

    1) Is screen running 

    "pidin ar"

    2) Is display 1 defined in graphics.conf?

    3) Is the file /usr/bin/display_image present in the filesystem?

    4) Type "sloginfo" to see if any other logs were generated.

    Regards,

    kb

  • Yes, screen is running, display 1 is defined in graphics.conf and display_image is present in file system.

    As per the img_errno.h, the number 8 in the error [img_load_file() failed: img_errno: 8] refers to a DLL issue

    #define IMG_ERR_DLL 8 /* error accessing dll or entrypoint */

    Initially, I was getting error [img_lib_attach() failed: img_errno: 7] where 7 means missing config file which got solved on adding img.conf file in /etc/system/config on target

    #define IMG_ERR_CFG 7 /* bad or missing config file */

    img.conf file loads the codecs mentioned in the configuration file, in my case the codec library img_codec_jpg.so which I have present in /proc/boot directory on target

    I believe may be this error is thrown as the codec is not loaded successfully ?

  • Checked sloginfo, getting below error on running [/usr/bin/display_image -file=/usr/images/default.jpg -display=1] on terminal(target)

    screen: display_perm: unauthorized display request from pid 147478

  • We want to use GFX pipeline over HDMI output. Attaching the graphics.conf.  Kindly verify if the configuration is fine.

    graphics.conf file contents:

    begin khronos

    begin egl display 1
    egl-dlls = [IMG%s] libusc.so libsrv_um.so libpvr2d.so libIMGegl.so
    glesv1-dlls = libusc.so libsrv_um.so libIMGegl.so libImgGLESv1_CM.so
    glesv2-dlls = libusc.so libsrv_um.so libusc.so libIMGegl.so libImgGLESv2.so
    gpu-dlls = libsrv_um.so libpvr2d.so pvrsrv.so
    gpu-string = SGX540rev120
    aperture = 200
    end egl display

    begin wfd device 1
    wfd-dlls = libwfdcfg-generic.so libWFDjacinto6.so

    # Pipeline/display binding
    # 1 = hdmi (supported on omap4-5 and J6)
    # 2 = lcd1 (supported on omap5 and J6)
    # 3 = lcd2 (supported on omap4)
    # 4 = lcd3 (supported on J6)
    gfx = 1
    video1 = 2
    video2 = 2
    video3 = 2

    end wfd device

    end khronos

    begin winmgr

    begin globals
    blit-config = pvr2d
    blits-logsize = 4096
    input-logsize = 8192
    requests-logsize = 65536
    end globals


    begin display 1
    formats = rgba8888 rgbx8888 nv12
    video-mode = 1280 x 720 @ 60
    background = 0x00000000
    end display

    begin class framebuffer
    display = 1
    pipeline = 4
    format = rgba8888
    usage = pvr2d
    end class

    begin display 2
    formats = rgba8888 rgbx8888 nv12
    video-mode = 800 x 480 @ 60

    end display

    begin class framebuffer
    display = 2
    pipeline = 2
    format = rgba8888
    usage = pvr2d
    end class

    end winmgr

  • Hi Sanil,

    In general the graphics.conf looks fine.  QNX is a better contact for a formal review.

    The "background" option under display 1, is not something TI has tested on DRA7xx.

    Regards,

    kb

  • Hi,

    We are now able to get any image format (jpeg,png,bmp) on the display, however there is some colour inversion happening on display ( black shown and white, white as black, blue as yellow and so on ).

    Also, when we tried running the gles2-gears sample application, the gears seem to be rotating on a yellow background. Not sure if the colour inversion is happening in this case. 

    Is there any parameter in graphics.conf that can be modified/added to resolve this ?

  • By colour inversion, i meant pixel bits are getting inverted

    eg. If red colour is 11111100, it is getting inverted to 00000011

    Kindly let us know how we can solve this issue.

  • Hi Sanil,

    To see the bit inversion, is a frame being read from memory/file?

    If so is the frame being read on the J6 side before being posted to display, or is being read on the display side?

    Or is the inversion being inferred from what is seen on the display?

    Thanks,

    kb

  • Yes, the inversion is inferred from what is see on display. 

    I have these 2 image files -- mfg-patternpng and mfg-pattern-inv

    When we run display_img application --> display_img -file=/usr/images/mfg-patternpng -display=1 we get on display the mfg-pattern-inv image( i.e. inverted mfg-patternpng image ) and vise versa

  • Hi Sanil,

    It could be that the pixel clock settings between the display and J6 are not matching.

    On the J6 side, the DSS module has a DISPC_POL_REQx register in which the IPC bitfield can be set to configure rising edge versus falling edge.  This setting can be compared against the display specifications.  Please see TRM for further details.  

    The QNX screen APIs likely have an option for this field, or the bitfield can be modified on a direct register access.   As per TRM description the CTRL_CORE_SMA_SW_1[19]DSS_CH0_IPC must be set to match.

    Regards,

    kb