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.

OMAP3530: HW Acceleration won't work with SGX (BRANCH 1.17.4948957/mesa/glibc-2.35) and Linux 6.6 under use of yocto

Part Number: OMAP3530
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Haven't found part NO OMAP3630 so I selected 3530.
I have a custom board based on the omap3-beagle-xm.
I try to update it from Kernel 3.X to 6.6.x under use of yocto.
With the latest recipe which uses the latest branch "1.17.4948957/mesa/glibc-2.35"
Didn't get the GPU acceleration to work.
The KM Module is loaded and there is no issue on starting the pvrsrvctl driver.
(After removing the 50-... udev rule. otherwise I get Error 129 already loaded)

[~ ]$ /etc/init.d/rc.pvr start
[  378.953186] [drm] Initialized pvr 1.17.4948957 20110701 for 50000000.gpu on minor 1
[  378.995422] PVR_K: UM DDK-(4948957) and KM DDK-(4948957) match. [ OK ]
Loaded PowerVR consumer services.


When starting kmscube it mentions that the display is not initialised and starts turning the cube without acceleration (2.8Fps)

[ ~ ]$ kmscube
MESA: info: Loaded libpvr_dri_support.so
PVR:(Error): PVRDRICreateScreenImpl: Failed to create display device (err=19) [0, ]
MESA: info: Unloaded libpvr_dri_support.so
kmsro: driver missing
Using display 0x5fc2d0 with EGL version 1.4
...

Any Ideas where I could make the issue?


  • [ ~ ]$ ./gfx_check.sh 
    WSEGL settings
    [default]
    DefaultPixelFormat=RGB565
    WindowSystem=libpvrGBMWSEGL.so
    #WindowSystem=libpvrDRMWSEGL.so
    ------
    ARM CPU information
    processor	: 0
    model name	: ARMv7 Processor rev 2 (v7l)
    BogoMIPS	: 600.47
    Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 
    CPU implementer	: 0x41
    CPU architecture: 7
    CPU variant	: 0x3
    CPU part	: 0xc08
    CPU revision	: 2
    
    Hardware	: Generic OMAP36xx (Flattened Device Tree)
    Revision	: 0000
    Serial		: 0000000000000000
    ------
    SGX driver information
    Version SGX_DDK sgxddk 1.17@4948957 (release) ti335x_linux
    System Version String: SGX revision = 125
    ------
    Framebuffer settings
    
    mode "800x600"
        geometry 800 600 800 600 32
        timings 0 0 0 0 0 0 0
        rgba 8/16,8/8,8/0,0/0
    endmode
    
    Frame buffer device information:
        Name        : omapdrmdrmfb
        Address     : (nil)
        Size        : 1921024
        Type        : PACKED PIXELS
        Visual      : TRUECOLOR
        XPanStep    : 1
        YPanStep    : 1
        YWrapStep   : 0
        LineLength  : 3200
        Accelerator : No
    ------
    Rotation settings
    0
    ------
    Kernel Module information
    Module                  Size  Used by
    pvrsrvkm              364544  0
    ------
    Boot settings
    console=ttyO2,115200n8 mtdparts=omap2-nand.0:512k(spl),1920k(u-boot),128k(u-boot-env),128k(dtb),6m(kernel),-(rootfs) mpurate=auto buddy=none camera=none vram=12M root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
    ------
    Linux Kernel version
    Linux mmi4 6.6.58-ti-01497-ga7758da17c28-dirty #1 PREEMPT Wed Nov 27 13:23:15 UTC 2024 armv7l GNU/Linux
    
    
    Attached the output of gfx_check.sh

  • [ ~ ]$ pvrsrvctl --dump-debug --force-regs
    [ 1246.195434] PVR_K: User requested SGX debug info
    [ 1246.200225] PVR_K: SGX debug (SGX_DDK sgxddk 1.17@4948957)
    [ 1246.206512] PVR_K:(Error): SGX Register Base Address (Linear):   0xcd46f94b
    [ 1246.213653] PVR_K:(Error): SGX Register Base Address (Physical): 0x50000000
    [ 1246.220672] PVR_K: Running SGXREG Debug Scripts:
    [ 1246.225738] PVR_K: (P0)
    [ 1246.228302] PVR_K: 	(SGXREG) 0x00000000 : 0x00222220
    [ 1246.233642] PVR_K: 	(SGXREG) 0x00000004 : 0x00000000
    [ 1246.238677] PVR_K: 	(SGXREG) 0x00000118 : 0x00000000
    [ 1246.244049] PVR_K: 	(SGXREG) 0x0000012C : 0x00000000
    [ 1246.249084] PVR_K: 	(SGXREG) 0x000004E0 : 0x00000000
    [ 1246.254486] PVR_K: 	(SGXREG) 0x000004E4 : 0x00000000
    [ 1246.259490] PVR_K: 	(SGXREG) 0x00000658 : 0x00000000
    [ 1246.264984] PVR_K: 	(SGXREG) 0x00000A74 : 0x003F8200
    [ 1246.270019] PVR_K: 	(SGXREG) 0x00000C04 : 0x00000000
    [ 1246.278564] PVR_K: 	(SGXREG) 0x00000C08 : 0x00000000
    [ 1246.284240] PVR_K: 	(SGXREG) 0x00000E04 : 0x00000000
    [ 1246.289245] PVR_K: 	(SGXREG) 0x00000624 : 0x00000000
    [ 1246.294891] PVR_K: 	(SGXREG) 0x00000628 : 0x00000000
    [ 1246.299926] PVR_K: 	(SGXREG) 0x00000630 : 0x00000000
    [ 1246.305389] PVR_K: 	(SGXREG) 0x00000734 : 0x00000000
    [ 1246.310424] PVR_K: 	(SGXREG) 0x00000AA4 : 0xAAAAAAAA
    [ 1246.315826] PVR_K: 	(SGXREG) 0x00000AA8 : 0xAAAAAAAA
    [ 1246.320831] PVR_K: 	(SGXREG) 0x00000B08 : 0x00010000
    [ 1246.326354] PVR_K: 	(SGXREG) 0x00000B14 : 0x00010000
    [ 1246.331634] PVR_K: 	(SGXREG) 0x00000B0C : 0x00010000
    [ 1246.336639] PVR_K: 	(SGXREG) 0x00000B18 : 0x00010000
    [ 1246.342010] PVR_K: 	(SGXREG) 0x00000B10 : 0x0001D886
    [ 1246.347045] PVR_K: 	(SGXREG) 0x00000B1C : 0x00010000
    [ 1246.352416] PVR_K: SGX Register Dump:
    [ 1246.356201] PVR_K: (P0) EUR_CR_CORE_ID:          01120000
    [ 1246.362030] PVR_K: (P0) EUR_CR_CORE_REVISION:    00010205
    [ 1246.367492] PVR_K: (P0) EUR_CR_EVENT_STATUS:     00000000
    [ 1246.373321] PVR_K: (P0) EUR_CR_EVENT_STATUS2:    00000000
    [ 1246.378753] PVR_K: (P0) EUR_CR_BIF_CTRL:         00000000
    [ 1246.384887] PVR_K: (P0) EUR_CR_BIF_INT_STAT:     00000000
    [ 1246.390472] PVR_K: (P0) EUR_CR_BIF_FAULT:        00000000
    [ 1246.396270] PVR_K: (P0) EUR_CR_BIF_MEM_REQ_STAT: 00000000
    [ 1246.404479] PVR_K: (P0) EUR_CR_CLKGATECTL:       00222220
    [ 1246.409973] PVR_K: (P0) EUR_CR_PDS_PC_BASE:      00000000
    [ 1246.416046] PVR_K:  Host Ctl flags= 00000006
    [ 1246.420501] PVR_K: SGX Host control:
    [ 1246.424591] PVR_K: 	(HC-0) 0x00000001 0x00000000 0x00000000 0x00000001
    [ 1246.431213] PVR_K: 	(HC-10) 0x00000000 0x00000000 0x00000014 0x00030D40
    [ 1246.438293] PVR_K: 	(HC-20) 0x00000000 0x00000004 0x00000004 0x00000000
    [ 1246.445251] PVR_K: 	(HC-30) 0x00000000 0x0012D8E9 0xEEC8CDD0 0x00000000
    [ 1246.452270] PVR_K: 	(HC-40) 0x00000000 0x00000000 0x00000002 0xFDFFFFFF
    [ 1246.458953] PVR_K: SGX TA/3D control:
    [ 1246.463012] PVR_K: 	(T3C-0) 0x0F003000 0x0F003140 0x0F002000 0x00000000
    [ 1246.469726] PVR_K: 	(T3C-10) 0x00000000 0x00000000 0x00000002 0x00000000
    [ 1246.476867] PVR_K: 	(T3C-20) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.483856] PVR_K: 	(T3C-30) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.490692] PVR_K: 	(T3C-40) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.497833] PVR_K: 	(T3C-50) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.504882] PVR_K: 	(T3C-60) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.511871] PVR_K: 	(T3C-70) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.518707] PVR_K: 	(T3C-80) 0x00000000 0x00000000 0x00000000 0x0F000000
    [ 1246.525848] PVR_K: 	(T3C-90) 0x82817000 0x00000000 0x00000000 0x00000000
    [ 1246.532867] PVR_K: 	(T3C-A0) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.539611] PVR_K: 	(T3C-B0) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.546783] PVR_K: 	(T3C-C0) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.553863] PVR_K: 	(T3C-D0) 0x0F000000 0x8000B000 0x8004B000 0x0F004000
    [ 1246.560607] PVR_K: 	(T3C-E0) 0x0F00A420 0x0F00A740 0x00000000 0x00000000
    [ 1246.567779] PVR_K: 	(T3C-F0) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.574768] PVR_K: 	(T3C-100) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.581909] PVR_K: 	(T3C-110) 0x00000000 0x00000000 0x00000000 0x00000000
    [ 1246.588775] PVR_K: 	(T3C-120) 0x00000000 0x00000000 0x7DFFFFFF 0xFFFFFFFF
    [ 1246.596008] PVR_K: SGX Kernel CCB WO:0x1 RO:0x1
    [ 1246.600585] PVR_K: Active syncs
    
    

  • Hello Frank,

    First off, please keep in mind that we will not be able to support any OMAP3630 or OMAP3530 questions on the forums, as per the "no design support" banner on the product page. Both the hardware and software are very old, and our team no longer has expertise in either subject for either processor:
    https://www.ti.com/product/OMAP3530 

    I am not sure if the SGX on OMAP35x/OMAP36x is the same as the graphics accelerator on AM335x. Just in case I am sending you to a team member who has been tracking the AM335x code updates.

    Regards,

    Nick

  • Dear Nick
    thanks for the replay and the information.
    "I am sending you to a team member ..." means you have forwarded my question? Thumbsup


    For me it is also not really clear what are the differences between OMAP35x/OMAP36x and AM335x. Sometimes there is clearly noted that there are differences and sometimes it sounds as will the driver work for all of them.
    But because the development of the sgx driver v1.17.4948957 is in meanwhile more than 6 years old and the SOC more than double of this time.
    Maybe it could be possible to get "parts" or the whole driver source?
    Regards
    Frank

  • Hi Frank,

    Our dev team is not testing any of the OMAP platforms. We primarily have tested AM335x which has SGX530 and it is known to be fully functional based on our latest release: https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM335X. The document for GPU can be found here: https://software-dl.ti.com/processor-sdk-linux/esd/AM335X/09_03_05_02/exports/docs/linux/Foundational_Components/Graphics/SGX/Build_Guide.html.

    Regards,
    Krunal

  • Dear Krunal, Dear Nick,

    finally I get it working. I think for a start your link to the Build_Guide.html is very important!

    Because I had a lot of time to get the Acceleration working, on the omap36xx (and compatible SOC) under use of the linux-ti-6.6.x and yocto scarthgap, I'd like to explain a little bit what else I have done. Maybe somebody would help this.

    in the DTS-file omap36xx.dtsi you find the hint:
    /*
    * Note that the sysconfig register layout is a subset of the
    * "ti,sysc-omap4" type register with just sidle and midle bits
    * available while omap34xx has "ti,sysc-omap2" type sysconfig.
    */

    In a non TI-Language this means just: "USE THE OMAP4 USERMODE DRIVER"

    PACKAGECONFIG = ""                                                                                                                                                                           
    TARGET_PRODUCT:ti33x = "ti437x_linux"                                           
    do_install:append () {                                                          
            install -d ${D}${sysconfdir}/init.d                                     
            install -m 0755 ${WORKDIR}/./git/targetfs/common/etc/init.d/rc.pvr  ${D}/${sysconfdir}/init.d
    }                                                                               
                                                                                    
    FILES_${PN} += " \                                                              
            /etc/init.d/rc.pvr \                                                    
    "                    
    

    So the UM bbappend has to look like this. Necessary is the TARGET_PRODUCT:ti33x = "ti437x_linux"
    It says copy the libraries for the omap4 not omap3.
    The other stuff is for sysv. Then you don't need the "udev" PACKAGECONFIG but you have to install rc.pvr.

    EXTRA_OEMAKE += "PVR_DRM_MODESET_DRIVER_NAME=omapdrm"
    

    For the Kernel Module you just need this line which is also described in the link from Krunal.

    And here the relevant parts from Devicetree. When you use the first dss_data_pins and directly attach a simple panel (the mitsubishi is custom not described).

    &sgx_module {                                                                   
            status = "okay";                                                        
    };
    
    &dss {                                                                          
            status = "okay";                                                        
            pinctrl-names = "default";                                              
            pinctrl-0 = <&dss_dpi_pins1 &dss_dpi_pins2>;                            
                                                                                    
            port {                                                                  
                    #address-cells = <1>;                                           
                    #size-cells = <0>;                                              
                    rgb24_out: endpoint {                                           
                            data-lines = <24>;                                      
                            remote-endpoint = <&panel_in>;                          
                    };                                                              
            };                                                                      
    };
    panel: display {                                                        
            status = "okay";                                                
            compatible = "mitsubishi,aa104sh02";                            
            label = "Mitsubishi AA104SH02";                                 
                                                                            
            backlight = <&backlight>;                                       
            pinctrl-names = "default";                                      
            pinctrl-0 = <&panel_pins>;                                      
            enable-gpios = <&gpio5 13 GPIO_ACTIVE_HIGH>;            /* gpio_141 */
            port {                                                          
                    panel_in: endpoint {                                    
                            remote-endpoint = <&rgb24_out>;                 
                    };                                                      
            };                                                              
    };
    
    &omap3_pmx_wkup {                                                               
        dss_dpi_pins1: pinmux_dss_dpi_pins1 {                                                                                                                                                
            pinctrl-single,pins = <                                         
                OMAP3_WKUP_IOPAD(0x2a0a, PIN_OUTPUT | MUX_MODE3) /* sys_boot0.dss_data18 */
                OMAP3_WKUP_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE3) /* sys_boot1.dss_data19 */
                OMAP3_WKUP_IOPAD(0x2a10, PIN_OUTPUT | MUX_MODE3) /* sys_boot3.dss_data20 */
                OMAP3_WKUP_IOPAD(0x2a12, PIN_OUTPUT | MUX_MODE3) /* sys_boot4.dss_data21 */
                OMAP3_WKUP_IOPAD(0x2a14, PIN_OUTPUT | MUX_MODE3) /* sys_boot5.dss_data22 */
                OMAP3_WKUP_IOPAD(0x2a16, PIN_OUTPUT | MUX_MODE3) /* sys_boot6.dss_data23 */
            >;                                                              
        };                                                                      
    };
    &omap3_pmx_core { 
    	dss_dpi_pins1: pinmux_dss_dpi_pins2 {                                   
    	    pinctrl-single,pins = <                                         
                OMAP3_CORE1_IOPAD(0x20d4, PIN_OUTPUT | MUX_MODE0) /* dss_pclk.dss_pclk */
                OMAP3_CORE1_IOPAD(0x20d6, PIN_OUTPUT | MUX_MODE0) /* dss_hsync.dss_hsync */
                OMAP3_CORE1_IOPAD(0x20d8, PIN_OUTPUT | MUX_MODE0) /* dss_vsync.dss_vsync */
                OMAP3_CORE1_IOPAD(0x20da, PIN_OUTPUT | MUX_MODE0) /* dss_acbias.dss_acbias */
                                                                        
                OMAP3_CORE1_IOPAD(0x20e8, PIN_OUTPUT | MUX_MODE0) /* dss_data6.dss_data6 */
                OMAP3_CORE1_IOPAD(0x20ea, PIN_OUTPUT | MUX_MODE0) /* dss_data7.dss_data7 */
                OMAP3_CORE1_IOPAD(0x20ec, PIN_OUTPUT | MUX_MODE0) /* dss_data8.dss_data8 */
                OMAP3_CORE1_IOPAD(0x20ee, PIN_OUTPUT | MUX_MODE0) /* dss_data9.dss_data9 */
                OMAP3_CORE1_IOPAD(0x20f0, PIN_OUTPUT | MUX_MODE0) /* dss_data10.dss_data10 */
                OMAP3_CORE1_IOPAD(0x20f2, PIN_OUTPUT | MUX_MODE0) /* dss_data11.dss_data11 */
                OMAP3_CORE1_IOPAD(0x20f4, PIN_OUTPUT | MUX_MODE0) /* dss_data12.dss_data12 */
                OMAP3_CORE1_IOPAD(0x20f6, PIN_OUTPUT | MUX_MODE0) /* dss_data13.dss_data13 */
                OMAP3_CORE1_IOPAD(0x20f8, PIN_OUTPUT | MUX_MODE0) /* dss_data14.dss_data14 */
                OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT | MUX_MODE0) /* dss_data15.dss_data15 */
                OMAP3_CORE1_IOPAD(0x20fc, PIN_OUTPUT | MUX_MODE0) /* dss_data16.dss_data16 */
                OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE0) /* dss_data17.dss_data17 */
                                                                        
                OMAP3_CORE1_IOPAD(0x2100, PIN_OUTPUT | MUX_MODE3) /* dss_data18.dss_data0 */
                OMAP3_CORE1_IOPAD(0x2102, PIN_OUTPUT | MUX_MODE3) /* dss_data19.dss_data1 */
                OMAP3_CORE1_IOPAD(0x2104, PIN_OUTPUT | MUX_MODE3) /* dss_data20.dss_data2 */
                OMAP3_CORE1_IOPAD(0x2106, PIN_OUTPUT | MUX_MODE3) /* dss_data21.dss_data3 */
                OMAP3_CORE1_IOPAD(0x2108, PIN_OUTPUT | MUX_MODE3) /* dss_data22.dss_data4 */
                OMAP3_CORE1_IOPAD(0x210a, PIN_OUTPUT | MUX_MODE3) /* dss_data23.dss_data5 */
    	    >;                                                              
    	};
    };
    

    BE CAREFUL: I STILL HAVE TROUBLE WITH THE PWM BACKLIGHT! There seems something not working with the PWM-Timer. Maybe I get back here when I have found a solution. 

    CONFIG_DRM=y
    CONFIG_DRM_OMAP=y
    CONFIG_OMAP2_DSS_DPI=y //for me with parallel Display support
    CONFIG_DRM_TILCDC=y // Display in general
    CONFIG_DRM_PANEL_SIMPLE=y //simple Panel
    CONFIG_DRM_FBDEV_EMULATION=y 
    maybe you need:
    CONFIG_OMAP2_DSS_SDI=y //serial
    CONFIG_OMAP2_DSS_DSI=y //mipi
    
    

    Here my "graphics driver" config part. For sure you also need other omap(3) stuff.

    From a Yocto side you have to set the omapdrm and some packageconfig in mesa-pvr:

    PVR_DISPLAY_CONTROLLER_ALIAS = "omapdrm"                                                                                                                                                     
    PACKAGECONFIG:append = " zink kmsro sgx"                                        
    PACKAGECONFIG:remove = " virgl "               
    

    Wish you greet consumption holidays and a good slide into the new Year. (my own and a german idiom)
     
    Regards


    Frank 

  • Hello Frank,

    Glad to hear you were able to get things working! Thanks as well for posting your solution, this could be really helpful for anyone else who has managed to port OMAP35/OMAP36 to modern versions of the Linux kernel.

    Happy consumption holidays to you as well. Here's to successfully sliding into 2025!

    Regards,

    Nick