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.

Linux/DRA746: black screen issue with splashscreen usecase

Part Number: DRA746

Tool/software: Linux

Dear Team,

We use custom h/w and software based on DRA746 and SDK 3.02.00.03. We have a requirement of smooth splashscreen (means without any flicker/blackscreen/blank). Currently we have
implemented it with linux logo on console feature. It is getting displayed and remains almost for 3 seconds and then we see the black screen for some seconds (not sure what causes this) and then we see the GUI.

We would like to remove this blackscreen/blank and transition from the splash screen to the full system UI. UI is based on wayland/weston and qt/qtwayland.

Could you please guide, how can we achieve this? What can cause this black screen and how to avoid this? I think it is coming due to weston start or some drm/dss initialization.

While googling I came across aplication note "Early Splash Screen on DRA7x Devices" [1]. Is this also tested with wayland/weston and qt/qtwaylannd based UI? Is there a video availabe of this demo?

However this uses u-boot and splash screen is displayed by it. while in our case we do not use u-boot and uses custom boot loader (initial program loader).

[1] www.ti.com/.../sprac49.pdf

Thanks & Regards,
Vikash

  • Hi Vikash,

    I have forwarded your question to a DSS expert.

    Regards,
    Yordan
  • Ishaqe,
    Conferred with some of our experts and we had the following comments. We have not tried the approach you mention above. Our approach works with Weston/wayland as well but one DSS pipeline used for splash screen is not reclaimed for use by kernel. Video showing seamless transition is shown in the quick 3min video:
    www.youtube.com/watch

    As you note we did create an application note to address this particular issue:
    www.ti.com/.../sprac49.pdf
    The application note published is for 3.14 kernel. The patches for 4.4 kernel/2016 u-boot are not yet available.
    John
  • Hi John,

    Thanks for the comment.

    We need a way to display logo/splash on specific pipeline via kernel, Could you guide us How can we do this? Is their any native application available for this?

    Another option I think is disabling calls in weston which is responsible for mode setting and clearing screen but not sure if this would be feasible and work. Could you check if this approach looks feasible?

    Regards,
    Vikash
  • Vikash,
    Just to make sure we don't have two threads running about the same thing - is this the same as the question in this thread:
    e2e.ti.com/.../594979
    John
  • Hi John,

    No it is different. This thread solely for splash screen.

    Regards,
    Vikash
  • Hi Vikash,

    We do not have a native application to support this but we can suggest an approach.

    Approach 1

    1. You can start a DRM application to display the logo, lets say splash-app. This DRM application can be started from a ramdisk to reduce the startup time. This DRM application is the initial display master.
    2. When weston is ready, it performs IPC with the splash-app. splash-app drops display mastership. Weston becomes the display master and starts displaying frames. There might be one or two frames of blank display when the display master ship changes.

    Approach 2

    1. The splash screen application can be enhanced to act as a display server. It can accept buffer pointers from other applications and display them on screen. It displays the logo on boot.
    2. When Weston starts, it sends the display frame to the splash screen application instead of displaying the frame directly. splash screen application displays the weston frame instead of the splash screen.

    In this approach, there will be no blank frames when display mastership changes.

    regards,
    Venkat
  • Hi Venkat,

    Thanks for the suggestions. Find my comments below.

    Approach 1

    This approach doesn't seem to be suitable for the IVI requirement as you already mentioned "There might be one or two frames of blank display when the display master ship changes."

    Also I think there need a switch between ramdisk (which will contain splash-app) to real rootfs (which will contain weston and all other required things) and it might cause glitch on display.

    Do you have any sample DRM application which can display images on display ?
    Is there any IPC already exits ? How does it works to drop mastership? Not sure if IPC can work between ramdisk and real rootfs?

    Approach 2
    I am not sure if this can meet early splash requirement (2 second). I think it is not good idea to run the two display server (weston and splash-app) in system. Could you elaborate on"The splash screen application can be enhanced to act as a display server"? How this can be done and what happens to Weston in this case?

    I am currently looking for the way to utilize any one of the available video pipeline for splash displaying via kernel (similar to changes done in u-boot in sparc49.pdf) and let weston start on GFX pipeline. Do you see if this is feasible?

    Regards,
    Vikash
  • Hi Vikash,

    Please see ny comments below.

    On Approach 1

    >> This approach doesn't seem to be suitable for the IVI requirement as you
    already mentioned "There might be one or two frames of blank display when the
    display master ship changes."

    I agree with you that the "one or two frames of blank display" is not acceptable.

    >> Also I think there need a switch between ramdisk (which will contain
    splash-app) to real rootfs (which will contain weston and all other required
    things) and it might cause glitch on display.

    We have done this switch between ramdisk and real rootfs while a display
    application is running in the linked video. As you can see, there is no
    glitch.

    www.youtube.com/watch

    >> Do you have any sample DRM application which can display images on display ?

    You can look at kmsview that is part of the SDK.

    https://github.com/tomba/kmsxx

    >> Is there any IPC already exits ? Not sure if IPC can work between ramdisk and real rootfs?

    Any standard Posix IPC should work.

    >> How does it works to drop mastership?

    dri.freedesktop.org/.../drm-uapi.html

    On Approach 2

    >>> I am not sure if this can meet early splash requirement (2 second).

    Meeting 2 seconds splash screen requirement should be possible if splash
    screen is rendered from a light weight DRM application.

    >> I think it is not good idea to run the two display server (weston and
    splash-app) in system. Could you elaborate on"The splash screen application
    can be enhanced to act as a display server"? How this can be done and what
    happens to Weston in this case?

    There will only be one owner for the display, the splash-app. Weston renders
    the UI using SGX and passes the buffer pointer to splash-app for display. The
    splash-app acts as a lightweight proxy. Two modifications are necessary.

    1. Weston needs to be modified to pass buffer to splash-app instead of
    displaying to screen.

    2. Splash-app needs to be modified to receive buffers from Weston and display
    them on scree.

    >> I am currently looking for the way to utilize any one of the available
    video pipeline for splash displaying via kernel (similar to changes done in
    u-boot in sparc49.pdf) and let weston start on GFX pipeline. Do you see if
    this is feasible?

    If you want to implement splash screen via kernel, I can only think of the
    above two approaches.

    However if you are also controlling the display from M4 as suggested by your
    below e2e question, I would recommend doing the splash screen from M4 instead.

    e2e.ti.com/.../594979

    regards,
    Venkat
  • Hi Venkat,

    Thanks for the detailed comments.

    To test the approach you suggested I thought of first displaying splash via drm application. For this I think "drm_z_alpha.c" (part of glsdk-example-apps\drm-tests) is the best application to start with. I did following experiment and still can see the flicker/black screen when weston starts and screen remains black.

    - Modified drm_z_alpha.c to have correct property id for z-order, global alpha and pre multiplied alpha. Added "drmDropMaster" just after "drmModeDirtyFB" to drop the DRM master so weston can start. Also modified plane1 to 800x480.

    - Run the modified app with following arguments. Here plane 1 (VID2) whose id is 37 kept at highest z-order with full global alpha and plane 2 (vid3) whose id is 38 kept at lowest z-order and full transparent. This show me the fullscreen pattern on display.

    ./drmzorder -s 800x480 -w 37:3:255:1 -w 38:0:0:1 &

    - Now I start the weston using systemd. i.e. systemctl start weston. Here weston starts and display become blank.

    My expectation was that display will keep showing the pattern buffer from drm application and weston will start without disturbing the display. I have also tried to observe the DISPC_VID12_ATTRIBUTES and it looks correct to me.

    DISPC_VID12_ATTRIBUTES shows following values.
    root@linux1:~# devmem 0x5800115C 32
    0x5EA08411

    What could be the reason of this blank screen when weston starts ? Is it due to weston takes the drm mastership? I think weston do not touch any VID plane by looking at the drm log , in that case it should have been work as expected.

    One more issue I found that while testing "drmzalpha". When I try to use VID1 as plane 1 or plane2 , test app do not work and says fail to enable plane1. See blow. Is this know issue? Could you test it from your side and check?

    root@linux1:~# ./drmzorderx -s 800x480 -w 35:3:255:1 -w 37:1:255:1
    /dev/dri/card0 open success!
    error:omapdrm:dss: failed to enable plane1
    root@linux1:~# ./drmzorderx -s 800x480 -w 37:3:255:1 -w 35:1:255:1
    /dev/dri/card0 open success!
    error:omapdrm:dss: failed to enable plane2

    Regards,
    Vikash
  • Vikash,

    >> To test the approach you suggested I thought of first displaying splash via drm application. For this I think "drm_z_alpha.c" (part of glsdk-example-apps\drm-tests) is the best application to start with. I did following experiment and still can see the flicker/black screen when weston starts and screen remains black.

    This is Approach 1 I listed above. In this case, a black frame or two are expected between the switch. Are you saying that weston does not come up?

    regards,
    Venkat
  • Hi Venkat,

    >> In this case, a black frame or two are expected between the switch.
    Do you mean this is due to weston becomes master of drm? i.e due to drmSetMaster api call by weston.

    >> Are you saying that weston does not come up?
    No, weston starts successfully as I already dropped the drm master from splash app. But I am not getting why still the flicker as display app is displaying on VID2 pipe (and vid2 pipe also has higher z-order and higest priority) while weston do not use vid2 pipe and uses only GFX.


    Regards,
    Vikash
  • Hi Venkat,

    Any further input on this?

    I like to understand how the following approach is different then the TI's application note and why it is not working.

    1. drm app displays (drmzorder) logo on vid2 with highest z-order , logo visible on display.
    2. weston starts on gfx and do not touch vid2 , shows black screen, even manipulating DSS registers directly do not show logo afterwards and shows only black screen. Is this due to drmSetCrtc call by weston or any other drm api? Is there anyway it can be avoided in weston or kernel ?

    And Why drmzorder app fails with vid1 pipeline?

    Regards,
    Vikash
  • Vikash,

    In the approach described in the application note, one pipeline is initialized in u-boot and kept active independent of the kernel.

    In the approach you are trying, the pipeline is under kernel control. The moment splash screen application drops DRM mastership and weston takes over the pipeline might be freed. I will check and get back.

    regards,
    Venkat
  • Hi Venkat,

    And Why drmzorder app fails with vid1 pipeline?

    In the approach you are trying, the pipeline is under kernel control. The moment splash screen application drops DRM mastership and weston takes over the pipeline might be freed. I will check and get back.

    Any update on above mentioned topic?

    Regards,
    Vikash