# cat /proc/version
Linux version 2.6.28-omap1 (rvoisey@shuttle) (gcc version 4.2.1) #1 Mon Feb
2 17:56:09 GMT 2009
# cat /proc/cmdline
console=ttyS2,115200n8 root=/dev/mmcblk0p2 rootdelay=2 rootfstype=ext3
video=omapfb:vram:4M omapfb.video_mode=800x600MR-24@60
# ipkg info libgles-omap3
Package: libgles-omap3
Version: 3.00.00.06-r5.1
Depends: update-rc.d, libc6 (>= 2.6.1), libx11-6 (>= 1.1.5)
Recommends: libgles-omap3-tests, omap3-sgx-modules
Status: install user installed
Section: base
Architecture: armv7a
Maintainer: Rob Voisey <r...@pixelbeat.co.uk>
Size: 1265408
Description: libGLES for the omap3
Installed-Time: 1233976889
Installed-Size: 5664215
# cat /proc/pvr/version
Version 1.3.13.1397 (release)
/.../tmp/work/beagleboard-pixelbeat-linux-gnueabi/omap3-sgx-modules-1.3.13.1397-r5/omap3-sgx-modules-7
System Version String: SGX revision = 1.0.3
# cat /proc/fb
0 omapfb
1 omapfb
2 omapfb
# cat /proc/pvr/nodes
Registered nodes
Addr Type Class Index Ref pvDev Size Res
c6ffc560 ?8 display 1 1 c7b94e60 48 00000000
c6ffc320 ?7 3D 0 1 c8943000 0 c7ad0bc0
The pre-built demos all fail like this:
# Raw/TrainingCourse/Initialization/OGLES2Initialization
Error: eglInitialize() failed.
I made a very simple test app, and observed that:
eglGetDisplay((EGLNativeDisplayType)EGL_DEFAULT_DISPLAY) returns 1
eglInitialize(eglDisplay, &iMajorVersion, &iMinorVersion) returns EGL_FALSE
Note that I can open /dev/fb0 and run my own graphics routines on it with no
problem. I tried *not* doing so but that didn't help. I'm suspicious of
the boot arguments and tried a few variants, but admit I'm groping around in
the dark.
Thanks for any hints.
Rob
--
Rob Voisey, r...@pixelbeat.co.uk
> Change that to mr-16, sgx doesn't support 32bit.
Thanks, that did get me further. The call to eglInitialize no longer fails,
and a call to eglChooseConfig also succeeds, however eglCreateWindowSurface
then fails with EGL_NOT_INITIALIZED. I'm using the config attributes from
the lib examples:
EGL_SURFACE_TYPE = EGL_WINDOW_BIT
EGL_RENDERABLE_TYPE = EGL_OPENGL_ES2_BIT
EGL_CONTEXT_CLIENT_VERSION = 2
I remember why I hate closed source libraries now!
You need to contact TI to get the libraries.
> A bit more info:
>
> The following tests execute without error:
>
> sgx_init_test
> sgx_blit_test
> sgx_render_test
>
> The following tests fail:
>
> sgx_flip_test FAIL - PVRSRV_ERROR_TOOMANYBUFFERS
> sgx_render_flip_test FAIL - PVRSRV_ERROR_TOOMANYBUFFERS(27)
>
> All EGL/OGLES tests fail with code 3001, which I believe is
> EGL_NOT_INITIALIZED, raised during eglCreateWindowSurface.
>
> I've attached some output.
>
> I'll have a dig into that kernel module error tomorrow, but if
> anyone has
> any ideas I'd love to hear them.
You could try increasing the VRAM a bit in DSS2, that might help.
regards,
Koen
>
>
> Rob
> ----- Original Message -----
> From: "Rob Voisey" <r...@pixelbeat.co.uk>
> To: <beagl...@googlegroups.com>
> Sent: Saturday, February 07, 2009 9:32 PM
> Subject: [beagleboard] Re: Trying to get SGX libs to initialise
>
>
>>
>> Koen
>>
>>> Change that to mr-16, sgx doesn't support 32bit.
>>
>> Thanks, that did get me further. The call to eglInitialize no longer
>> fails,
>> and a call to eglChooseConfig also succeeds, however
>> eglCreateWindowSurface
>> then fails with EGL_NOT_INITIALIZED. I'm using the config
>> attributes from
>> the lib examples:
>>
>> EGL_SURFACE_TYPE = EGL_WINDOW_BIT
>> EGL_RENDERABLE_TYPE = EGL_OPENGL_ES2_BIT
>> EGL_CONTEXT_CLIENT_VERSION = 2
>>
>> I remember why I hate closed source libraries now!
>>
>> Rob
>>
>> --
>> Rob Voisey, r...@pixelbeat.co.uk
>>
>>
>>>
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "Beagle Board" group.
> To post to this group, send email to discu...@beagleboard.org.
> To unsubscribe from this group, send email to beagleboard...@beagleboard.org
> For more options, visit this group at http://groups.google.com/group/beagleboard?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>
> **********************************
> EGL Config num 1
> EGL vendor string: Imagination Technologies
> EGL version string: 1.4 build 1.3.13.1397
> EGL extensions: EGL_KHR_image EGL_KHR_gl_texture_2D_image
> EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image
> EGL_KHR_vg_parent_image
> EGL client APIs are: OpenGL_ES OpenVG
>
> EGL config Attributes:
> EGL_CONFIG_ID = 0x1
> EGL_BUFFER_SIZE = 0x10
> EGL_RED_SIZE = 0x5
> EGL_GREEN_SIZE = 0x6
> EGL_BLUE_SIZE = 0x5
> EGL_LUMINANCE_SIZE = 0x0
> EGL_ALPHA_SIZE = 0x0
> EGL_ALPHA_MASK_SIZE = 0x8
> EGL_BIND_TO_TEXTURE_RGB = 0x1
> EGL_BIND_TO_TEXTURE_RGBA = 0x0
> EGL_COLOR_BUFFER_TYPE = 0x308e
> EGL_CONFIG_CAVEAT = 0x3038
> EGL_CONFORMANT = 0x3
> EGL_DEPTH_SIZE = 0x18
> EGL_LEVEL = 0x0
> EGL_MAX_PBUFFER_WIDTH = 0x800
> EGL_MAX_PBUFFER_HEIGHT = 0x800
> EGL_MAX_PBUFFER_PIXELS = 0x400000
> EGL_MAX_SWAP_INTERVAL = 0x3
> EGL_MIN_SWAP_INTERVAL = 0x0
> EGL_NATIVE_RENDERABLE = 0x0
> EGL_NATIVE_VISUAL_ID = 0x0
> EGL_NATIVE_VISUAL_TYPE = 0x0
> EGL_RENDERABLE_TYPE = 0x3 EGL_OPENVG_BIT EGL_OPENGL_ES_BIT
> EGL_SAMPLE_BUFFERS = 0x0
> EGL_SAMPLES = 0x0
> EGL_STENCIL_SIZE = 0x8
> EGL_SURFACE_TYPE = 0x65 EGL_PBUFFER_BIT EGL_WINDOW_BIT
> EGL_VG_COLORSPACE_LINEAR_BIT EGL_VG_ALPHA_FORMAT_PRE_BIT
> EGL_TRANSPARENT_TYPE = 0x3038
> EGL_TRANSPARENT_RED_VALUE = 0x0
> EGL_TRANSPARENT_GREEN_VALUE = 0x0
> EGL_TRANSPARENT_BLUE_VALUE = 0x0
> Unable to create window surface------------------ SGX 3D Blit test
> -----------------
> ----------------------- Start -----------------------
> Call PVRSRVConnect with a valid argument:
> OK
> Get number of devices from PVRSRVEnumerateDevices:
> OK
> .... Reported 1 devices
> .... Device Number | Device Type
> 0000 | PVRSRV_DEVICE_ID_SGX
> Attempt to acquire device 0:
> OK
> Getting SGX Client info
> OK
> .... ui32ProcessID:1689
> Display Class API: enumerate devices
> OK
> PVRSRVEnumerateDeviceClass() returns 1 display device(s)
> OK
> Attempt to create memory context for SGX:
> OK
> Display Class API: open device
> OK
> Display Class API: Get display info
> OK
> .... Name:PowerVR OMAP Linux Display Driver
> .... MaxSwapChains:1
> .... MaxSwapChainBuffers:1
> .... MinSwapInterval:0
> .... MaxSwapInterval:3
> Display Class API: enumerate display formats
> OK
> OK
> .... Display format 0 - Pixelformat:1
> Display Class API: enumerate display dimensions
> OK
> OK
> .... Display dimensions 0 - ByteStride:1600 Width:800 Height:600
> Display Class API: get the system (primary) buffer
> OK
> .... Shared heap 0 - HeapID:0x7000000 DevVAddr:0x400000 Size:
> 0x6bff000 Attr:0x2014200
> .... Shared heap 1 - HeapID:0x7000001 DevVAddr:0x7000000 Size:
> 0xfff000 Attr:0x2024200
> .... Shared heap 2 - HeapID:0x7000002 DevVAddr:0xf000000 Size:
> 0x80000 Attr:0x2024200
> .... Shared heap 3 - HeapID:0x7000004 DevVAddr:0xf800000 Size:
> 0x3ff000 Attr:0x2024200
> .... Shared heap 4 - HeapID:0x7000005 DevVAddr:0xd000000 Size:
> 0x500000 Attr:0x2014200
> .... Shared heap 5 - HeapID:0x7000006 DevVAddr:0xd800000 Size:
> 0x200000 Attr:0x2014200
> .... Shared heap 6 - HeapID:0x7000007 DevVAddr:0xe000000 Size:
> 0x7ff000 Attr:0x2014200
> .... Shared heap 7 - HeapID:0x7000008 DevVAddr:0xe800000 Size:
> 0x7ff000 Attr:0x2014200
> .... Shared heap 8 - HeapID:0x7000009 DevVAddr:0xfc00000 Size:
> 0x3ff000 Attr:0x2024200
> .... Shared heap 9 - HeapID:0x700000a DevVAddr:0x8000000 Size:
> 0x3fff000 Attr:0x2014200
> .... Shared heap 10 - HeapID:0x700000b DevVAddr:0xc000000 Size:
> 0xfff000 Attr:0x2024000
> Display Class API: map display surface to SGX
> OK
> Attempt to create transfer context for SGX:
> OK
> Do a SRCCOPY blit to the bottom right quadrant of the display:
> (bottom right quadrant should be red on blue background):
> OK
> OK
> Do a SRCCOPY blit to the top left quadrant of the display:
> (top left quadrant should be striped (r/g/b/w) on blue background):
> OK
> OK
> Free the source surface:
> OK
> Destroy the transfer context:
> OK
> Display Class API: unmap display surface from SGX
> OK
> Attempt to destroy memory context for SGX:
> OK
> Display Class API: close the device
> OK
> SGXReleaseClientInfo:
> OK
> PVRSRVDisconnect:
> OK
> ------------------ SGX 3D Blit test -----------------
> ------------------------ End ------------------------
> ----------------------- Start -----------------------
> Call PVRSRVConnect with a valid argument:
> OK
> Get number of devices from PVRSRVEnumerateDevices:
> OK
> .... Reported 1 devices
> .... Device Number | Device Type
> 0000 | PVRSRV_DEVICE_ID_SGX
> Attempt to acquire device 0:
> OK
> Getting SGX Client info
> OK
> .... ui32ProcessID:1700
> Display Class API: enumerate devices
> OK
> PVRSRVEnumerateDeviceClass() returns 1 display device(s)
> OK
> Attempt to create memory context for SGX:
> OK
> Display Class API: open device
> OK
> Display Class API: Get display info
> OK
> .... Name:PowerVR OMAP Linux Display Driver
> .... MaxSwapChains:1
> .... MaxSwapChainBuffers:1
> .... MinSwapInterval:0
> .... MaxSwapInterval:3
> Display Class API: enumerate display formats
> OK
> OK
> .... Display format 0 - Pixelformat:1
> Display Class API: enumerate display dimensions
> OK
> OK
> .... Display dimensions 0 - ByteStride:1600 Width:800 Height:600
> Display Class API: get the system (primary) buffer
> OK
> .... Shared heap 0 - HeapID:0x7000000 DevVAddr:0x400000 Size:
> 0x6bff000 Attr:0x2014200
> .... Shared heap 1 - HeapID:0x7000001 DevVAddr:0x7000000 Size:
> 0xfff000 Attr:0x2024200
> .... Shared heap 2 - HeapID:0x7000002 DevVAddr:0xf000000 Size:
> 0x80000 Attr:0x2024200
> .... Shared heap 3 - HeapID:0x7000004 DevVAddr:0xf800000 Size:
> 0x3ff000 Attr:0x2024200
> .... Shared heap 4 - HeapID:0x7000005 DevVAddr:0xd000000 Size:
> 0x500000 Attr:0x2014200
> .... Shared heap 5 - HeapID:0x7000006 DevVAddr:0xd800000 Size:
> 0x200000 Attr:0x2014200
> .... Shared heap 6 - HeapID:0x7000007 DevVAddr:0xe000000 Size:
> 0x7ff000 Attr:0x2014200
> .... Shared heap 7 - HeapID:0x7000008 DevVAddr:0xe800000 Size:
> 0x7ff000 Attr:0x2014200
> .... Shared heap 8 - HeapID:0x7000009 DevVAddr:0xfc00000 Size:
> 0x3ff000 Attr:0x2024200
> .... Shared heap 9 - HeapID:0x700000a DevVAddr:0x8000000 Size:
> 0x3fff000 Attr:0x2014200
> .... Shared heap 10 - HeapID:0x700000b DevVAddr:0xc000000 Size:
> 0xfff000 Attr:0x2024000
> Display Class API: map display surface to SGX
> OK
> FAIL - PVRSRV_ERROR_TOOMANYBUFFERS
> ----------------------- Start -----------------------
> Try calling PVRSRVConnect with an invalid argument:
> OK
> Call PVRSRVConnect with a valid argument:
> OK
> Try calling PVRSRVEnumerateDevices with invalid puiNumDevices:
> OK
> Get number of devices from PVRSRVEnumerateDevices:
> OK
> .... Reported 1 devices
> .... Device Number | Device Type
> 0000 | PVRSRV_DEVICE_ID_SGX
> Attempt to acquire device 0:
> OK
> Getting SGX Client info
> OK
> .... ui32ProcessID:1686
> Display Class API: enumerate devices
> OK
> PVRSRVEnumerateDeviceClass() returns 1 display device(s)
> OK
> Attempt to create memory context for SGX:
> OK
> Display Class API: open device
> OK
> Display Class API: Get display info
> OK
> .... Name:PowerVR OMAP Linux Display Driver
> .... MaxSwapChains:1
> .... MaxSwapChainBuffers:1
> .... MinSwapInterval:0
> .... MaxSwapInterval:3
> Display Class API: enumerate display formats
> OK
> OK
> .... Display format 0 - Pixelformat:1
> Display Class API: enumerate display dimensions
> OK
> OK
> .... Display dimensions 0 - ByteStride:1600 Width:800 Height:600
> Display Class API: get the system (primary) buffer
> OK
> .... Shared heap 0 - HeapID:0x7000000 DevVAddr:0x400000 Size:
> 0x6bff000 Attr:0x2014200
> .... Shared heap 1 - HeapID:0x7000001 DevVAddr:0x7000000 Size:
> 0xfff000 Attr:0x2024200
> .... Shared heap 2 - HeapID:0x7000002 DevVAddr:0xf000000 Size:
> 0x80000 Attr:0x2024200
> .... Shared heap 3 - HeapID:0x7000004 DevVAddr:0xf800000 Size:
> 0x3ff000 Attr:0x2024200
> .... Shared heap 4 - HeapID:0x7000005 DevVAddr:0xd000000 Size:
> 0x500000 Attr:0x2014200
> .... Shared heap 5 - HeapID:0x7000006 DevVAddr:0xd800000 Size:
> 0x200000 Attr:0x2014200
> .... Shared heap 6 - HeapID:0x7000007 DevVAddr:0xe000000 Size:
> 0x7ff000 Attr:0x2014200
> .... Shared heap 7 - HeapID:0x7000008 DevVAddr:0xe800000 Size:
> 0x7ff000 Attr:0x2014200
> .... Shared heap 8 - HeapID:0x7000009 DevVAddr:0xfc00000 Size:
> 0x3ff000 Attr:0x2024200
> .... Shared heap 9 - HeapID:0x700000a DevVAddr:0x8000000 Size:
> 0x3fff000 Attr:0x2014200
> .... Shared heap 10 - HeapID:0x700000b DevVAddr:0xc000000 Size:
> 0xfff000 Attr:0x2024000
> Display Class API: map display surface to SGX
> OK
> Display Class API: unmap display surface from SGX
> OK
> Attempt to destroy memory context for SGX:
> OK
> Display Class API: close the device
> OK
> SGXReleaseClientInfo:
> OK
> PVRSRVDisconnect:
> OK
> ---------------------End loop 1---------------------
> ----------------------- Start -----------------------
> Call PVRSRVConnect with a valid argument:
> OK
> Get number of devices from PVRSRVEnumerateDevices:
> OK
> .... Reported 1 devices
> .... Device Number | Device Type
> 0000 | PVRSRV_DEVICE_ID_SGX
> Attempt to acquire device 0:
> OK
> Getting SGX Client info
> OK
> .... ui32ProcessID:1697
> Display Class API: enumerate devices
> OK
> PVRSRVEnumerateDeviceClass() returns 1 display device(s)
> OK
> Display Class API: open device
> OK
> Display Class API: Get display info
> OK
> .... Name:PowerVR OMAP Linux Display Driver
> .... MaxSwapChains:1
> .... MaxSwapChainBuffers:1
> .... MinSwapInterval:0
> .... MaxSwapInterval:3
> Display Class API: enumerate display formats
> OK
> OK
> .... Display format 0 - Pixelformat:1
> Display Class API: enumerate display dimensions
> OK
> OK
> .... Display dimensions 0 - ByteStride:1600 Width:800 Height:600
> Attempt to create memory context for SGX:
> OK
> .... Shared heap 0 - HeapID:0x7000000 DevVAddr:0x400000 Size:
> 0x6bff000 Attr:0x2014200
> .... Shared heap 1 - HeapID:0x7000001 DevVAddr:0x7000000 Size:
> 0xfff000 Attr:0x2024200
> .... Shared heap 2 - HeapID:0x7000002 DevVAddr:0xf000000 Size:
> 0x80000 Attr:0x2024200
> .... Shared heap 3 - HeapID:0x7000004 DevVAddr:0xf800000 Size:
> 0x3ff000 Attr:0x2024200
> .... Shared heap 4 - HeapID:0x7000005 DevVAddr:0xd000000 Size:
> 0x500000 Attr:0x2014200
> .... Shared heap 5 - HeapID:0x7000006 DevVAddr:0xd800000 Size:
> 0x200000 Attr:0x2014200
> .... Shared heap 6 - HeapID:0x7000007 DevVAddr:0xe000000 Size:
> 0x7ff000 Attr:0x2014200
> .... Shared heap 7 - HeapID:0x7000008 DevVAddr:0xe800000 Size:
> 0x7ff000 Attr:0x2014200
> .... Shared heap 8 - HeapID:0x7000009 DevVAddr:0xfc00000 Size:
> 0x3ff000 Attr:0x2024200
> .... Shared heap 9 - HeapID:0x700000a DevVAddr:0x8000000 Size:
> 0x3fff000 Attr:0x2014200
> .... Shared heap 10 - HeapID:0x700000b DevVAddr:0xc000000 Size:
> 0xfff000 Attr:0x2024000
> Display Class API: Create DC swap chain
> FAIL - PVRSRV_ERROR_TOOMANYBUFFERS(27)
> ----------------------- Start -----------------------
> Call PVRSRVConnect with a valid argument:
> OK
> Get number of devices from PVRSRVEnumerateDevices:
> OK
> .... Reported 1 devices
> .... Device Number | Device Type
> 0000 | PVRSRV_DEVICE_ID_SGX
> Attempt to acquire device 0:
> OK
> Getting SGX Client info
> OK
> .... ui32ProcessID:1692
> Display Class API: enumerate devices
> OK
> PVRSRVEnumerateDeviceClass() returns 1 display device(s)
> OK
> Display Class API: open device
> OK
> Display Class API: Get display info
> OK
> .... Name:PowerVR OMAP Linux Display Driver
> .... MaxSwapChains:1
> .... MaxSwapChainBuffers:1
> .... MinSwapInterval:0
> .... MaxSwapInterval:3
> Display Class API: enumerate display formats
> OK
> OK
> .... Display format 0 - Pixelformat:1
> Display Class API: enumerate display dimensions
> OK
> OK
> .... Display dimensions 0 - ByteStride:1600 Width:800 Height:600
> Display Class API: get the system (primary) buffer
> OK
> Display Class API: map display surface to SGX
> OK
> Attempt to create memory context for SGX:
> OK
> .... Shared heap 0 - HeapID:0x7000000 DevVAddr:0x400000 Size:
> 0x6bff000 Attr:0x2014200
> .... Shared heap 1 - HeapID:0x7000001 DevVAddr:0x7000000 Size:
> 0xfff000 Attr:0x2024200
> .... Shared heap 2 - HeapID:0x7000002 DevVAddr:0xf000000 Size:
> 0x80000 Attr:0x2024200
> .... Shared heap 3 - HeapID:0x7000004 DevVAddr:0xf800000 Size:
> 0x3ff000 Attr:0x2024200
> .... Shared heap 4 - HeapID:0x7000005 DevVAddr:0xd000000 Size:
> 0x500000 Attr:0x2014200
> .... Shared heap 5 - HeapID:0x7000006 DevVAddr:0xd800000 Size:
> 0x200000 Attr:0x2014200
> .... Shared heap 6 - HeapID:0x7000007 DevVAddr:0xe000000 Size:
> 0x7ff000 Attr:0x2014200
> .... Shared heap 7 - HeapID:0x7000008 DevVAddr:0xe800000 Size:
> 0x7ff000 Attr:0x2014200
> .... Shared heap 8 - HeapID:0x7000009 DevVAddr:0xfc00000 Size:
> 0x3ff000 Attr:0x2024200
> .... Shared heap 9 - HeapID:0x700000a DevVAddr:0x8000000 Size:
> 0x3fff000 Attr:0x2014200
> .... Shared heap 10 - HeapID:0x700000b DevVAddr:0xc000000 Size:
> 0xfff000 Attr:0x2024000
> OK
> OK
> OK
> OK
> OK
> OK
> OK
> Creating render context via SGXCreateRenderContext
> OK
> Adding render target via SGXAddRenderTarget
> OK
> Display Class API: pixel format 565
> Attempt to remove render target:
> OK
> Attempt to destroy render context:
> OK
> Display Class API: unmap display surface from SGX
> OK
> Display Class API: close the device
> OK
> SGXReleaseClientInfo:
> OK
> PVRSRVDisconnect:
> OK
Thanks, that didn't solve the problem. However TI suggested adding:
[default]
WindowSystem=libpvrPVR2D_FRONTWSEGL.so
to powervi.ini and this did work around the problem. At last I can get on
with some graphics development which is great news.
>
>> You could try increasing the VRAM a bit in DSS2, that might help.
>
> Thanks, that didn't solve the problem. However TI suggested adding:
>
> [default]
> WindowSystem=libpvrPVR2D_FRONTWSEGL.so
>
> to powervi.ini and this did work around the problem. At last I can
> get on
> with some graphics development which is great news.
Ah right, the default is FLIP, which has no kernel support anymore.
regards,
Koen
Yes. Some of them are quite pretty.
> Please forgive my ignorance, but where is this .ini file to be found?
> I have run a "find / -name p*.ini" on my Beagle and it came up with a
> couple of ini files, neither of which is this one.
The ini file doesn't exist with the current distribution. Create it
yourself: /etc/powervr.ini
Don't forget you must also run with a 16-bit framebuffer (which is a
showstopper for me unfortunately).
Regards