楼主: houweitao2835

[已解决] imx6 gpu使用(已解决)

[复制链接]

该用户从未签到

10

主题

61

帖子

0

中级会员

Rank: 3Rank: 3

积分
278
最后登录
2015-4-22
 楼主| 发表于 2014-9-10 10:33:24 | 显示全部楼层
是不是必须使用ubuntu rootfs来测试GPU_X11?
回复 支持 反对

使用道具 举报

该用户从未签到

10

主题

61

帖子

0

中级会员

Rank: 3Rank: 3

积分
278
最后登录
2015-4-22
 楼主| 发表于 2014-9-10 15:38:56 | 显示全部楼层
我现在用SarMBoard,装了ubuntu系统测试,
1,加载了驱动galcore.ko, 设备下有/dev/galcore;
2,安装gpu-viv-bin-mx6q_3.0.35-4.1.0_armel.deb,将相应EGL、GAL、VIVANTE库链接到X11库上,
3,安装xserver-xorg-video-imx-viv_4.1.0-1_armel.deb
3.1目录下生成了文件
/usr/lib/xorg/modules/drivers/vivante_drv.so
/usr/lib/xorg/modules/extensions/libdri.so
3.2生成了文件/etc/X11/xorg.conf,内容如下
Section "InputDevice"
        Identifier        "Generic Keyboard"
        Driver                "kbd"
        Option                "XkbRules"        "xorg"
        Option                "XkbModel"        "pc105"
        Option                "XkbLayout"        "us"
EndSection

Section "InputDevice"
        Identifier        "Configured Mouse"
        Driver                "mouse"
        Option                "CorePointer"
EndSection

Section "Device"
        Identifier        "i.MX Accelerated Framebuffer Device"
        Driver                "vivante"
        Option                "fbdev"                "/dev/fb0"
        Option                "vivante_fbdev"        "/dev/fb0"
        Option                "HWcursor"        "false"
EndSection

Section "Monitor"
        Identifier        "Configured Monitor"
EndSection

Section "Screen"
        Identifier        "Default Screen"
        Monitor                "Configured Monitor"
        Device                "i.MX Accelerated Framebuffer Device"
EndSection

Section "ServerLayout"
        Identifier        "Default Layout"
        Screen                "Default Screen"
EndSection
回复 支持 反对

使用道具 举报

该用户从未签到

10

主题

61

帖子

0

中级会员

Rank: 3Rank: 3

积分
278
最后登录
2015-4-22
 楼主| 发表于 2014-9-10 15:39:22 | 显示全部楼层

3.3查看/var/log/Xorg.0.log文件,内容如下:
[    18.150]
X.Org X Server 1.10.4
Release Date: 2011-08-19
[    18.151] X Protocol Version 11, Revision 0
[    18.151] Build Operating System: Linux 2.6.35-24-omap armv7l Ubuntu
[    18.151] Current Operating System: Linux linaro-ubuntu-desktop 3.0.15-gc86746c #2 SMP PREEMPT Sat May 11 16:10:44 CST 2013 armv7l
[    18.151] Kernel command line: console=ttymxc1,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24 fbmem=10M vmalloc=400M root=/dev/mmcblk0p1 rootwait rw
[    18.151] Build Date: 19 October 2011  06:22:31AM
[    18.152] xorg-server 2:1.10.4-1ubuntu4.2 (For technical support please see http://www.ubuntu.com/support)
[    18.152] Current version of pixman: 0.22.2
[    18.152]         Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
[    18.152] Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    18.152] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Sep 10 15:13:31 2014
[    18.158] (==) Using config file: "/etc/X11/xorg.conf"
[    18.158] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    18.171] (==) ServerLayout "Default Layout"
[    18.171] (**) |-->Screen "Default Screen" (0)
[    18.171] (**) |   |-->Monitor "Configured Monitor"
[    18.172] (**) |   |-->Device "i.MX Accelerated Framebuffer Device"
[    18.172] (==) Automatically adding devices
[    18.172] (==) Automatically enabling devices
[    18.181] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    18.181]         Entry deleted from font path.
[    18.181] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    18.182]         Entry deleted from font path.
[    18.182] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    18.182]         Entry deleted from font path.
[    18.183] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    18.183]         Entry deleted from font path.
[    18.183] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    18.183]         Entry deleted from font path.
[    18.191] (==) FontPath set to:
        /usr/share/fonts/X11/misc,
        /usr/share/fonts/X11/Type1,
        /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType,
        built-ins
[    18.191] (==) ModulePath set to "/usr/lib/arm-linux-gnueabi/xorg/extra-modules,/usr/lib/xorg/extra-modules,/usr/lib/xorg/modules"
[    18.191] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[    18.191] (II) Loader magic: 0x13f45c
[    18.191] (II) Module ABI versions:
[    18.191]         X.Org ANSI C Emulation: 0.4
[    18.191]         X.Org Video Driver: 10.0
[    18.191]         X.Org XInput driver : 12.3
[    18.191]         X.Org Server Extension : 5.0
[    18.191] (II) Open APM successful
[    18.192] (II) LoadModule: "extmod"
[    18.204] (II) Loading /usr/lib/xorg/modules/extensions/libextmod.so
[    18.215] (II) Module extmod: vendor="X.Org Foundation"
[    18.215]         compiled for 1.10.4, module version = 1.0.0
[    18.215]         Module class: X.Org Server Extension
[    18.215]         ABI class: X.Org Server Extension, version 5.0
[    18.215] (II) Loading extension MIT-SCREEN-SAVER
[    18.215] (II) Loading extension XFree86-VidModeExtension
[    18.215] (II) Loading extension XFree86-DGA
[    18.215] (II) Loading extension DPMS
[    18.215] (II) Loading extension XVideo
[    18.215] (II) Loading extension XVideo-MotionCompensation
[    18.215] (II) Loading extension X-Resource
[    18.215] (II) LoadModule: "dbe"
[    18.216] (II) Loading /usr/lib/xorg/modules/extensions/libdbe.so
[    18.218] (II) Module dbe: vendor="X.Org Foundation"
[    18.218]         compiled for 1.10.4, module version = 1.0.0
[    18.218]         Module class: X.Org Server Extension
[    18.218]         ABI class: X.Org Server Extension, version 5.0
[    18.218] (II) Loading extension DOUBLE-BUFFER
[    18.218] (II) LoadModule: "glx"
[    18.219] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    18.242] (II) Module glx: vendor="X.Org Foundation"
[    18.244]         compiled for 1.10.4, module version = 1.0.0
[    18.244]         ABI class: X.Org Server Extension, version 5.0
[    18.244] (==) AIGLX enabled
[    18.244] (II) Loading extension GLX
[    18.244] (II) LoadModule: "record"
[    18.245] (II) Loading /usr/lib/xorg/modules/extensions/librecord.so
[    18.247] (II) Module record: vendor="X.Org Foundation"
[    18.248]         compiled for 1.10.4, module version = 1.13.0
[    18.248]         Module class: X.Org Server Extension
[    18.248]         ABI class: X.Org Server Extension, version 5.0
[    18.248] (II) Loading extension RECORD
[    18.248] (II) LoadModule: "dri"
[    18.248] (II) Loading /usr/lib/xorg/modules/extensions/libdri.so
[    18.254] (II) Module dri: vendor="X.Org Foundation"
[    18.254]         compiled for 0.0.0.10, module version = 1.0.0
[    18.255]         ABI class: X.Org Server Extension, version 5.0
[    18.255] (II) Loading extension XFree86-DRI
[    18.255] (II) LoadModule: "dri2"
[    18.255] (II) Loading /usr/lib/xorg/modules/extensions/libdri2.so
[    18.263] (II) Module dri2: vendor="X.Org Foundation"
[    18.263]         compiled for 1.10.4, module version = 1.2.0
[    18.263]         ABI class: X.Org Server Extension, version 5.0
[    18.263] (II) Loading extension DRI2
[    18.263] (II) LoadModule: "vivante"
[    18.266] (II) Loading /usr/lib/xorg/modules/drivers/vivante_drv.so
[    18.347] (II) Module vivante: vendor="X.Org Foundation"
[    18.347]         compiled for 1.10.4, module version = 1.0.0
[    18.347]         ABI class: X.Org Video Driver, version 10.0
[    18.347] (II) Loading extension vivext
[    18.347] (II) VIVANTE: fb driver for vivante: VivanteGC500, VivanteGC2100,
        VivanteGCCORE
[    18.347] (++) using VT number 7

[    18.347] (WW) Falling back to old probe method for vivante
[    18.348] (II) Loading sub module "fbdevhw"
[    18.348] (II) LoadModule: "fbdevhw"
[    18.348] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    18.363] (II) Module fbdevhw: vendor="X.Org Foundation"
[    18.363]         compiled for 1.10.4, module version = 0.0.2
[    18.363]         ABI class: X.Org Video Driver, version 10.0
[    18.363] (II) Loading /usr/lib/xorg/modules/drivers/vivante_drv.so
[    18.363] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    18.363] (II) VIVANTE(0): using default device
[    18.363] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    18.363] (II) VIVANTE(0): Creating default Display subsection in Screen section
        "Default Screen" for depth/fbbpp 24/32
[    18.364] (==) VIVANTE(0): Depth 24, (==) framebuffer bpp 32
[    18.364] (==) VIVANTE(0): RGB weight 888
[    18.364] (==) VIVANTE(0): Default visual is TrueColor
[    18.364] (==) VIVANTE(0): Using gamma correction (1.0, 1.0, 1.0)
[    18.364] (II) VIVANTE(0): hardware: DISP4 BG - DI1 (video memory: 24300kB)
[    18.364] (II) VIVANTE(0): checking modes against framebuffer device...
[    18.364] (II) VIVANTE(0): checking modes against monitor...
[    18.364] (--) VIVANTE(0): Virtual size is 1920x1080 (pitch 1920)
[    18.364] (**) VIVANTE(0):  Built-in mode "current": 148.5 MHz, 67.5 kHz, 60.0 Hz
[    18.364] (II) VIVANTE(0): Modeline "current"x0.0  148.50  1920 2008 2052 2200  1080 1084 1089 1125 +hsync +vsync -csync (67.5 kHz)
[    18.364] (==) VIVANTE(0): DPI set to (96, 96)
[    18.364] (II) Loading sub module "fb"
[    18.364] (II) LoadModule: "fb"
[    18.365] (II) Loading /usr/lib/xorg/modules/libfb.so
[    18.385] (II) Module fb: vendor="X.Org Foundation"
[    18.385]         compiled for 1.10.4, module version = 1.0.0
[    18.385]         ABI class: X.Org ANSI C Emulation, version 0.4
[    18.385] (II) Loading sub module "exa"
[    18.385] (II) LoadModule: "exa"
[    18.386] (II) Loading /usr/lib/xorg/modules/libexa.so
[    18.393] (II) Module exa: vendor="X.Org Foundation"
[    18.393]         compiled for 1.10.4, module version = 2.5.0
[    18.393]         ABI class: X.Org Video Driver, version 10.0
[    18.394] (--) Depth 24 pixmap format is 32 bpp
[    18.526] (II) VIVANTE(0): FB Start = 0x2b1eb000  FB Base = 0x2b1eb000  FB Offset = (nil)
[    18.531] (II) VIVANTE(0): test Initializing EXA
[    18.531]
Backtrace:
[    18.531] Segmentation fault at address 0xc
[    18.532]
Caught signal 11 (Segmentation fault). Server aborting
[    18.532]
Please consult the The X.Org Foundation support
         at http://wiki.x.org
for help.
[    18.532] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    18.532]
[    18.623]  ddxSigGiveUp: Closing log



=====================================

当重新启动时,HDMI显示器没有画面,从串口终端上看到已经进入ubuntu系统了。后来删除了/etc/X11/xorg.conf,重启可以正常进入系统,显示器有画面。

此时直接在板子上编译,测试GPU_X11,bin文件可以运行,但是物体旋转特别慢,感觉没有使用硬件加速。

不知道是我哪里配置有问题???
回复 支持 反对

使用道具 举报

该用户从未签到

10

主题

61

帖子

0

中级会员

Rank: 3Rank: 3

积分
278
最后登录
2015-4-22
 楼主| 发表于 2014-9-10 15:45:07 | 显示全部楼层
This package contains the vivante-drv.so and libdri.so driver module for X
acceleration and is installed in the folder with all the other X.org driver modules
我删除了/etc/X11/xorg.conf,所以在启动时没有加载vivante-drv.so和libdri.so,所以没有硬件加速???
但是使用/etc/X11/xorg.conf,进入不了ubuntu界面,不知道是哪出错了???
回复 支持 反对

使用道具 举报

该用户从未签到

45

主题

2369

帖子

0

金牌会员

Rank: 6Rank: 6

积分
3275
最后登录
1970-1-1
发表于 2014-9-10 16:18:19 | 显示全部楼层
houweitao2835 发表于 2014-9-10 10:33
是不是必须使用ubuntu rootfs来测试GPU_X11?

楼主你好,是的要在Linux的系统上测试GPU,gnome的不知道可不可以的。
回复 支持 反对

使用道具 举报

该用户从未签到

10

主题

61

帖子

0

中级会员

Rank: 3Rank: 3

积分
278
最后登录
2015-4-22
 楼主| 发表于 2014-9-11 09:30:45 | 显示全部楼层
你好,
现在GPU使用GLES2.0可以运行了,但可能加速没做好,
GLES1.1 demo不能运行,报错如下:
/usr/lib/libGLESv1_CM.so.1:undefined symbol:veglGetCurrentAPIContext。

我的库里/usr/lib/如下
libGLESv1_CM.so  -->libGLESV1_CM.so.1.1.0
libGLESv1_CM.so.1 -->libGLESV1_CM.so.1.1.0
libGLESV1_CM.so.1.1.0
我用命令grep -r veglGetCurrentAPIContext libGLESv1_CM.so.1
这个库里有veglGetCurrentAPIContext

请问下这是什么原因啊?急!
回复 支持 反对

使用道具 举报

该用户从未签到

45

主题

2369

帖子

0

金牌会员

Rank: 6Rank: 6

积分
3275
最后登录
1970-1-1
发表于 2014-9-11 17:19:01 | 显示全部楼层
houweitao2835 发表于 2014-9-11 09:30
你好,
现在GPU使用GLES2.0可以运行了,但可能加速没做好,
GLES1.1 demo不能运行,报错如下:

请问你这里是在哪块板子上运行的?这个我没有调试过,需要帮你问一下的。
回复 支持 反对

使用道具 举报

该用户从未签到

10

主题

61

帖子

0

中级会员

Rank: 3Rank: 3

积分
278
最后登录
2015-4-22
 楼主| 发表于 2014-9-11 18:38:58 | 显示全部楼层
这个是在MarS Board上运行的,ubuntu系统

1,测试GPU_X11 demo
EGL,GAL,VIVANTE都链接到相应的X11库,
GLES2.0可以运行,
GLES1.1出错,提示/usr/lib/libGLESv1_CM.so.1:undefined symbol:veglGetCurrentAPIContext

2,测试GPU_FB demo
EGL,GAL,VIVANTE都链接到相应的FB库,
GLES1.1和GLES2.0都提示 undefined symbol:fbGetDisplayByIndex
在/usr/include/EGL下有定义fbGetDisplayByIndex
回复 支持 反对

使用道具 举报

该用户从未签到

5

主题

13

帖子

0

新手上路

Rank: 1

积分
49
最后登录
2015-2-16
发表于 2014-9-16 01:52:30 | 显示全部楼层
您好,我也遇到了/../common/src/fsl_egl.c:77: undefined reference to `fbCreateWindow',/../common/src/fsl_egl.c:50: undefined reference to `fbGetDisplayByIndex'
请问怎么解决的啊
回复 支持 反对

使用道具 举报

该用户从未签到

10

主题

61

帖子

0

中级会员

Rank: 3Rank: 3

积分
278
最后登录
2015-4-22
 楼主| 发表于 2014-9-17 10:09:06 | 显示全部楼层
你使用的是GPU-fb方式吧,你现在用的是什么系统?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 注册/登录

本版积分规则

关闭

站长推荐上一条 /3 下一条

Archiver|手机版|小黑屋|恩智浦技术社区

GMT+8, 2025-7-22 07:44 , Processed in 0.100179 second(s), 28 queries , MemCache On.

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表