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.

AM335x Building SGX Drivers

Other Parts Discussed in Thread: AM3358

Where is the proper documentation located for building the SGX drivers? I am unable to find explicit instructions on how to build the driver. I am coming from Sitara SDK 8. I was able to successfully do this when the SDK was broken into 2 separate parts. Now that they merged into a single SDK information on implementation seems to be harder to come by.

I attempted to build the driver directly from the extras folder. I was able to build this, but once I installed things did not seem to go right. I have had better results using the make targets from the root of the SDK, but the build is cumbersome in that it builds absolutely everything. I have had to hack away at it to get something useful, but this has proven difficult for subsequent builds as different portions of my project change.

I would like to be able to build portions independently and not use make omapdrm-pvr_install.

Also what drivers should be used in the kernel config when using the AM3358 and SGX?

Regards,

Matt

  • Hi Matt,

    From ti-processor-sdk-linux-am335x-evm-02.00.01.07/ folder, you can do the following:
    export ARCH=arm
    export PATH=<path/to/ti-processor-sdk-linux-am335x-evm-02.00.01.07>/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
    export CROSS_COMPILE=arm-linux-gnueabihf-

    Then you have two options:
    1. from the top sdk folder ti-processor-sdk-linux-am335x-evm-02.00.01.07/ you can execute:
    make omapdrm-pvr
    & copy the generated pvr driver files to the appropriate locations in your SDK file system

    2. navigate to board-support/extra-drivers/omapdrm-pvr-1.9.2253347/eurasia_km/
    export KERNELDIR=/path/to/ti-processor-sdk-linux-am335x-evm-02.00.01.07/board-support/linux-4.1.13+gitAUTOINC+8dc66170d9-g8dc6617
    cd eurasiacon/build/linux2/omap335x_linux/
    make
    Then copy the generated pvr drivers to the appropriate folders in your sdk file system. These instructions are well described in: board-support/extra-drivers/omapdrm-pvr-1.9.2253347/eurasia_km/INSTALL file.

    Hope this helps.

    Best Regards,
    Yordan
  • Yordan,

    Thank you for your response.

    I am aware of both approaches. Invoking from the root the SDK is not quite what I am looking for because issuing the make from there causes the am335x-evm_defconfig to be invoked and the entire project gets rebuilt.

    Looking at the make file for this usage there are significant arguments that don't get accounted for in just invoking the make from the extras folder.

    With either I am encountering build issues.

    Previously there was a wiki page that provided documentation on how to invoke the make of the graphics driver.

    Regards,

    Matt

  • Yordan,

    I started from scratch and followed your second set of instructions. I am getting build errors that read much like compilation errors. I am being pointed to unknown fields specified in initializer.

    My standard build process is to build the zImage, build the .dtb files, build the modules, and install the modules. Then I build the graphics drivers. Any thoughts?

    Regards,
    Matt
  • Yordan,

    To get the driver module to build I had to include the option PVR_NULLDRM=1, otherwise it would not build. I found option inside of the make file at the root of the SDK.

    My next question would be the following: What driver am I supposed be using for the DRM when using the AM335x?

    Back on SDK8 the tilcdc seemed to be the proper driver to work in conjunction with the SGX.

    With everything installed my application is unable to start on boot, we get an error stating that LinuxDRM cannot find a suitable CRTC for connector 20. I walked through our dmsg output and didn't find differences in regards to drm and tilcdc outputs.

    Current lsmod output:

    Module                  Size  Used by
    ipv6                  305284  24
    musb_dsps               7807  0
    musb_hdrc              68793  1 musb_dsps
    udc_core               11604  1 musb_hdrc
    usbcore               189449  1 musb_hdrc
    omapdrm_pvr           335095  0
    snd_soc_evm             5106  0
    pm33xx                  4633  0
    tilcdc                 27170  0
    drm_kms_helper        110776  1 tilcdc
    at24                    5238  0
    rtc_ds1307              8916  0
    omap_rng                4470  0
    lm75                    4656  0
    gpio_pca953x            9051  0
    snd_soc_tlv320aic3x    41117  1
    rng_core                7464  2 omap_rng
    musb_am335x             1240  0
    omap_wdt                4347  0
    leds_gpio               3445  0

    modetest output

    trying to open device 'i915'...failed.
    trying to open device 'radeon'...failed.
    trying to open device 'nouveau'...failed.
    trying to open device 'vmwgfx'...failed.
    trying to open device 'omapdrm'...failed.
    trying to open device 'exynos'...failed.
    trying to open device 'tilcdc'...success.
    Encoders:
    id      crtc    type    possible crtcs  possible clones
    19      18      LVDS    0x00000001      0x00000000
    
    Connectors:
    id      encoder status          type    size (mm)       modes   encoders
    20      19      connected       LVDS    0x0             3       19
      modes:
            name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
      800x600 60 800 840 968 1056 600 601 605 628 flags: nhsync, nvsync; type: preferred, driver
      800x600 85 800 832 896 1048 600 601 604 631 flags: nhsync, nvsync; type: driver
      800x600 75 800 816 896 1056 600 601 604 625 flags: nhsync, nvsync; type: driver
      props:
            1 EDID:
                    flags: immutable blob
                    blobs:
    
                    value:
            2 DPMS:
                    flags: enum
                    enums: On=0 Standby=1 Suspend=2 Off=3
                    value: 0
    
    CRTCs:
    id      fb      pos     size
    18      25      (0,0)   (800x600)
      800x600 60 800 840 968 1056 600 601 605 628 flags: nhsync, nvsync; type: preferred, driver
      props:
    
    Planes:
    id      crtc    fb      CRTC x,y        x,y     gamma size      possible crtcs
    17      18      25      0,0             0,0     0               0x00000001
      formats: XR24 AR24
      props:
            5 type:
                    flags: immutable enum
                    enums: Overlay=0 Primary=1 Cursor=2
                    value: 1
    
    Frame buffers:
    id      size    pitch
    

    cat /proc/pvr/version output

    root@P1900-3-SSC:/AMSI/User# cat /proc/pvr/version
    Version SGX_DDK_Linux_CustomerTI sgxddk 19 1.9@2253347 (release) omap335x_linux
    System Version String: SGX revision = 125
    

    fbset -i output

    mode "800x600"
        geometry 800 600 800 600 32
        timings 0 0 0 0 0 0 0
        accel true
        rgba 8/16,8/8,8/0,0/0
    endmode
    
    Frame buffer device information:
        Name        :
        Address     : 0x9e900000
        Size        : 1920000
        Type        : PACKED PIXELS
        Visual      : TRUECOLOR
        XPanStep    : 1
        YPanStep    : 1
        YWrapStep   : 0
        LineLength  : 3200
        Accelerator : No
    

  • Hi,

    About PVR_NULLDRM=1, you are correct, this is required if you want to build the pvr drivers (this is clearly stated in the makefile).

    As for: " What driver am I supposed be using for the DRM when using the AM335x?", have a look at the following guides:

    processors.wiki.ti.com/.../Processor_SDK_Linux_LCDC
    processors.wiki.ti.com/.../Linux_Core_LCD_Controller_User_Guide

    DRM is built in the kernel, when you use the following config options:
    CONFIG_DRM=y
    CONFIG_DRM_I2C_NXP_TDA998X=y
    CONFIG_DRM_TILCDC=y

    Sources are located in drivers/gpu/drm/omapdrm

    Best Regards,
    Yordan