DirectFB on iMX53

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DirectFB on iMX53

Jump to solution
3,184 Views
StevieRG
Contributor II

I’m looking to get directFB running on the iMX53 QSB. I extracted the package and the samples and built them in ltib. When I run any of the samples I get an error, with some samples a system lockup, sometimes I can get out of the sample using ctrl-c. Always though the display monitor goes into ‘sleep’ mode like it no longer has a signal. Below is the dump of running “dbinfo”, the text shown for this is the same as when running all samples too. I notice there is an error:

(!) Direct/Modules: Could not open module directory `/usr/lib/directfb-1.1-0/gfxdrivers'!

Maybe this is this a clue for why it just gives a sleeping blank monitor? - would I need to get that missing gfxdrivers (from where)? Many thanks.

root@freescale ~$ dfbinfo

=======================| DirectFB 1.1.0 |=======================
(c) 2001-2007 The DirectFB Organization (directfb.org)
(c) 2000-2004 Convergence (integrated media) GmbH
------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2012-02-02 10:23)
(*) Direct/Thread: Running 'VT Switcher' (CRITICAL, 2250)...
(*) Direct/Thread: Running 'PS/2 Input' (INPUT, 2251)...
(*) DirectFB/Input: IMPS/2 Mouse 1.0 (directfb.org)
(*) Direct/Thread: Running 'Linux Input' (INPUT, 2253)...
(*) DirectFB/Input: gpio-keys (1) 0.1 (directfb.org)
(*) Direct/Thread: Running 'Linux Input' (INPUT, 2254)...
(*) DirectFB/Input: da9052-tsi (2) 0.1 (directfb.org)
(*) Direct/Thread: Running 'Linux Input' (INPUT, 2255)...
(*) DirectFB/Input: da9052-onkey (3) 0.1 (directfb.org)
(*) Directmxc_ipu mxc_ipu: Channel already disabled 9
mxc_ipu mxc_ipu: Channel already uninitialized 9
/Thread: Running 'Linux Input' (INPUT, 2257)...
(*) DirectFB/Input: mma8450 (4) 0.1 (directfb.org)
(*) Direct/Thread: Running 'Linux Input' (INPUT, 2258)...
(*) DirectFB/Input: USB Optical Mouse (5) 0.1 (directfb.org)
(*) Direct/Thread: Running 'Keyboard Input' (INPUT, 2259)...
(*) DirectFB/Input: Keyboard 0.9 (directfb.org)
(!) Direct/Modules: Could not open module directory `/usr/lib/directfb-1.1-0/gfxdrivers'!
--> No such file or directory
(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) FBDev/Mode: Testing 640x480 RGB16
(*) FBDev/Mode: Preparing switch to 640x480 RGB16
(*) FBDev/Mode: Testing 640x480 RGB16
(*) FBDev/Mode: Preparing switch to 640x480 RGB16
(*) FBDev/Mode: Testing 640x480 RGB16
(*) FBDev/Mode: Preparing switch to 640x480 RGB16
(*) FBDev/Mode: Testing 640x480 RGB16
(*) FBDev/Mode: Preparing switch to 640x480 RGB16
(*) FBDev/Mode: Testing 640x480 RGB16
(*) FBDev/Mode: Preparing switch to 640x480 RGB16
(*) FBDev/Mode: Switched to 640x480 (640x1440) at 16 bit RGB16 (wanted RGB16).
(*) FBDev/Surface: Allocated 640x1440 16bit RGB16 buffer at offset 0 and pitch 1280.
(*) FBDev/Mode: (Post)Setting 640x480 RGB16
(*) FBDev/Mode: Testingmxc_ipu mxc_ipu: Channel already disabled 9
mxc_ipu mxc_ipu: Channel already uninitialized 9
mxc_ipu mxc_ipu: Channel already disabled 9
mxc_ipu mxc_ipu: Channel already uninitialized 9
640x480 RGB16
(*) FBDev/Mode: Preparing switch to 640x480 RGB16
(*) FBDev/Mode: (Post)Setting 640x480 RGB16

Screen (00) FBDev Primary Screen (primary screen)
Caps: VSYNC POWER_MANAGEMENT
Layer (00) FBDev Primary Layer (primary layer)
Type: GRAPHICS
Caps: SURFACE BRIGHTNESS CONTRAST SATURATION
Input (01) IMPS/2 Mouse (primary mouse)
Type: MOUSE
Caps: AXES BUTTONS
Max. Axis: 2
Max. Button: 2
Input (11) da9052-tsi
Type: MOUSE
Caps: AXES
Max. Axis: 1
Input (13) mma8450
Type:
Caps: AXES
Max. Axis: 2
Input (14) USB Optical Mouse
Type: MOUSE
Caps: AXES BUTTONS
Max. Axis: 3
Max. Button: 2
Input (00) Keyboard (primary keyboard)
Type: KEYBOARD
Caps: KEYS

Labels (1)
0 Kudos
1 Solution
1,183 Views
DmitriyVostriko
Contributor I

Hello!

gfxdriver is not the problem, directfb has nice software rasterisation engine.

It see as you have fbset package installed, check it in your LTIB.

This package install /etc/fb.modes file in your target rootfs.

When DirectFB applications start, it check this file and use first mode in.

This file has mode lines, that not compatibility with mxc framebuffers drivers.

You need this file if you want to use command like this: fbset -depth 32 "1280x1024-60". But it need some work for do it.

So, just rename this file and DirectFB will get currently parameters of framebuffer, and dfb examples will work. For example df_dok

Sorry for my english, it is not my native language.

View solution in original post

0 Kudos
5 Replies
1,184 Views
DmitriyVostriko
Contributor I

Hello!

gfxdriver is not the problem, directfb has nice software rasterisation engine.

It see as you have fbset package installed, check it in your LTIB.

This package install /etc/fb.modes file in your target rootfs.

When DirectFB applications start, it check this file and use first mode in.

This file has mode lines, that not compatibility with mxc framebuffers drivers.

You need this file if you want to use command like this: fbset -depth 32 "1280x1024-60". But it need some work for do it.

So, just rename this file and DirectFB will get currently parameters of framebuffer, and dfb examples will work. For example df_dok

Sorry for my english, it is not my native language.

0 Kudos
1,183 Views
StevieRG
Contributor II

Hello Dmitriy

You were exactly right, it was the file /etc/fb.modes that cause the problem.

I renamed this file to something else, and though the gfxdrivers error is still there, now the df_dok example runs perfectly.

Thank you for your useful help

0 Kudos
1,183 Views
PierreVorhagen
Contributor I

Hello,

I am having a similar problem on an i.MX515. After successfully cross-compiling it, there is no gfxdriver present. (Applications with OpenGL don't run at all via DirectFB, which is logical if there is no interface to the hardware...)

I suspect that there is no directfb driver from Freescale? Is it at all possible to have a functional directfb window system with hardware acceleration?

Can someone answer this question : If one wanted a multi-process window system on an i.MX5... board, capable of OpenGL & general hardware acceleration, is X the only option available?

There are alternatives like Wayland and DirectFB (maye others?), but I haven't found anything viable yet...
I know Wayland needs a libEGL implementation supporting the wayland EGL extension, but is it the same thing for DirectFB? Not possible to get hw acceleration on the i.MX5xx?

I would be very grateful if someone could help me out here! I've been on this for a while now, and I'm starting to think that Xorg is the only option if one wants multi-process hardware acceleration... (which isn't what I would have expected a couple of weeks ago...)


Regards,

pvr

0 Kudos
1,183 Views
StevieRG
Contributor II

I'm pretty certain I have DirectFB installed to some degree:

In ltib - Package Selection - Package list-->

[*] DirectDB
  [*] Configure for use with touchscreen (enabled though I don't need it)
  [*] DirectFB-examples

------------------------------------------------------
In directory: /home/revo/ltib/rpm/BUILD
DirectFB-examples-0.9.23
.... and all these sample apps have built OK.

------------------------------------------------------
In directory: ltib/rootfs/usr/include/directfb/

dfb_types.h   dgiff.h   directfbgl.h   directfb_keyboard.h   directfb_strings.h   directfb_version.h
dfiff.h   direct   directfb.h   directfb_keynames.h   directfb_util.h   fusion


------------------------------------------------------
In directory: ltib/dist/lfs-5.1/DirectFB/DirectFB.spec

./configure --enable-shared --host=$CFGHOST --build=%{_build} \
  --prefix=%{_prefix} --with-gfxdrivers=none \
  --enable-freetype --enable-jpeg --enable-png \
  --enable-sdl \
  --disable-x11 --enable-fbdev --enable-video4linux2 \
  --enable-zlib $TSOPTS

...... NOTE THOUGH - it does say "--with-gfxdrivers=none" and it's the gfxdrivers that the error refers to - do I need something different in here?

------------------------------------------------------
In directory: ltib/rootfs/usr/lib

libdirect-1.1.so.0   libdirect-1.1.so.0.0.0   libdirectfb-1.1.so.0   libdirectfb-1.1.so.0.0.0   libdirectfb.so libdirect.so

------------------------------------------------------
In directory: /ltib/rootfs/usr/lib/directfb-1.1-0

├── inputdrivers
│   ├── libdirectfb_joystick.so
│   ├── libdirectfb_keyboard.so
│   ├── libdirectfb_linux_input.so
│   ├── libdirectfb_lirc.so
│   ├── libdirectfb_mutouch.so
│   ├── libdirectfb_penmount.so
│   ├── libdirectfb_ps2mouse.so
│   ├── libdirectfb_serialmouse.so
│   ├── libdirectfb_sonypi.so
│   ├── libdirectfb_ucb1x00_ts.so
│   └── libdirectfb_wm97xx_ts.so
├── interfaces
│   ├── IDirectFBFont
│   │   ├── libidirectfbfont_default.so
│   │   └── libidirectfbfont_ft2.so
│   ├── IDirectFBImageProvider
│   │   ├── libidirectfbimageprovider_dfiff.so
│   │   ├── libidirectfbimageprovider_gif.so
│   │   ├── libidirectfbimageprovider_jpeg.so
│   │   ├── libidirectfbimageprovider_mpeg2.so
│   │   └── libidirectfbimageprovider_png.so
│   └── IDirectFBVideoProvider
│   └── libidirectfbvideoprovider_gif.so
├── systems
│   └── libdirectfb_fbdev.so
└── wm
└── libdirectfbwm_default.so

........ it seems the "gfxdrivers" directory that the directFB apps say is missing should be in here.

-----------------------------------------------------------------------
Maybe the missing gfxdrivers folder might not be related to the total loss of video when I run a DirectFB app?

I don't know if there is any other option I need to enable or package I need to install, or whether the loss of video is due to some other system config (or bootargs?) that isn't set correctly.

The video related bootargs are:
  bootargs console=ttymxc0,115200 video=mxcdi1fb:GBR24,VGA-XGA di1_primary tve

So I'm fairly confident a lot of the needed DirectFB stuff is present, but maybe not all? Maybe there are other files or config that I'll need in order to fix the missing gfxdrivers (if it does actually need fixing) and to fix the loss of video? Many thanks.

0 Kudos