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.

AM5748: ti-gc320-driver

Part Number: AM5748

I've working with the AM5748 trying to add rotation to my graphic display. Due the errata regarding the Tiler, I am now trying to use the BB2D module to achieve rotation. I started with this training https://training.ti.com/introduction-gc320-2d-graphics-accelerator-sitara-am57x-processors which is supposed to demo the rotation capabilites. However, on slide 10 it states to install the galcore.ko driver which is not built as part of this training.

I then went to https://git.ti.com/cgit/graphics/ti-gc320-driver/?h=ti-p7-rel to download the source which was referenced in slide 5 of the training pdf. Having downloaded the driver source, the Readme states you need to download the GLSDK, which has now been renamed Processor SDK Linux Automotive as per this page https://processors.wiki.ti.com/index.php/DRA7xx_GLSDK_Software_Developers_Guide

I downloaded the Processor SDK Linux Automotive version ti-processor-sdk-linux-automotive-dra7xx-evm-6.00.00.03 and built the kernel as stated in the driver Readme. I then exported all the symbols as stated in the driver Readme including where it states export "KERNEL_DIR=$GLSDK/board-support/linux". I then ran ./driver_build_j6_glsdk.sh as stated in the driver Readme and I got the following error in a few different locations:

/ti-gc320-driver-ti-p7-rel/src/hal/os/linux/kernel/gc_hal_kernel_device.c:1757:54: error: ‘IRQF_DISABLED’ undeclared (first use in this function); did you mean ‘UMH_DISABLED’?

seeing that IRQF_DISABLED has been deprecated in Linux kernel to which the SDK I was told to download was using, I went ahead and just replaced IRQF_DISABLED with 0. I then attempted to build again. This time I got this error in a few locations:

ti-gc320-driver-ti-p7-rel/src/hal/os/linux/kernel/gc_hal_kernel_linux.h:121:65: error: ‘PAGE_CACHE_MASK’ undeclared (first use in this function); did you mean ‘VMACACHE_MASK’?

The only place PAGE_CACHE_MASK was defined in SDK Linux was in arch/x86/include/asm/pgtable_types.h which doesn't make sense for building an ARM device. 

So my question, how am I supposed to build or get this driver for the AM5748 so that I can run the graphics test from the training?

Thanks for your assistance,

Bill Kanczes

  • Hi Bill,

    gc320 is usually built during yocto build and you will find this module in /lib/modules/lib/modules/4.19.xx-gxxxxxxxxxd/extra/

    If you want to build gc20 module as stand-alone without using yocto, please follow these steps

    git clone git://git.ti.com/graphics/ti-gc320-driver.git
    cd ti-gc320-driver
    git checkout -b gc320-driver-branch origin/ti-5.0.11.p7-k4.19

    export ROOTDIR=$PWD
    export AQROOT=$PWD/src
    export TOOLCHAIN_PATH=/home//gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin
    export PATH=/home//gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin:$PATH
    export CROSS_COMPILE=arm-linux-gnueabihf-
    export ARCH_TYPE=arm
    export KERNEL_DIR=/home/ti-processor-sdk-linux-automotive-dra7xx-evm-6.00.00.03/board-support/linux
    cd src
    make -f Kbuild

    gaclore.ko will get built in

    ti-gc320-driver/src/galcore.ko

    Thanks

    Ram

  • Following those steps, it did build for me.

    Thanks,

    BIll