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.

DRA750: How to configure TFT panel as external display for Dual Display Solution (6AM1.3 SDK)

Part Number: DRA750
Other Parts Discussed in Thread: SYSCONFIG

Hi ,

This is customer board for dual display . HDMI is designed as primary display,and TFT panel as external display . 

After configured as follow ,HDMI display normally ,but TFT panel just stop at the logo display .

1. DTS configuration :

    aliases {
                display0 = &hdmi0;
                display1 = &lcd;
        };

2. Property :

    adb shell echo "ro.hwc.primary.conn=HDMI" >> /system/build.prop
    adb shell echo "ro.hwc.external.conn=DisplayPort" >> /system/build.prop

    I don't know  how to configure "ro.hwc.external.conn" for TFT panel (RGB),just use "DisplayPort" instead .

    When I didn't set these properties , both display normally ,but TFT panel is set as primary display .

  

  • Hi Baker,

    I have forwarded your question to Android experts for comment.

    Regards,
    Yordan
  • Hi ,

    The logcat show as follow :

    01-01 00:00:18.992 164 234 E ti_hwc : No connector for DISPLAY 1

    01-01 00:00:18.992 164 234 W ti_hwc : Failed to remove non-existent display 1

    The project is urgently ,hope you feed back soon ,thanks .

    //Baker
  • Hi Baker,

    >2. Property :

    > adb shell echo "ro.hwc.primary.conn=HDMI" >> /system/build.prop
    > adb shell echo "ro.hwc.external.conn=DisplayPort" >> /system/build.prop

    > I don't know how to configure "ro.hwc.external.conn" for TFT panel (RGB),just use "DisplayPort" instead .

    The EVM's typically populate the primary panel as Unknown. Can you try passing `Unknown` to external property setting. You don't need to change any dts entries.

    Thanks,
    Gowtham
  • Hi Gowtham
    I tried as you commented on J6 EVM with OSD panel ,got the same result .
    Properties set as follow :
    root@jacinto6evm:/ # getprop | grep conn
    getprop | grep conn
    [ro.hwc.external.conn]: [Unknown]
    [ro.hwc.primary.conn]: [HDMI]

    With "dumpsys SurfaceFlinger" ,I found that OSD panel size is not correct . It should be 1920x1080 ,rather than 1024x 768 .

    Displays (2 entries)
    + DisplayDevice: HDMI Screen
    type=1, hwcId=1, layerStack=0, (1280x 720),

    ANativeWindow=0xb66ba508, orient= 0 (type=00000005), flips=133, isSecure=1, secureVis=0, powerMode=2, activeConfig=0, numLayers=4
    v:[0,0,1024,768], f:[160,0,1120,720], s:[160,0,1120,720],transform:[[0.938,0.000,160.000][0.000,0.938,0.000][0.000,0.000,1.000]]
    mAbandoned=0
    -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1280x720], default-format=1, transform-hint=00, FIFO(0)={}
    >[00:0xb66ac460] state=ACQUIRED, 0xb6b12480 [1280x 720:1280, 1]
    [01:0xb44823c0] state=FREE , 0xb6b123e0 [1280x 720:1280, 1]


    + DisplayDevice: Built-in Screen
    type=0, hwcId=0, layerStack=0, (1024x 768),


    ANativeWindow=0xb66b9708, orient= 0 (type=00000000), flips=167, isSecure=1, secureVis=0, powerMode=2, activeConfig=0, numLayers=4
    v:[0,0,1024,768], f:[0,0,1024,768], s:[0,0,1024,768],transform:[[1.000,0.000,-0.000][0.000,1.000,-0.000][0.000,0.000,1.000]]
    mAbandoned=0
    -BufferQueue mMaxAcquiredBufferCount=1, mDequeueBufferCannotBlock=0, default-size=[1024x768], default-format=1, transform-hint=00, FIFO(0)={}
    >[00:0xb66ac3c0] state=ACQUIRED, 0xb6b10900 [1024x 768:1024, 1]
    [01:0xb4482c80] state=FREE , 0xb46186e0 [1024x 768:1024, 1]
  • Hi Gowthan ,

    The logcat show as follow :

    01-01 00:00:10.782 173 173 D SurfaceFlinger: Set power mode=2, type=1 flinger=0xb6b24000
    01-01 00:00:10.782 478 497 I DisplayManagerService: Display device changed state: "Built-in Screen", ON
    01-01 00:00:10.782 478 497 I DisplayManagerService: Display device changed state: "HDMI Screen", ON
    01-01 00:00:10.815 478 478 W SystemConfig: No directory /system/etc/sysconfig, skipping
    01-01 00:00:10.876 478 478 D SELinuxMMAC: Using policy file /system/etc/security/mac_permissions.xml
    01-01 00:00:10.881 173 173 D SurfaceFlinger: shader cache generated - 24 shaders in 73.788040 ms
    01-01 00:00:10.884 173 173 I ti_hwc : Setting up plane 37 and connecting connector 36 to crtc 38
    01-01 00:00:10.884 173 173 E ti_hwc : failed to set crtc (38) to connector (36)
    01-01 00:00:10.884 173 173 E ti_hwc : Failed to update display 1
    01-01 00:00:10.903 173 173 I ti_hwc : Setting up plane 37 and connecting connector 36 to crtc 38
    01-01 00:00:10.903 173 173 E ti_hwc : failed to set crtc (38) to connector (36)
    01-01 00:00:10.903 173 173 E ti_hwc : Failed to update display 1
    01-01 00:00:10.928 173 173 I ti_hwc : Setting up plane 37 and connecting connector 36 to crtc 38
    01-01 00:00:10.928 173 173 E ti_hwc : failed to set crtc (38) to connector (36)
    01-01 00:00:10.928 173 173 E ti_hwc : Failed to update display 1
    01-01 00:00:10.967 478 478 E art : DexFile_getDexOptNeeded file '/system/framework/org.apache.http.legacy.jar' does not exist
    01-01 00:00:10.967 478 478 W PackageManager: Library not found: /system/framework/org.apache.http.legacy.jar
    01-01 00:00:10.978 189 189 I ServiceManager: Waiting for service media.camera.proxy...
    01-01 00:00:11.012 173 173 I ti_hwc : Setting up plane 37 and connecting connector 36 to crtc 38
    01-01 00:00:11.012 173 173 E ti_hwc : failed to set crtc (38) to connector (36)
    01-01 00:00:11.012 173 173 E ti_hwc : Failed to update display 1
    01-01 00:00:11.027 478 478 D PackageManager: No files in app dir /vendor/overlay
    01-01 00:00:11.095 173 173 I ti_hwc : Setting up plane 37 and connecting connector 36 to crtc 38
    01-01 00:00:11.095 173 173 E ti_hwc : failed to set crtc (38) to connector (36)
    01-01 00:00:11.095 173 173 E ti_hwc : Failed to update display 1


    //Baker
  • Hi All ,

    Any feed back ??
  • Hi Baker,

    Could you paste the log from the output of `modetest` command as well.

    With the earlier experiment, were you able to see UI on any of the displays?

    Thanks,

    Gowtham

  • Hi Baker,

    The issue is related to wrong mode being selected for external display in this case. Can you try the below patch on hwcomposer, you would need to rebuild the hardware composer in hardware ti dra7x project.

    Thanks,

    Gowtham

    diff --git a/hwcomposer/display.c b/hwcomposer/display.c
    index de1aa25..d390db4 100644
    --- a/hwcomposer/display.c
    +++ b/hwcomposer/display.c
    @@ -1386,12 +1386,14 @@ int add_external_hdmi_display(omap_hwc_device_t *hwc_dev)
    ·
    //Change the mode to PREFERRED_HDMI_RESOLUTION
    mode = &connector->modes[0];
    +#if 0
    » for (j = 0; j < connector->count_modes; j++) {
    » » mode = &connector->modes[j];
    » » if (!strcmp(mode->name, PREFERRED_HDMI_RESOLUTION)) {
    break;
    » » }
    }
    +#endif
    ·
    display->disp_link.mode = mode;
    display->disp_link.evctx.version = DRM_EVENT_CONTEXT_VERSION;
    @@ -1428,8 +1430,8 @@ int add_external_hdmi_display(omap_hwc_device_t *hwc_dev)
    display->update_transform = true;
    ·
    //IMG_framebuffer_device_public_t *fb_dev = hwc_dev->fb_dev[HWC_DISPLAY_EXTERNAL];
    - uint32_t xres = HDMI_FB_WIDTH;
    - uint32_t yres = HDMI_FB_HEIGHT;
    + uint32_t xres = mode->hdisplay;
    + uint32_t yres = mode->vdisplay;

  • Hi Gowtham ,

    SurfaceFlinger service crashed after tried the above patch on EVM board .
    Now the SDK dosen't support to set HDMI as primary display ,TFT as external display .
    Hope you can release the patch that works OK on the EVM .


    01-01 00:00:32.032 450 450 W dex2oat : Method processed more than once: java.lang.String java.lang.AbstractStringBuilder.substring(int)
    01-01 00:00:32.240 979 992 E SurfaceControl: invalid handle (0x0) or client (0xb6406060)
    01-01 00:00:32.240 1111 1111 I SurfaceFlinger: SurfaceFlinger is starting
    01-01 00:00:32.246 979 991 W SurfaceComposerClient: ComposerService remote (surfaceflinger) died [0xb64090c0]
    01-01 00:00:32.246 979 991 D BootAnimation: SurfaceFlinger died, exiting...
    01-01 00:00:32.246 169 169 I ServiceManager: service 'SurfaceFlinger' died
    01-01 00:00:32.254 169 169 I ServiceManager: service 'media.audio_flinger' died
    01-01 00:00:32.254 169 169 I ServiceManager: service 'media.player' died
    01-01 00:00:32.254 169 169 I ServiceManager: service 'media.resource_manager' died
    01-01 00:00:32.254 1111 1111 I SurfaceFlinger: SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
    01-01 00:00:32.256 1111 1111 D libEGL : loaded /vendor/lib/egl/libEGL_POWERVR_SGX544_116.so
    01-01 00:00:32.264 1111 1111 D libEGL : loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX544_116.so
    01-01 00:00:32.281 1111 1111 D libEGL : loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX544_116.so
    01-01 00:00:32.315 1111 1111 I ti_hwc : Open omapdrm drm device (20)
    01-01 00:00:32.319 1113 1113 I Netd : Netd 1.0 starting
    01-01 00:00:32.319 1113 1113 D TetherController: Setting IP forward enable = 0
    01-01 00:00:32.371 450 450 W dex2oat : Method processed more than once: void java.util.Properties.load(java.io.Reader)
    01-01 00:00:32.576 1111 1111 I ti_hwc : Set drm fd (20) to gralloc
    01-01 00:00:32.576 1111 1111 I ti_hwc : Number of available overlays: 2
    01-01 00:00:32.576 1111 1111 I ti_hwc : Display 0 - Overlay 0: plane_id: 33 crtc_id: 34
    01-01 00:00:32.577 1111 1111 D ti_hwc : Transforming FB (1280x720) => (1280x720) rot0
    01-01 00:00:32.577 1111 1111 E ti_hwc : plane id: 33
    01-01 00:00:32.577 1111 1111 I ti_hwc : Expecting h/w vsync for jacinto6evm
    01-01 00:00:32.577 1111 1111 I ti_hwc : Initializing hw vsync thread
    01-01 00:00:32.577 1111 1111 I ti_hwc : clone region is set to (0,0) to (1280,720)
    01-01 00:00:32.577 1111 1111 I ti_hwc : open_device(rgb_order=1 nv12_only=0)
    01-01 00:00:32.577 1111 1111 I ti_hwc : loading blitter module
    01-01 00:00:32.577 1111 1111 E ti_hwc : blitter module not found
    01-01 00:00:32.577 1111 1111 I SurfaceFlinger: Using composer version 1.1
    01-01 00:00:32.577 1111 1111 I SurfaceFlinger: EGL information:

    // Baker
  • Hi Baker,

    > Now the SDK dosen't support to set HDMI as primary display ,TFT as external display .
    Did you mean that after updating hardware composer library, you dont see UI on either of the display?

    What is the resolution of your HDMI display? Could you attach logs of logcat after the reboot and dumpsys SurfaceFlinger.

    Thanks,
    Gowtham
  • Hi Gowtham:

        

               Yes ,after modifying the following code in display.c both display stopped at "android" logo display ,no UI  .

    From the "logcat " , SurfaceFlinger service start failed .The resolution of  HDMI is 1920X1080. Pls refer the attachment  for detail .

    ////////////////////////////////////////////// modifying parts  /////////////////////////////////////////////

    display.c   

        #if 0
        for (j = 0; j < connector->count_modes; j++) {
            mode = &connector->modes[j];
            if (!strcmp(mode->name, PREFERRED_HDMI_RESOLUTION)) {
                break;
            }
        }
        #endif

        #if 1
        uint32_t xres = mode->hdisplay;
        uint32_t yres = mode->vdisplay;    
        #else
        uint32_t xres = HDMI_FB_WIDTH;
        uint32_t yres = HDMI_FB_HEIGHT;
        #endif

    //////////////////////////////////////////////////////modifying end////////////////////////////////////////////////////////////////////

    logcat:

    .....................................................................................................................................

    01-01 00:00:18.521   161   161 I ServiceManager: service 'SurfaceFlinger' died

    01-01 00:00:18.521   210   243 E SurfaceControl: invalid handle (0x0) or client (0xb6486060)

    01-01 00:00:18.529   210   210 W SurfaceComposerClient: ComposerService remote (surfaceflinger) died [0xb64890c0]

    01-01 00:00:18.529   210   210 D BootAnimation: SurfaceFlinger died, exiting...

    01-01 00:00:18.530   161   161 I ServiceManager: service 'media.audio_flinger' died

    01-01 00:00:18.530   161   161 I ServiceManager: service 'media.player' died

    01-01 00:00:18.530   161   161 I ServiceManager: service 'media.resource_manager' died

    01-01 00:00:20.591   335   335 I Netd    : Netd 1.0 starting

    01-01 00:00:20.591   335   335 D TetherController: Setting IP forward enable = 0

    Thanks .

    //Baker

    Log_AfterPatch.rar

  • Hi Gowtham:

      

           This is the  log that display.c hasn't been modified ; HDMI UI display normal, But the external display  update failed and create fb failed  , Pls refer to it!

    //////////////////////////////////////////////////////////////////////////    logcat  //////////////////////////////////////////////////////////////////////////////////////////////

    01-01 00:00:17.876   162   162 D SurfaceFlinger: shader cache generated - 24 shaders in 192.394165 ms

    01-01 00:00:17.914   162   162 I ti_hwc  : Setting up plane 33 and connecting connector 32 to crtc 34

    01-01 00:00:17.932   162   162 I ti_hwc  : Setting up plane 37 and connecting connector 36 to crtc 38

    01-01 00:00:17.932   162   162 E ti_hwc  : Failed to create fb

    01-01 00:00:17.932   162   162 E ti_hwc  : Failed to update display 1

    ///////////////////////////////////////////////////////////////////////    logcat  end  //////////////////////////////////////////////////////////////////////////////////////////

        

    Log_beforePatch.rar

    Thanks .

    //Baker

  • Hi Baker,

    The logs indicate the likely cause of error is the below line

    ```
    uint32_t xres = mode->hdisplay;
    ```

    and it might be that the highlighted line got missed while applying the changes.

    ```
    **mode = &connector->modes[0];** -- this might have got missed
    +#if 0
    » for (j = 0; j < connector->count_modes; j++) {
    » » mode = &connector->modes[j];
    » » if (!strcmp(mode->name, PREFERRED_HDMI_RESOLUTION)) {
    break;
    » » }
    }
    ```

    Thanks,
    Gowtham

  • Hi Gowtham:

           As your remind , We added this part in display.c (mode = &connector->modes[j] ; )  .

      HDMI UI display normal , SurfaceFlinger  configuration seems right ,  But the external display failed to create framebuffer and failed to update display as 

      before .

      Pls refer the attachment  for detail !

    ///////////////////////////////////////////////////////////logcat start ////////////////////////////////////////////////////////////////////////////////////////

    01-01 00:00:18.693   162   162 I ti_hwc  : Setting up plane 37 and connecting connector 36 to crtc 38

    01-01 00:00:18.693   162   162 E ti_hwc  : Failed to create fb

    01-01 00:00:18.693   162   162 E ti_hwc  : Failed to update display 1

    ..................................................................................................................................................................................

    ///////////////////////////////////////////////////////////logcat end ////////////////////////////////////////////////////////////////////////////

    ///////////////////////////////////////////////////////////SurfaceFliger start ///////////////////////////////////////////////////////////

      Display[0] configurations (* current):
        * 0: 1920x1080, xdpi=150.000000, ydpi=150.000000, refresh=16666666, colorTransform=0
      numHwLayers=5, flags=00000000
        type   |  handle  | hint | flag | tr | blnd |   format    |     source crop (l,t,r,b)      |          frame         | name
    -----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------
          GLES | b4448310 | 0000 | 0000 | 00 | 0100 | RGBA_8888   |      0,      0,   1920,   1080 |    0,    0, 1920, 1080 | com.android.systemui.ImageWallpaper
          GLES | b67a85a0 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |      0,      0,   1920,   1080 |    0,    0, 1920, 1080 | com.android.launcher3/com.android.launcher3.Launcher
          GLES | b44475a0 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |      0,      0,   1920,     24 |    0,    0, 1920,   24 | StatusBar
          GLES | b44480e0 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |      0,      0,   1920,     48 |    0, 1032, 1920, 1080 | NavigationBar
     FB TARGET | b6ad0950 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |      0,      0,   1920,   1080 |    0,    0, 1920, 1080 | HWC_FRAMEBUFFER_TARGET
      Display[1] configurations (* current):
        * 0: 1024x768, xdpi=75.000000, ydpi=75.000000, refresh=16666666, colorTransform=0
      numHwLayers=5, flags=00000000
        type   |  handle  | hint | flag | tr | blnd |   format    |     source crop (l,t,r,b)      |          frame         | name
    -----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------
          GLES | b4448310 | 0000 | 0000 | 00 | 0100 | RGBA_8888   |      0,      0,   1920,   1080 |    0,   96, 1024,  672 | com.android.systemui.ImageWallpaper
          GLES | b67a85a0 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |      0,      0,   1920,   1080 |    0,   96, 1024,  672 | com.android.launcher3/com.android.launcher3.Launcher
          GLES | b44475a0 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |      0,      0,   1920,     24 |    0,   96, 1024,  109 | StatusBar
          GLES | b44480e0 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |      0,      0,   1920,     48 |    0,  646, 1024,  672 | NavigationBar
     FB TARGET | b6ad3a60 | 0000 | 0000 | 00 | 0105 | RGBA_8888   |      0,      0,   1024,    768 |    0,    0, 1024,  768 | HWC_FRAMEBUFFER_TARGET

    ///////////////////////////////////////////////////////////SurfaceFliger end /////////////////////////////////////////////////////////////

    Log_Patch_17110301.rar

    BEST REGARDS !

    //Baker

  • Hi Baker,

    > We added this part in display.c (mode = &connector->modes[j] ; ) .

    Want to make if there is a typo there. The change should be `mode = &connector->modes[0];` and not `mode = &connector->modes[j]`.

    Thanks,
    Gowtham
  • Hi Gowtham:

        Sorry ,  there is an error in the last reply (mode = &connector->modes[j] ) ,.We confirm the code in display.c , The change is done in this way ( mode = &connector->modes[0] ) .

         Can you assist us to analyze the following log,Thanks!

    ///////////////////////////////////////////////////////////logcat start ////////////////////////////////////////////////////////////////////////////////////////

    01-01 00:00:18.693   162   162 I ti_hwc  : Setting up plane 37 and connecting connector 36 to crtc 38

    01-01 00:00:18.693   162   162 E ti_hwc  : Failed to create fb

    01-01 00:00:18.693   162   162 E ti_hwc  : Failed to update display 1

    ..................................................................................................................................................................................

    ///////////////////////////////////////////////////////////logcat end ////////////////////////////////////////////////////////////////////////////

     

    // Baker

  • Hi Baker,

    As per you latest log, the issue is that second display is configured for 1024x768 resolution where it should have been 1920x1080.

    If you do have `mode=&connector->modes[0]` change, can you check what width and height are you reading from the mode. mode-hdisplay and mode->vdisplay would correspond to width and height.

    ```
    Display[1] configurations (* current):
    * 0: 1024x768, xdpi=75.000000, ydpi=75.000000, refresh=16666666, colorTransform=0
    numHwLayers=5, flags=00000000
    type | handle | hint | flag | tr | blnd | format | source crop (l,t,r,b) | frame | name
    -----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------
    GLES | b4448310 | 0000 | 0000 | 00 | 0100 | RGBA_8888 | 0, 0, 1920, 1080 | 0, 96, 1024, 672 | com.android.systemui.ImageWallpaper
    GLES | b67a85a0 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0, 0, 1920, 1080 | 0, 96, 1024, 672 | com.android.launcher3/com.android.launcher3.Launcher
    GLES | b44475a0 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0, 0, 1920, 24 | 0, 96, 1024, 109 | StatusBar
    GLES | b44480e0 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0, 0, 1920, 48 | 0, 646, 1024, 672 | NavigationBar
    FB TARGET | b6ad3a60 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0, 0, 1024, 768 | 0, 0, 1024, 768 | HWC_FRAMEBUFFER_TARGET
    ```

    Thanks,
    Gowtham
  • Hi Gowtham:

    I'm Watson,I'm Baker's colleague ,I'll follow up this question later

    According to your guidance ,The HDMI UI and the external display display normal ,Thank you for your help !

    Another question need to be solved , In the logcat , kernel Failed to create fb and Failed to update display 1

    We don't find a good way to solve it. Can you give us some guidances?


    Pls refer to the follow logcat:

    01-01 00:00:18.382 162 162 I ti_hwc : Setting up plane 37 and connecting connector 36 to crtc 38

    01-01 00:00:18.382 162 162 E ti_hwc : Failed to create fb

    01-01 00:00:18.382 162 162 E ti_hwc : Failed to update display 1


    Thanks,
    Watson
  • Hi Watson,

    You mention "The HDMI UI and the external display normal", does it mean that you have UI running fine on both the displays now?

    If so, are you still seeing the below errors.

    If there is no content on external display, did you try checking on what width and height values are being reported by the external connector mode.

    Thanks,
    Gowtham