

QNX Screen driver - Introduction
================================

.. ifconfig:: QNX_SDP_VERSION in ('800')

    The QNX screen driver is the standard interface that provides developers with a
    means to develop Graphic User Interface (GUI) applicaitons. More details can be 
    found here: 
    https://www.qnx.com/developers/docs/8.0/com.qnx.doc.screen/topic/manual/cscreen_about.html

.. ifconfig:: QNX_SDP_VERSION in ('710')

    The QNX screen driver is the standard interface that provides developers with a
    means to develop Graphic User Interface (GUI) applicaitons. More details can be 
    found here: 
    https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.screen/topic/manual/cscreen_about.html

The QNX Screen package must be downloaded from QNX Software Center and is required for GPU support.

The QNX Screen driver can optionally control the DSS (Display) from the A72, the PSDK QNX package default is R5 control of the DSS.

.. NOTE::

    Refer :ref:`release_notes` software dependencies section for more information.


TI PSDK QNX default screen configuration
----------------------------------------

The default for screen with PSDK QNX is to enable the R5 based display driver and a virtual display configuration driver. This enables the QNX applications to make use of GPU with the Graphics/OpenGL APIs exposed by screen and have the display driver be controlled by the R5 core.


Enabling QNX screen configuration with QNX display driver
---------------------------------------------------------

For use cases that require a display driver controlling DSS on the QNX side, the follow updates need to be made.

QNX build file updates
^^^^^^^^^^^^^^^^^^^^^^

Startup commandline
+++++++++++++++++++

BSPs for all SoCs have the `-d` option set to default in the TI supplied build file. This option enables the DSS to controlled by the R5. To enable the DSS driver on the QNX side, remove the `-d` option from the startup commandline.

Eg: J784S4 SDP 7.1 j784s4-evm-ti.build file

This

.. code:: bash

    [+keeplinked] startup-j784s4-evm -v -s1:1:1:2 -r0xA0000000,0x60000000,1 -r0x880000000,0x100000000,1 -r0xA00000000,0x3C000000,1 -r0xA40000000,0x60000000,1

instead of

.. code:: bash

    [+keeplinked] startup-j784s4-evm -v -s1:1:1:2 -r0xA0000000,0x60000000,1 -r0x880000000,0x100000000,1 -r0xA00000000,0x3C000000,1 -r0xA40000000,0x60000000,1 -d


Startup I2C instances
+++++++++++++++++++++

For the TI EVMs that have an eDP display, the i2c controller instance corresponding to the slave required to control the DSI to eDP bridge should be enabled. Uncomment the following line for |dev_platform| from the ti build file.

.. ifconfig:: CONFIG_part_variant in ('J721E')

    .. code:: bash

        # i2c-omap35xx -p0x2010000 -i233 -d --u1
        # waitfor /dev/i2c1

.. ifconfig:: CONFIG_part_variant in ('J721S2')

    .. code:: bash

        #i2c-omap35xx -p0x2040000 -i236 -d --u4
        #waitfor /dev/i2c4 4

.. ifconfig:: CONFIG_part_variant in ('J784S4')

    .. code:: bash

        #i2c-omap35xx -p0x2040000 -i236 -d --u4
        # waitfor /dev/i2c4

.. ifconfig:: CONFIG_part_variant in ('J742S2')

    .. code:: bash

        #i2c-omap35xx -p0x2040000 -i236 -d --u4
        #waitfor /dev/i2c4 4

.. ifconfig:: CONFIG_part_variant in ('J722S')

    .. code:: bash

        # i2c-tda4 -p0x20010000 -i194 -d --u1
        # i2c-tda4 -p0x20020000 -i195 -d --u2


TI User script
--------------

.. ifconfig:: QNX_SDP_VERSION in ('800')

    **Configuration for R5 controlled display**


    .. code:: bash

        if [[ -e /ti_fs/usr/lib/graphics/j721s2/graphics-virtual-dpy.conf ]]; then
            echo "Start screen.."
            screen -c /ti_fs/usr/lib/graphics/j721s2/graphics-virtual-dpy.conf
        fi

    **Configuration for QNX controlled display**

    .. code:: bash

        if [[ -e /ti_fs/usr/lib/graphics/j721s2/graphics.conf ]]; then
            echo "Start screen.."
            screen -c /ti_fs/usr/lib/graphics/j721s2/graphics.conf
        fi


.. ifconfig:: QNX_SDP_VERSION in ('710')


    **Configuration for R5 controlled display**

    By default the PSDK QNX delivery will default to eDP display, controlled from the R5.  Use the **libWFDdummy.so** in the QNX graphics.conf file. Refer to the ${PSDK_QNX_PATH}/qnx/scripts/user__dss_on_r5.sh provided as part of the SDK.

    **Configuration for QNX controlled display**

    To **disable** the R5 control of the display, and enable A72 control of the display, use the **libWFDjacinto7.so** in the QNX graphics.conf file. The default graphics.conf file provided with thee BSP has this configration.


Vision apps build instructions
------------------------------
    - To **enable r5 display** (default) configuration, ENABLE_DSS flag must be **defined**, please reference Vision Apps User Guide, see section on “Build Instructions":
    - To **disable r5 display** and enable QNX DSS driver, the ENABLE_DSS flag must be **undefined**, please reference Vision Apps User Guide, see section on “Build Instructions":

    .. code:: bash

        Vision Apps User Guide
          - Build And Run
            - Build Instructions


.. ifconfig:: CONFIG_part_variant in ('J722S')

    .. ifconfig:: QNX_SDP_VERSION in ('800')

        Additional Notes for |dev_platform|
        -----------------------------------

        For |dev_platform| screen configuration, the screen package released by QNX has a known issue documented here: https://www.qnx.com/developers/articles/rel_7111_1.html

